diff options
author | QAston <none@none> | 2009-06-23 14:25:08 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-06-23 14:25:08 +0200 |
commit | cc986dbdf3e191ef132dfa4c229bbc237f30587c (patch) | |
tree | 37f1eca2628f855dab3b63040144ad2fd48e1134 /src/game/Unit.cpp | |
parent | 09a4fdc1c7c5c515f6414834fdafefa38af2a3d6 (diff) |
[8068] Fixed crash from 33201 and ranks, remove outdated rank case. Author: SeT.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
-rw-r--r-- | src/game/Unit.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index bc9923a5226..d310880f3b2 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -1903,6 +1903,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe // Reflect damage spells (not cast any damage spell in aura lookup) uint32 reflectSpell = 0; int32 reflectDamage = 0; + AuraEffect* reflectTriggeredBy = NULL; // expected as not expired at reflect as in current cases uint32 healSpell = 0; int32 healAmount = 0; Unit * healCaster = NULL; @@ -1968,6 +1969,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe else reflectDamage = currentAbsorb / 2; reflectSpell = 33619; + reflectTriggeredBy = *i; break; } if (spellProto->Id == 39228 || // Argussian Compass @@ -2037,13 +2039,13 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe { case 5065: // Rank 1 case 5064: // Rank 2 - case 5063: // Rank 3 { if(RemainingDamage >= currentAbsorb) reflectDamage = (*k)->GetAmount() * currentAbsorb/100; else reflectDamage = (*k)->GetAmount() * RemainingDamage/100; reflectSpell = 33619; + reflectTriggeredBy = *i; } break; } } @@ -2146,7 +2148,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe // Cast back reflect damage spell if (reflectSpell) - pVictim->CastCustomSpell(this, reflectSpell, &reflectDamage, NULL, NULL, true); + pVictim->CastCustomSpell(this, reflectSpell, &reflectDamage, NULL, NULL, true, NULL, reflectTriggeredBy); // absorb by mana cost AuraEffectList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD); |