|
|
@ -41,7 +41,6 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { |
|
|
|
PlayerCharacter player; |
|
|
|
PlayerCharacter player; |
|
|
|
Contract contract; |
|
|
|
Contract contract; |
|
|
|
CharacterItemManager itemMan; |
|
|
|
CharacterItemManager itemMan; |
|
|
|
ItemBase itemBase; |
|
|
|
|
|
|
|
Item item; |
|
|
|
Item item; |
|
|
|
|
|
|
|
|
|
|
|
player = SessionManager.getPlayerCharacter(origin); |
|
|
|
player = SessionManager.getPlayerCharacter(origin); |
|
|
@ -59,16 +58,9 @@ public class OrderNPCMsgHandler extends AbstractClientMsgHandler { |
|
|
|
|
|
|
|
|
|
|
|
BuildingManager.removeHireling(building, hireling); |
|
|
|
BuildingManager.removeHireling(building, hireling); |
|
|
|
|
|
|
|
|
|
|
|
itemBase = ItemBase.getItemBase(contract.getContractID()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (itemBase == null) { |
|
|
|
|
|
|
|
Logger.error("Could not find Contract for npc: " + hireling.getObjectUUID()); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
boolean itemWorked = false; |
|
|
|
boolean itemWorked = false; |
|
|
|
|
|
|
|
|
|
|
|
item = new Item(itemBase.getUUID()); |
|
|
|
item = new Item(contract.getContractID()); |
|
|
|
item.ownerID = player.getObjectUUID(); |
|
|
|
item.ownerID = player.getObjectUUID(); |
|
|
|
item.ownerType = Enum.OwnerType.PlayerCharacter; |
|
|
|
item.ownerType = Enum.OwnerType.PlayerCharacter; |
|
|
|
item.chargesRemaining = (byte) hireling.getRank() - 1; |
|
|
|
item.chargesRemaining = (byte) hireling.getRank() - 1; |
|
|
|