[8068] Fixed crash from 33201 and ranks, remove outdated rank case. Author: SeT.
--HG-- branch : trunk
This commit is contained in:
+4
-2
@@ -1903,6 +1903,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||||||
// Reflect damage spells (not cast any damage spell in aura lookup)
|
// Reflect damage spells (not cast any damage spell in aura lookup)
|
||||||
uint32 reflectSpell = 0;
|
uint32 reflectSpell = 0;
|
||||||
int32 reflectDamage = 0;
|
int32 reflectDamage = 0;
|
||||||
|
AuraEffect* reflectTriggeredBy = NULL; // expected as not expired at reflect as in current cases
|
||||||
uint32 healSpell = 0;
|
uint32 healSpell = 0;
|
||||||
int32 healAmount = 0;
|
int32 healAmount = 0;
|
||||||
Unit * healCaster = NULL;
|
Unit * healCaster = NULL;
|
||||||
@@ -1968,6 +1969,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||||||
else
|
else
|
||||||
reflectDamage = currentAbsorb / 2;
|
reflectDamage = currentAbsorb / 2;
|
||||||
reflectSpell = 33619;
|
reflectSpell = 33619;
|
||||||
|
reflectTriggeredBy = *i;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (spellProto->Id == 39228 || // Argussian Compass
|
if (spellProto->Id == 39228 || // Argussian Compass
|
||||||
@@ -2037,13 +2039,13 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||||||
{
|
{
|
||||||
case 5065: // Rank 1
|
case 5065: // Rank 1
|
||||||
case 5064: // Rank 2
|
case 5064: // Rank 2
|
||||||
case 5063: // Rank 3
|
|
||||||
{
|
{
|
||||||
if(RemainingDamage >= currentAbsorb)
|
if(RemainingDamage >= currentAbsorb)
|
||||||
reflectDamage = (*k)->GetAmount() * currentAbsorb/100;
|
reflectDamage = (*k)->GetAmount() * currentAbsorb/100;
|
||||||
else
|
else
|
||||||
reflectDamage = (*k)->GetAmount() * RemainingDamage/100;
|
reflectDamage = (*k)->GetAmount() * RemainingDamage/100;
|
||||||
reflectSpell = 33619;
|
reflectSpell = 33619;
|
||||||
|
reflectTriggeredBy = *i;
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2146,7 +2148,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||||||
|
|
||||||
// Cast back reflect damage spell
|
// Cast back reflect damage spell
|
||||||
if (reflectSpell)
|
if (reflectSpell)
|
||||||
pVictim->CastCustomSpell(this, reflectSpell, &reflectDamage, NULL, NULL, true);
|
pVictim->CastCustomSpell(this, reflectSpell, &reflectDamage, NULL, NULL, true, NULL, reflectTriggeredBy);
|
||||||
|
|
||||||
// absorb by mana cost
|
// absorb by mana cost
|
||||||
AuraEffectList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
AuraEffectList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
||||||
|
|||||||
Reference in New Issue
Block a user