mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-16 16:56:07 +00:00
feat(Core/Spell): Define SPELL_AURA_PREVENT_DURABILITY_LOSS (#5148)
This commit is contained in:
@@ -5570,6 +5570,11 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user