[9618] More use ObjectGuid in spell/etc code

This commit is contained in:
VladimirMangos 2010-03-25 11:55:30 +03:00
parent 21ff192866
commit b658b25ff8
19 changed files with 117 additions and 122 deletions

View file

@ -21,7 +21,7 @@
#include "ObjectAccessor.h"
#include "CreatureAI.h"
TemporarySummon::TemporarySummon( uint64 summoner ) :
TemporarySummon::TemporarySummon( ObjectGuid summoner ) :
Creature(CREATURE_SUBTYPE_TEMPORARY_SUMMON), m_type(TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN), m_timer(0), m_lifetime(0), m_summoner(summoner)
{
}
@ -165,8 +165,8 @@ void TemporarySummon::UnSummon()
{
CombatStop();
if (IS_CREATURE_GUID(GetSummonerGUID()))
if(Creature* sum = GetMap()->GetCreature(GetSummonerGUID()))
if (GetSummonerGuid().IsCreature())
if(Creature* sum = GetMap()->GetCreature(GetSummonerGuid()))
if (sum->AI())
sum->AI()->SummonedCreatureDespawn(this);