[10476] Fix 31228 and ranks

This commit is contained in:
Laise 2010-09-12 16:51:33 +02:00
parent 84a915e1b1
commit b91f914dbc
3 changed files with 18 additions and 14 deletions

View file

@ -2005,14 +2005,18 @@ void Unit::CalculateDamageAbsorbAndResist(Unit *pCaster, SpellSchoolMask schoolM
case SPELLFAMILY_ROGUE:
{
// Cheat Death (make less prio with Guardian Spirit case)
if (!preventDeathSpell && spellProto->SpellIconID == 2109 &&
GetTypeId()==TYPEID_PLAYER && // Only players
!((Player*)this)->HasSpellCooldown(31231) &&
// Only if no cooldown
roll_chance_i((*i)->GetModifier()->m_amount))
// Only if roll
if (spellProto->SpellIconID == 2109)
{
preventDeathSpell = (*i)->GetSpellProto();
if (!preventDeathSpell &&
GetTypeId()==TYPEID_PLAYER && // Only players
!((Player*)this)->HasSpellCooldown(31231) &&
// Only if no cooldown
roll_chance_i((*i)->GetModifier()->m_amount))
// Only if roll
{
preventDeathSpell = (*i)->GetSpellProto();
}
// always skip this spell in charge dropping, absorb amount calculation since it has chance as m_amount and doesn't need to absorb any damage
continue;
}
break;