mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[8068] Fixed crash from 33201 and ranks, remove outdated rank case.
Signed-off-by: SeT <can15@ngs.ru> (cherry picked from commit e52f1f4e530a435edb156de5083e39b2ef23bbb5) Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
634fda8475
commit
d4017afadd
2 changed files with 7 additions and 5 deletions
|
|
@ -1637,6 +1637,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;
|
||||
Aura* reflectTriggeredBy = NULL; // expected as not expired at reflect as in current cases
|
||||
// Death Prevention Aura
|
||||
SpellEntry const* preventDeathSpell = NULL;
|
||||
int32 preventDeathAmount = 0;
|
||||
|
|
@ -1700,6 +1701,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||
else
|
||||
reflectDamage = currentAbsorb / 2;
|
||||
reflectSpell = 33619;
|
||||
reflectTriggeredBy = *i;
|
||||
break;
|
||||
}
|
||||
if (spellProto->Id == 39228 || // Argussian Compass
|
||||
|
|
@ -1762,15 +1764,15 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
|
|||
{
|
||||
switch((*k)->GetModifier()->m_miscvalue)
|
||||
{
|
||||
case 5065: // Rank 1
|
||||
case 5064: // Rank 2
|
||||
case 5063: // Rank 3
|
||||
case 5065: // Rank 1
|
||||
case 5064: // Rank 2
|
||||
{
|
||||
if(RemainingDamage >= currentAbsorb)
|
||||
reflectDamage = (*k)->GetModifier()->m_amount * currentAbsorb/100;
|
||||
else
|
||||
reflectDamage = (*k)->GetModifier()->m_amount * RemainingDamage/100;
|
||||
reflectSpell = 33619;
|
||||
reflectTriggeredBy = *i;
|
||||
} break;
|
||||
default: break;
|
||||
}
|
||||
|
|
@ -1871,7 +1873,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
|
||||
AuraList const& vManaShield = pVictim->GetAurasByType(SPELL_AURA_MANA_SHIELD);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue