* Implemented new summon possessed summon type for spell 49352.

* Unsummon all summon possessed units on summoning aura cancel.

--HG--
branch : trunk
This commit is contained in:
gvcoman
2008-11-17 18:57:16 -05:00
parent 4cd86b2ed5
commit 868c2ef175
5 changed files with 12 additions and 10 deletions

View File

@@ -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
};

View File

@@ -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:
{

View File

@@ -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

View File

@@ -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:

View File

@@ -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();
}
}
}