Durability and initial charges migrated to template.
This commit is contained in:
1 parent
436d0cec9b
commit
d7dfab5e74
6 files changed
+19
-26
No files matched your search
@@ -1246,7 +1246,7 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
|
||||
//apply damaged value reduction
|
||||
float durabilityCurrent = (short) sell.durabilityCurrent;
|
||||
float durabilityMax = sell.getDurabilityMax();
|
||||
float durabilityMax = sell.template.item_health_full;
|
||||
float damagedModifier = durabilityCurrent / durabilityMax;
|
||||
cost *= damagedModifier;
|
||||
float bargain = player.getBargain();
|
||||
@@ -1640,7 +1640,8 @@ public class ClientMessagePump implements NetMsgHandler {
|
||||
|
||||
//make sure item is damaged and not destroyed
|
||||
short dur = (short) toRepair.durabilityCurrent;
|
||||
short max = toRepair.getDurabilityMax();
|
||||
short max = (short) toRepair.template.item_health_full;
|
||||
|
||||
//account for durability modifications
|
||||
float durMod = toRepair.getBonusPercent(ModType.Durability, SourceType.NONE);
|
||||
max *= (1 + (durMod * 0.01f));
|
||||
|
||||
Reference in new issue
Block a user