mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9618] More use ObjectGuid in spell/etc code
This commit is contained in:
parent
21ff192866
commit
b658b25ff8
19 changed files with 117 additions and 122 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue