From 6cf1446d39db994cdca2db8f7f61da8423672bb3 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 17 May 2016 00:02:55 +0200 Subject: Core/Auras: Implemented auras SPELL_AURA_PREVENT_DURABILITY_LOSS and SPELL_AURA_PREVENT_DURABILITY_LOSS_FROM_COMBAT (cherry picked from commit 17118f4832d527f160dc300a52db7ba6c255bce2) --- src/server/game/Entities/Player/Player.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server/game/Entities') diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 50e27d9afa9..7c22a712aa4 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -4941,6 +4941,9 @@ void Player::DurabilityPointsLossAll(int32 points, bool inventory) void Player::DurabilityPointsLoss(Item* item, int32 points) { + if (HasAuraType(SPELL_AURA_PREVENT_DURABILITY_LOSS)) + return; + int32 pMaxDurability = item->GetUInt32Value(ITEM_FIELD_MAXDURABILITY); int32 pOldDurability = item->GetUInt32Value(ITEM_FIELD_DURABILITY); int32 pNewDurability = pOldDurability - points; -- cgit v1.2.3