Browse Source

Fix shift-click equipment swapping network messages

pull/4246/head
staphen 4 years ago committed by Anders Jenbo
parent
commit
82f53c53b0
  1. 6
      Source/inv.cpp

6
Source/inv.cpp

@ -801,10 +801,6 @@ void CheckInvCut(int pnum, Point cursorPosition, bool automaticMove, bool dropIt
invloc = INVLOC_AMULET; invloc = INVLOC_AMULET;
break; break;
case ILOC_ONEHAND: case ILOC_ONEHAND:
// Ensure shield is on the right, weapon on the left.
if (player.InvBody[INVLOC_HAND_LEFT]._itype == ItemType::Shield) {
SwapItem(player.InvBody[INVLOC_HAND_RIGHT], player.InvBody[INVLOC_HAND_LEFT]);
}
// User is attempting to move a weapon (left hand) // User is attempting to move a weapon (left hand)
if (player.InvList[iv - 1]._iClass == player.InvBody[INVLOC_HAND_LEFT]._iClass if (player.InvList[iv - 1]._iClass == player.InvBody[INVLOC_HAND_LEFT]._iClass
&& player.GetItemLocation(player.InvList[iv - 1]) == player.GetItemLocation(player.InvBody[INVLOC_HAND_LEFT])) { && player.GetItemLocation(player.InvList[iv - 1]) == player.GetItemLocation(player.InvBody[INVLOC_HAND_LEFT])) {
@ -835,7 +831,7 @@ void CheckInvCut(int pnum, Point cursorPosition, bool automaticMove, bool dropIt
player.RemoveInvItem(player._pNumInv - 1, false); player.RemoveInvItem(player._pNumInv - 1, false);
break; break;
} }
player.InvBody[INVLOC_HAND_RIGHT]._itype = ItemType::None; RemoveEquipment(player, INVLOC_HAND_RIGHT, false);
invloc = INVLOC_HAND_LEFT; invloc = INVLOC_HAND_LEFT;
} else { } else {
invloc = INVLOC_HAND_LEFT; invloc = INVLOC_HAND_LEFT;

Loading…
Cancel
Save