forked from MagicBane/Server
NPC special price option
This commit is contained in:
@@ -1681,7 +1681,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
return;
|
||||
}
|
||||
|
||||
int cost = (int)((toRepair.getMagicValue()/max*(max - dur)) + (npc.getRepairCost() * npc.buyPercent));
|
||||
int cost = ((int)((toRepair.getMagicValue()/max*(max - dur)) + (npc.getSpecialPrice() * npc.buyPercent))) + npc.getSpecialPrice();
|
||||
|
||||
Building b = (!npc.isStatic()) ? npc.getBuilding() : null;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class HirelingServiceMsgHandler extends AbstractClientMsgHandler {
|
||||
return true;
|
||||
|
||||
|
||||
npc.setRepairCost(msg.repairCost);
|
||||
npc.setSpecialPrice(msg.repairCost);
|
||||
ManageNPCMsg outMsg = new ManageNPCMsg(npc);
|
||||
Dispatch dispatch = Dispatch.borrow(player, msg);
|
||||
|
||||
|
||||
@@ -503,7 +503,7 @@ public class ManageNPCMsg extends ClientNetMsg {
|
||||
writer.putInt(0);
|
||||
writer.putString("Repair items");
|
||||
writer.putString("percent");
|
||||
writer.putInt(npc.getRepairCost()); //cost for repair
|
||||
writer.putInt(npc.getSpecialPrice()); //cost for repair
|
||||
writer.putInt(0);
|
||||
|
||||
ArrayList<Integer> modPrefixList = npc.getModTypeTable();
|
||||
|
||||
Reference in New Issue
Block a user