Browse Source

Update NPC window

combat-2
MagicBot 7 months ago
parent
commit
114aeb9f64
  1. 7
      src/engine/gameManager/ForgeManager.java
  2. 1
      src/engine/net/client/handlers/ItemProductionMsgHandler.java

7
src/engine/gameManager/ForgeManager.java

@ -12,6 +12,8 @@ import engine.loot.ModTableEntry;
import engine.loot.ModTypeTableEntry; import engine.loot.ModTypeTableEntry;
import engine.loot.WorkOrder; import engine.loot.WorkOrder;
import engine.mbEnums; import engine.mbEnums;
import engine.net.DispatchMessage;
import engine.net.client.msg.ItemProductionMsg;
import engine.objects.*; import engine.objects.*;
import engine.powers.EffectsBase; import engine.powers.EffectsBase;
import engine.powers.poweractions.AbstractPowerAction; import engine.powers.poweractions.AbstractPowerAction;
@ -302,6 +304,11 @@ public enum ForgeManager implements Runnable {
vendorItemLookup.get(workOrder.vendor).add(forged_item); vendorItemLookup.get(workOrder.vendor).add(forged_item);
ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder); ForgeManager.vendorWorkOrderLookup.get(workOrder.vendor).add(workOrder);
// Update NPC window
ItemProductionMsg outMsg = new ItemProductionMsg(workOrder.vendor.building, workOrder.vendor, forged_item, 8, true);
DispatchMessage.dispatchMsgToInterestArea(workOrder.vendor, outMsg, mbEnums.DispatchChannel.SECONDARY, 700, false, false);
Logger.info("Forging item: " + forged_item.objectUUID + " (" + forged_item.templateID + ") " + forged_item.template.item_base_name); Logger.info("Forging item: " + forged_item.objectUUID + " (" + forged_item.templateID + ") " + forged_item.template.item_base_name);
workOrder.total_produced = workOrder.total_produced + 1; workOrder.total_produced = workOrder.total_produced + 1;
} }

1
src/engine/net/client/handlers/ItemProductionMsgHandler.java

@ -99,6 +99,7 @@ public class ItemProductionMsgHandler extends AbstractClientMsgHandler {
ErrorPopupMsg.sendErrorPopup(player, validation_result); ErrorPopupMsg.sendErrorPopup(player, validation_result);
return true; return true;
} }
break; break;
case JUNK: case JUNK:
junkItem(msg.itemUUID, vendorNPC, origin); junkItem(msg.itemUUID, vendorNPC, origin);

Loading…
Cancel
Save