forked from MagicBane/Server
forged items are persisted
This commit is contained in:
@@ -155,11 +155,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
return;
|
||||
}
|
||||
targetItem.setValue(itemPrice);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.SETPRICE.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.SETPRICE, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
} else if (targetItem.getObjectType() == GameObjectType.MobLoot) {
|
||||
@@ -169,11 +169,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
return;
|
||||
}
|
||||
targetItem.setValue(itemPrice);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.SETPRICE.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.SETPRICE, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
}
|
||||
@@ -230,11 +230,11 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.CONFIRM_DEPOSIT, true);
|
||||
dispatch = Dispatch.borrow(player, outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
@@ -313,7 +313,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
|
||||
totalValue += itemValue;
|
||||
vendor.charItemManager.recycle(targetItem);
|
||||
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.TAKE.ordinal(), true);
|
||||
outMsg = new ItemProductionMsg(vendor.getBuilding(), vendor, targetItem, mbEnums.ProductionActionType.TAKE, true);
|
||||
|
||||
dispatch = Dispatch.borrow(origin.getPlayerCharacter(), outMsg);
|
||||
DispatchMessage.dispatchMsgDispatch(dispatch, mbEnums.DispatchChannel.SECONDARY);
|
||||
|
||||
@@ -61,9 +61,9 @@ public class ItemProductionMsg extends ClientNetMsg {
|
||||
|
||||
;
|
||||
|
||||
public ItemProductionMsg(Building building, NPC vendor, Item item, int actionType, boolean add) {
|
||||
public ItemProductionMsg(Building building, NPC vendor, Item item, mbEnums.ProductionActionType actionType, boolean add) {
|
||||
super(Protocol.ITEMPRODUCTION);
|
||||
this.actionType = mbEnums.ProductionActionType.values()[actionType];
|
||||
this.actionType = actionType;
|
||||
this.size = 0;
|
||||
this.buildingUUID = building.getObjectUUID();
|
||||
this.npcUUID = vendor.getObjectUUID();
|
||||
|
||||
Reference in New Issue
Block a user