From b4aa19f329b06e42eb2591fc488b70dc0df41940 Mon Sep 17 00:00:00 2001 From: Alexander Harkness Date: Fri, 5 Jan 2018 11:28:06 +0000 Subject: Item durability loss now depends on the item used. (#4123) Armour durability also no longer changes when it is used to break blocks or attack mobs. Fixes #4119 --- src/Items/ItemHoe.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/Items/ItemHoe.h') diff --git a/src/Items/ItemHoe.h b/src/Items/ItemHoe.h index 0bf2d4c4b..8fe53c343 100644 --- a/src/Items/ItemHoe.h +++ b/src/Items/ItemHoe.h @@ -69,9 +69,11 @@ public: virtual short GetDurabilityLossByAction(eDurabilityLostAction a_Action) override { - return 0; + switch (a_Action) + { + case dlaAttackEntity: return 1; + case dlaBreakBlock: return 0; + case dlaBreakBlockInstant: return 0; + } } } ; - - - -- cgit v1.2.3