Durability and initial charges migrated to template.

This commit is contained in:
MagicBot committed 2024-03-03 08:38:24 -05:00
1 parent 436d0cec9b
commit d7dfab5e74
6 files changed
+19 -26

No files matched your search

+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);