Durability and initial charges migrated to template.
This commit is contained in:
@@ -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