Core/Spells: Fixed resist calculations for spells with multiple schools. Thx to Shauren for tips
Closes #3875
This commit is contained in:
1 parent
c5e316164f
commit
3569f01adc
4 files changed
+17
-5
No files matched your search
@@ -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