Browse Source

repair costs calculated properly

lakebane-new
FatBoy-DOTC 6 months ago
parent
commit
eed75fd2fd
  1. 6
      src/engine/net/client/ClientMessagePump.java

6
src/engine/net/client/ClientMessagePump.java

@ -1660,12 +1660,8 @@ public class ClientMessagePump implements NetMsgHandler { @@ -1660,12 +1660,8 @@ public class ClientMessagePump implements NetMsgHandler {
DispatchMessage.dispatchMsgDispatch(dispatch, DispatchChannel.SECONDARY);
return;
}
//TODO get cost to repair
int cost = (int) ((max - dur) * 80.1);
cost *= npc.buyPercent;
cost += npc.getRepairCost();
int cost = (int)((toRepair.getMagicValue()/max*(max - dur)) + (npc.getRepairCost() * npc.buyPercent));
Building b = (!npc.isStatic()) ? npc.getBuilding() : null;

Loading…
Cancel
Save