diff options
| author | QAston <none@none> | 2009-06-22 23:30:17 +0200 |
|---|---|---|
| committer | QAston <none@none> | 2009-06-22 23:30:17 +0200 |
| commit | e6d20d57deba02dbbce70ccb03bf6cd3a393a016 (patch) | |
| tree | 159d555d90476d97bc08ee0367c88332f414095c /src/game/SpellEffects.cpp | |
| parent | 8533946ac1b6548d21492b3f1ec41b60a73a5bd2 (diff) | |
*Fix Death Pact and Corpse Explosion - original patch by Astellar, thanks for help in conversion for Azrael.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellEffects.cpp')
| -rw-r--r-- | src/game/SpellEffects.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 6d1c986d7b2..08f833d0b6f 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1950,6 +1950,29 @@ void Spell::EffectDummy(uint32 i) spell_id = m_currentBasePoints[0]; } + // Corpse Explosion + else if(m_spellInfo->SpellIconID == 1737) + { + // Dummy effect 1 is used only for targeting and damage amount + if (i!=0) + return; + int32 bp = 0; + // Living ghoul as a target + if (unitTarget->isAlive()) + { + bp = unitTarget->GetMaxHealth()*0.25f; + } + // Some corpse + else + { + bp = damage; + } + m_caster->CastCustomSpell(unitTarget,m_spellInfo->CalculateSimpleValue(1),&bp,NULL,NULL,true); + // Suicide + unitTarget->CastCustomSpell(unitTarget,43999,&bp,NULL,NULL,true); + // Set corpse look + unitTarget->SetDisplayId(25537+urand(0,3)); + } break; } @@ -2635,6 +2658,11 @@ void Spell::SpellDamageHeal(uint32 /*i*/) unitTarget->RemoveAura(aurEff->GetParentAura()); } } + // Death Pact - return pct of max health to caster + else if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && m_spellInfo->SpellFamilyFlags[0] & 0x00080000) + { + addhealth = int32(caster->GetMaxHealth()*damage/100.0f); + } else addhealth = caster->SpellHealingBonus(unitTarget, m_spellInfo, addhealth, HEAL); |
