NPC special price option

This commit is contained in:
2025-01-03 07:47:16 -06:00
parent 3d83baed78
commit 6e66659940
5 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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();