From c3f2a6be77a444bbcef78f95756757500f570c84 Mon Sep 17 00:00:00 2001 From: crackm Date: Tue, 8 Mar 2011 10:22:44 +0100 Subject: [PATCH] [11230] Add dummy effect of spell 42793 Signed-off-by: NoFantasy --- src/game/SpellEffects.cpp | 21 +++++++++++++++++++++ src/shared/revision_nr.h | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 0947bbe22..fc25bdc92 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1300,6 +1300,27 @@ void Spell::EffectDummy(SpellEffectIndex eff_idx) return; } + case 42793: // Burn Body + { + if (!unitTarget || unitTarget->GetTypeId() != TYPEID_UNIT || m_caster->GetTypeId() != TYPEID_PLAYER) + return; + + Creature* pCreature = (Creature*)unitTarget; + + // Spell can be used in combat and may affect different target than the expected. + // If target is not the expected we need to prevent this effect. + if (!pCreature->GetLootRecipientGuid().IsEmpty() || pCreature->isInCombat()) + return; + + // set loot recipient, prevent re-use same target + pCreature->SetLootRecipient(m_caster); + + pCreature->ForcedDespawn(GetSpellDuration(m_spellInfo)); + + // EFFECT_INDEX_2 has 0 miscvalue for effect 134, doing the killcredit here instead (only one known case exist where 0) + ((Player*)m_caster)->KilledMonster(pCreature->GetCreatureInfo(), pCreature->GetObjectGuid()); + return; + } case 43036: // Dismembering Corpse { if (!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a2845193e..cfae53ccc 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11229" + #define REVISION_NR "11230" #endif // __REVISION_NR_H__