forked from MagicBane/Server
Handler created for equip message.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user