Browse Source

Handler created for equip message.

combat-2
MagicBot 8 months ago
parent
commit
caf708bed6
  1. 10
      src/engine/net/client/handlers/TransferItemFromInventoryToEquipHandler.java

10
src/engine/net/client/handlers/TransferItemFromInventoryToEquipHandler.java

@ -104,16 +104,16 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa @@ -104,16 +104,16 @@ public class TransferItemFromInventoryToEquipHandler extends AbstractClientMsgHa
private static void forceTransferFromEquipToInventory(TransferItemFromInventoryToEquipMsg msg, ClientConnection origin, String reason) {
PlayerCharacter pc = origin.getPlayerCharacter();
PlayerCharacter player = origin.getPlayerCharacter();
if (pc == null)
if (player == null)
return;
TransferItemFromEquipToInventoryMsg back = new TransferItemFromEquipToInventoryMsg(pc, msg.getSlotNumber());
Dispatch dispatch = Dispatch.borrow(pc, back);
TransferItemFromEquipToInventoryMsg back = new TransferItemFromEquipToInventoryMsg(player, msg.getSlotNumber());
Dispatch dispatch = Dispatch.borrow(player, back);
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
ChatManager.chatInfoError(pc, "Can't equip item: " + reason);
ChatManager.chatInfoError(player, "Can't equip item: " + reason);
}
}
Loading…
Cancel
Save