mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
Core/Spells: Fixed resist calculations for spells with multiple schools. Thx to Shauren for tips
Closes #3875
This commit is contained in:
@@ -971,7 +971,7 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
|
||||
if (!GetHitUnit()->isAlive() || !_targetCount)
|
||||
return;
|
||||
|
||||
float resistance = float(GetHitUnit()->GetResistance(GetFirstSchoolInMask(SpellSchoolMask(GetSpellInfo()->SchoolMask))));
|
||||
float resistance = float(GetHitUnit()->GetResistance(SpellSchoolMask(GetSpellInfo()->SchoolMask)));
|
||||
uint32 minResistFactor = uint32((resistance / (resistance + 510.0f))* 10.0f) * 2;
|
||||
uint32 randomResist = urand(0, (9 - minResistFactor) * 100)/100 + minResistFactor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user