Browse Source

Begin work on forgeItem()

combat-2
MagicBot 9 months ago
parent
commit
a18785fb3d
  1. 18
      src/engine/gameManager/ForgeManager.java

18
src/engine/gameManager/ForgeManager.java

@ -11,10 +11,7 @@ package engine.gameManager;
import engine.loot.WorkOrder; import engine.loot.WorkOrder;
import engine.mbEnums; import engine.mbEnums;
import engine.net.client.msg.ErrorPopupMsg; import engine.net.client.msg.ErrorPopupMsg;
import engine.objects.Item; import engine.objects.*;
import engine.objects.ItemTemplate;
import engine.objects.PlayerCharacter;
import engine.objects.Warehouse;
import engine.powers.EffectsBase; import engine.powers.EffectsBase;
import org.pmw.tinylog.Logger; import org.pmw.tinylog.Logger;
@ -269,4 +266,17 @@ public enum ForgeManager implements Runnable {
return overflowMap; return overflowMap;
} }
public static Item forgeItem(WorkOrder workOrder) {
Item forgedItem = new Item(workOrder.templateID);
forgedItem.objectUUID = MobLoot.lastNegativeID.getAndDecrement();
forgedItem.containerType = mbEnums.ItemContainerType.FORGE;
forgedItem.ownerID = workOrder.vendor.getObjectUUID();
// Forged items are unidentified until completed
forgedItem.flags.remove(mbEnums.ItemFlags.Identified);
return forgedItem;
}
} }

Loading…
Cancel
Save