aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQAston <none@none>2009-05-15 15:33:23 +0200
committerQAston <none@none>2009-05-15 15:33:23 +0200
commitae461a4158d6376e28e7bc53d3f7ad5690a5064e (patch)
treefbd081e218c4ea4c7d05dbbb58cb00f0f34687bc
parent80bec6788c0201ffdac960b299c62f30da10f661 (diff)
*Fix Cheat Death.
--HG-- branch : trunk
-rw-r--r--src/game/Unit.cpp19
1 files changed, 11 insertions, 8 deletions
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;