*Fix Cheat Death.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-05-15 15:33:23 +02:00
parent 80bec6788c
commit ae461a4158

View File

@@ -1939,14 +1939,17 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
case SPELLFAMILY_ROGUE:
{
// Cheat Death (make less prio with Guardian Spirit case)
if (!preventDeathSpell && spellProto->SpellIconID == 2109 &&
pVictim->GetTypeId()==TYPEID_PLAYER && // Only players
!((Player*)pVictim)->HasSpellCooldown(31231) &&
// Only if no cooldown
roll_chance_i((*i)->GetAmount()))
// Only if roll
if (spellProto->SpellIconID == 2109)
{
preventDeathSpell = (*i)->GetSpellProto();
if (!preventDeathSpell &&
pVictim->GetTypeId()==TYPEID_PLAYER && // Only players
!((Player*)pVictim)->HasSpellCooldown(31231) &&
// Only if no cooldown
roll_chance_i((*i)->GetAmount()))
// Only if roll
{
preventDeathSpell = (*i)->GetSpellProto();
}
continue;
}
break;