diff options
author | gvcoman <none@none> | 2008-11-17 18:57:16 -0500 |
---|---|---|
committer | gvcoman <none@none> | 2008-11-17 18:57:16 -0500 |
commit | 868c2ef17592a047d48bdf618328eadf15aa9372 (patch) | |
tree | 2e9d58b9b8643ecfb5de1873ca415b2d9b2a99bc /src | |
parent | 4cd86b2ed5fd320dd1adbbd64338513ef0d4a001 (diff) |
* Implemented new summon possessed summon type for spell 49352.
* Unsummon all summon possessed units on summoning aura cancel.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SharedDefines.h | 2 | ||||
-rw-r--r-- | src/game/Spell.cpp | 1 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 8 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 2 | ||||
-rw-r--r-- | src/game/SpellHandler.cpp | 9 |
5 files changed, 12 insertions, 10 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 481598f71ea..dd097c68bcb 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -2069,7 +2069,7 @@ enum SummonType SUMMON_TYPE_CRITTER2 = 407, SUMMON_TYPE_CRITTER3 = 307, SUMMON_TYPE_UNKNOWN5 = 409, - SUMMON_TYPE_UNKNOWN2 = 427, + SUMMON_TYPE_POSESSED3 = 427, SUMMON_TYPE_POSESSED2 = 428 }; diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index c3670686679..eae232085ed 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -3863,6 +3863,7 @@ uint8 Spell::CanCast(bool strict) { case SUMMON_TYPE_POSESSED: case SUMMON_TYPE_POSESSED2: + case SUMMON_TYPE_POSESSED3: case SUMMON_TYPE_DEMON: case SUMMON_TYPE_SUMMON: { diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 37c02fb549d..3548c19e6bc 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -49,7 +49,6 @@ #include "GridNotifiers.h" #include "GridNotifiersImpl.h" #include "CellImpl.h" -#include "TemporarySummon.h" #define NULL_AURA_SLOT 0xFF @@ -2014,13 +2013,6 @@ void Aura::HandleAuraDummy(bool apply, bool Real) m_target->CastSpell(m_target,47287,true,NULL,this); return; } - - // Eye of Kilrogg, unsummon eye when aura is gone - if(GetId() == 126 && caster->GetTypeId() == TYPEID_PLAYER && caster->GetCharm()) - { - ((TemporarySummon*)caster->GetCharm())->UnSummon(); - return; - } } // AT APPLY & REMOVE diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index f32a89db2b4..9789200939b 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -3136,6 +3136,7 @@ void Spell::EffectSummonType(uint32 i) break; case SUMMON_TYPE_POSESSED: case SUMMON_TYPE_POSESSED2: + case SUMMON_TYPE_POSESSED3: EffectSummonPossessed(i); break; case SUMMON_TYPE_WILD: @@ -3160,7 +3161,6 @@ void Spell::EffectSummonType(uint32 i) EffectSummonTotem(i); break; case SUMMON_TYPE_UNKNOWN1: - case SUMMON_TYPE_UNKNOWN2: case SUMMON_TYPE_UNKNOWN3: case SUMMON_TYPE_UNKNOWN4: case SUMMON_TYPE_UNKNOWN5: diff --git a/src/game/SpellHandler.cpp b/src/game/SpellHandler.cpp index 3ed9c04a259..868ba1d0ff8 100644 --- a/src/game/SpellHandler.cpp +++ b/src/game/SpellHandler.cpp @@ -33,6 +33,7 @@ #include "MapManager.h" #include "ScriptCalls.h" #include "Totem.h" +#include "TemporarySummon.h" void WorldSession::HandleUseItemOpcode(WorldPacket& recvPacket) { @@ -370,6 +371,14 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket) ((Unit*)_player->GetFarsightTarget())->RemoveAurasDueToSpellByCancel(spellId); return; } + else if (spellInfo->Effect[i] == SPELL_EFFECT_SUMMON && + (spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED || + spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED2 || + spellInfo->EffectMiscValueB[i] == SUMMON_TYPE_POSESSED3)) + { + // Possession is removed in the UnSummon function + ((TemporarySummon*)caster->GetCharm())->UnSummon(); + } } } |