mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
Various Cleanups (game T-Z)
This commit is contained in:
parent
08fd085549
commit
6379a746d7
34 changed files with 2858 additions and 2852 deletions
|
|
@ -20,14 +20,14 @@
|
|||
#include "Log.h"
|
||||
#include "CreatureAI.h"
|
||||
|
||||
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)
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
void TemporarySummon::Update( uint32 update_diff, uint32 diff )
|
||||
void TemporarySummon::Update(uint32 update_diff, uint32 diff)
|
||||
{
|
||||
switch(m_type)
|
||||
switch (m_type)
|
||||
{
|
||||
case TEMPSUMMON_MANUAL_DESPAWN:
|
||||
break;
|
||||
|
|
@ -126,7 +126,7 @@ void TemporarySummon::Update( uint32 update_diff, uint32 diff )
|
|||
return;
|
||||
}
|
||||
|
||||
if (!isInCombat() && isAlive() )
|
||||
if (!isInCombat() && isAlive())
|
||||
{
|
||||
if (m_timer <= update_diff)
|
||||
{
|
||||
|
|
@ -146,7 +146,7 @@ void TemporarySummon::Update( uint32 update_diff, uint32 diff )
|
|||
break;
|
||||
}
|
||||
|
||||
Creature::Update( update_diff, diff );
|
||||
Creature::Update(update_diff, diff);
|
||||
}
|
||||
|
||||
void TemporarySummon::Summon(TempSummonType type, uint32 lifetime)
|
||||
|
|
@ -164,7 +164,7 @@ void TemporarySummon::UnSummon()
|
|||
CombatStop();
|
||||
|
||||
if (GetSummonerGuid().IsCreatureOrVehicle())
|
||||
if(Creature* sum = GetMap()->GetCreature(GetSummonerGuid()))
|
||||
if (Creature* sum = GetMap()->GetCreature(GetSummonerGuid()))
|
||||
if (sum->AI())
|
||||
sum->AI()->SummonedCreatureDespawn(this);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue