From ae461a4158d6376e28e7bc53d3f7ad5690a5064e Mon Sep 17 00:00:00 2001 From: QAston Date: Fri, 15 May 2009 15:33:23 +0200 Subject: *Fix Cheat Death. --HG-- branch : trunk --- src/game/Unit.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 514a26349ba..bb2f8e98f4b 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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 - { - preventDeathSpell = (*i)->GetSpellProto(); + if (spellProto->SpellIconID == 2109) + { + 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; -- cgit v1.2.3