Durability and initial charges migrated to template.

This commit is contained in:
2024-03-03 08:38:24 -05:00
parent 436d0cec9b
commit d7dfab5e74
6 changed files with 19 additions and 26 deletions
+2 -1
View File
@@ -2444,13 +2444,14 @@ public class CharacterItemManager {
return;
//don't damage noob gear, hair or beards.
if (item.getDurabilityMax() == 0)
if (item.template.item_health_full == 0)
return;
if (!item.isCanDestroy())
return;
int dur = (int) (short) item.durabilityCurrent;
if (dur - amount <= 0) {
//destroy the item
junk(item);