Skip to content

Commit

Permalink
Improve
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardosnt committed Jul 17, 2016
1 parent f7b5aaf commit efd3b18
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions src/Components/Player/ItemFeatures.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,43 +52,39 @@ Weapon feature (Auto reload)
/*
Bows
*/
case 346:
case 353:
case 355:
case 356:
case 357:
case 346: // Crossbow
case 353: // Maple bow
case 355: // Birch bow
case 356: // Pine Bow
case 357: // Compound bow
_lastArrowId1 = _equip.state[8];
_lastArrowId2 = _equip.state[9];
break;
}
}

if (_equip.state[10] == 0) {
var id = BitConverter.ToUInt16(
new[] { _equip.state[8], _equip.state[9] },
0
);

var id = BitConverter.ToUInt16(_equip.state, 8);
var holdId = _equip.HoldingItemID;

switch (holdId) {
case 519:
case 519: // Rocket Laucher
_equip.state[8] = 8;
_equip.state[9] = 2;
_equip.state[10] = 1;
goto update;

case 300:
case 300: // Shadowstalker
_equip.state[8] = 45;
_equip.state[9] = 1;
_equip.state[10] = 1;
goto update;

case 346:
case 353:
case 355:
case 356:
case 357:
case 346: // Crossbow
case 353: // Maple bow
case 355: // Birch bow
case 356: // Pine Bow
case 357: // Compound bow
_equip.state[8] = (byte) (_lastArrowId1 == 0 ? 91 : _lastArrowId1);
_equip.state[9] = (byte) (_lastArrowId2 == 0 ? 1 : _lastArrowId2);
_equip.state[10] = 1;
Expand Down

0 comments on commit efd3b18

Please sign in to comment.