forked from MagicBane/Server
New rolling duration method moved to manager singleton.
This commit is contained in:
@@ -11,6 +11,7 @@ package engine.net.client.msg;
|
||||
|
||||
import engine.gameManager.BuildingManager;
|
||||
import engine.gameManager.ForgeManager;
|
||||
import engine.gameManager.NPCManager;
|
||||
import engine.loot.WorkOrder;
|
||||
import engine.mbEnums;
|
||||
import engine.mbEnums.GameObjectType;
|
||||
@@ -259,6 +260,7 @@ public class ItemProductionMsg extends ClientNetMsg {
|
||||
writer.putInt(toRoll.getValue());
|
||||
|
||||
NPC vendor = NPC.getFromCache(this.npcUUID);
|
||||
|
||||
if (vendor != null) {
|
||||
if (toRoll.isComplete()) {
|
||||
writer.putInt(0);
|
||||
@@ -268,7 +270,7 @@ public class ItemProductionMsg extends ClientNetMsg {
|
||||
|
||||
timeLeft /= 1000;
|
||||
writer.putInt((int) timeLeft);
|
||||
writer.putInt(vendor.getRollingTimeInSeconds(toRoll.templateID));
|
||||
writer.putInt((int) (NPCManager.calcRollingDuration(vendor, toRoll.templateID) * .001));
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
@@ -450,7 +450,7 @@ public class ManageNPCMsg extends ClientNetMsg {
|
||||
|
||||
timeLife /= 1000;
|
||||
writer.putInt((int) timeLife);
|
||||
writer.putInt(npc.getRollingTimeInSeconds(item.templateID));
|
||||
writer.putInt((int) (NPCManager.calcRollingDuration(npc, item.templateID) * .001));
|
||||
writer.putInt(1);
|
||||
|
||||
if (item.isComplete())
|
||||
|
||||
Reference in New Issue
Block a user