mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
fix(Core/Spells): Base spell resistances from auras should apply to pets. (#10562)
- Closes #10555
This commit is contained in:
@@ -3988,18 +3988,16 @@ void AuraEffect::HandleModBaseResistance(AuraApplication const* aurApp, uint8 mo
|
||||
|
||||
Unit* target = aurApp->GetTarget();
|
||||
|
||||
// only players have base stats
|
||||
if (target->GetTypeId() != TYPEID_PLAYER)
|
||||
// only players and pets have base stats
|
||||
if (target->IsPlayer() || target->IsPet())
|
||||
{
|
||||
//only pets have base stats
|
||||
if (target->IsPet() && (GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL))
|
||||
target->HandleStatModifier(UNIT_MOD_ARMOR, TOTAL_VALUE, float(GetAmount()), apply);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (int i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
|
||||
for (uint8 i = SPELL_SCHOOL_NORMAL; i < MAX_SPELL_SCHOOL; i++)
|
||||
{
|
||||
if (GetMiscValue() & (1 << i))
|
||||
{
|
||||
target->HandleStatModifier(UnitMods(UNIT_MOD_RESISTANCE_START + i), TOTAL_VALUE, float(GetAmount()), apply);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user