mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 17:05:44 +01:00
[8068] Fixed crash from 33201 and ranks, remove outdated rank case. Author: SeT.
--HG-- branch : trunk
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user