diff options
| author | ariel- <ariel-@users.noreply.github.com> | 2017-04-10 12:17:08 -0300 |
|---|---|---|
| committer | ariel- <ariel-@users.noreply.github.com> | 2017-04-10 12:17:08 -0300 |
| commit | 0b50ea072e504ac7d5bf87b08d564955785f7197 (patch) | |
| tree | d0227ad624c3ac7213f47920b65161a82898c33e /src | |
| parent | e565b34f6d24411e210151d0d03e524f94cdff85 (diff) | |
Core/Unit: fix crash on magic school autoattacks
Closes #19436
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index e6535c72509..6646254bc60 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1763,7 +1763,7 @@ float Unit::CalculateAverageResistReduction(SpellSchoolMask schoolMask, Unit con victimResistance = std::max(victimResistance, 0.0f); // level-based resistance does not apply to binary spells, and cannot be overcome by spell penetration - if (!spellInfo->HasAttribute(SPELL_ATTR0_CU_BINARY_SPELL)) + if (!spellInfo || !spellInfo->HasAttribute(SPELL_ATTR0_CU_BINARY_SPELL)) victimResistance += std::max((float(victim->getLevelForTarget(this)) - float(getLevelForTarget(victim))) * 5.0f, 0.0f); static uint32 const BOSS_LEVEL = 83; |
