aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp22
-rw-r--r--src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp3
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp14
-rw-r--r--src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp7
-rw-r--r--src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp6
-rw-r--r--src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp4
-rw-r--r--src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp2
-rw-r--r--src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp24
-rw-r--r--src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp11
-rw-r--r--src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp8
14 files changed, 49 insertions, 64 deletions
diff --git a/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
index 68a3f60a197..5ae5921409b 100644
--- a/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
+++ b/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
@@ -228,7 +228,7 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
{
DoScriptText(SAY_DEATH, m_creature);
//When Exarch Maladar is defeated D'ore appear.
- DoSpawnCreature(19412,0,0,0,0, TEMPSUMMON_TIMED_DESPAWN, 600000);
+ m_creature->SummonCreature(19412, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 600000);
}
void UpdateAI(const uint32 diff)
@@ -268,7 +268,7 @@ struct TRINITY_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
soulclass = target->getClass();
DoCast(target,SPELL_STOLEN_SOUL);
- DoSpawnCreature(ENTRY_STOLEN_SOUL,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000);
+ m_creature->SummonCreature(ENTRY_STOLEN_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 10000);
StolenSoul_Timer = 20000 + rand()% 10000;
} else StolenSoul_Timer = 1000;
diff --git a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
index 466417eef3e..4382be2c8ca 100644
--- a/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
+++ b/src/bindings/scripts/scripts/zone/black_temple/boss_teron_gorefiend.cpp
@@ -227,23 +227,11 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
void EnterCombat(Unit *who) {}
- void MoveInLineOfSight(Unit *who)
+ void MoveInLineOfSight(Unit* pWho)
{
- if(!who || (!who->isAlive())) return;
-
- if(who->isTargetableForAttack() && who->isInAccessiblePlaceFor(m_creature) && m_creature->IsHostileTo(who))
+ if (!Intro && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isTargetableForAttack() && m_creature->IsHostileTo(pWho) && pWho->isInAccessiblePlaceFor(m_creature))
{
- float attackRadius = m_creature->GetAttackDistance(who);
-
- if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who))
- {
- //if(who->HasStealthAura())
- // who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH);
-
- m_creature->AddThreat(who, 1.0f);
- }
-
- if(!m_creature->isInCombat() && !Intro && m_creature->IsWithinDistInMap(who, 60.0f) && (who->GetTypeId() == TYPEID_PLAYER))
+ if (m_creature->IsWithinDistInMap(pWho, VISIBLE_RANGE) && m_creature->IsWithinLOSInMap(pWho))
{
if(pInstance)
pInstance->SetData(DATA_TERONGOREFIENDEVENT, IN_PROGRESS);
@@ -252,10 +240,12 @@ struct TRINITY_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
DoScriptText(SAY_INTRO, m_creature);
m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK);
- AggroTargetGUID = who->GetGUID();
+ AggroTargetGUID = pWho->GetGUID();
Intro = true;
}
}
+
+ ScriptedAI::MoveInLineOfSight(pWho);
}
void KilledUnit(Unit *victim)
diff --git a/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp b/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
index 42104776d6c..b13330d4bd6 100644
--- a/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
+++ b/src/bindings/scripts/scripts/zone/bloodmyst_isle/bloodmyst_isle.cpp
@@ -65,7 +65,7 @@ struct TRINITY_DLL_DECL mob_webbed_creatureAI : public ScriptedAI
}
if(spawnCreatureID)
- DoSpawnCreature(spawnCreatureID,0,0,0,m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+ m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
}
};
CreatureAI* GetAI_mob_webbed_creature(Creature *_Creature)
diff --git a/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp b/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
index 8a1e991a6e6..7357789a5aa 100644
--- a/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
+++ b/src/bindings/scripts/scripts/zone/eastern_plaguelands/eastern_plaguelands.cpp
@@ -45,7 +45,7 @@ struct TRINITY_DLL_DECL mobs_ghoul_flayerAI : public ScriptedAI
void JustDied(Unit* Killer)
{
if( Killer->GetTypeId() == TYPEID_PLAYER )
- DoSpawnCreature(11064, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
+ m_creature->SummonCreature(11064, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 60000);
}
};
diff --git a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
index 3bb9ccbd0e2..f08c822a19f 100644
--- a/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
+++ b/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
@@ -215,8 +215,8 @@ struct TRINITY_DLL_DECL boss_warbringer_omroggAI : public ScriptedAI
void EnterCombat(Unit *who)
{
- DoSpawnCreature(NPC_LEFT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,90000);
- DoSpawnCreature(NPC_RIGHT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,90000);
+ m_creature->SummonCreature(NPC_LEFT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
+ m_creature->SummonCreature(NPC_RIGHT_HEAD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0);
if (Unit *pLeftHead = Unit::GetUnit(*m_creature,LeftHeadGUID))
{
diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
index 7877dcbe686..b02e373d953 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/boss_midnight.cpp
@@ -81,8 +81,7 @@ struct TRINITY_DLL_DECL boss_midnightAI : public ScriptedAI
if(Phase == 1 && (m_creature->GetHealth()*100)/m_creature->GetMaxHealth() < 95)
{
Phase = 2;
- Creature *pAttumen = DoSpawnCreature(SUMMON_ATTUMEN, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000);
- if(pAttumen)
+ if (Creature* pAttumen = m_creature->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000))
{
Attumen = pAttumen->GetGUID();
pAttumen->AI()->AttackStart(m_creature->getVictim());
diff --git a/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp b/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
index 269295361e4..f94d0bf05b5 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/boss_shade_of_aran.cpp
@@ -415,12 +415,10 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
else
DoScriptText(SAY_BLIZZARD2, m_creature);
- Creature* Spawn = NULL;
- Spawn = DoSpawnCreature(CREATURE_ARAN_BLIZZARD, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 25000);
- if (Spawn)
+ if (Creature* pSpawn = m_creature->SummonCreature(CREATURE_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000))
{
- Spawn->setFaction(m_creature->getFaction());
- Spawn->CastSpell(Spawn, SPELL_CIRCULAR_BLIZZARD, false);
+ pSpawn->setFaction(m_creature->getFaction());
+ pSpawn->CastSpell(pSpawn, SPELL_CIRCULAR_BLIZZARD, false);
}
break;
}
@@ -434,8 +432,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
for (uint32 i = 0; i < 4; i++)
{
- Creature* pUnit = DoSpawnCreature(CREATURE_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 90000);
- if (pUnit)
+ if (Creature* pUnit = m_creature->SummonCreature(CREATURE_WATER_ELEMENTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 90000))
{
pUnit->Attack(m_creature->getVictim(), true);
pUnit->setFaction(m_creature->getFaction());
@@ -449,8 +446,7 @@ struct TRINITY_DLL_DECL boss_aranAI : public ScriptedAI
{
for (uint32 i = 0; i < 5; i++)
{
- Creature* pUnit = DoSpawnCreature(CREATURE_SHADOW_OF_ARAN, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
- if (pUnit)
+ if (Creature* pUnit = m_creature->SummonCreature(CREATURE_SHADOW_OF_ARAN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000))
{
pUnit->Attack(m_creature->getVictim(), true);
pUnit->setFaction(m_creature->getFaction());
diff --git a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
index 510ff2f2b81..55933b8854b 100644
--- a/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
+++ b/src/bindings/scripts/scripts/zone/karazhan/bosses_opera.cpp
@@ -243,12 +243,11 @@ struct TRINITY_DLL_DECL mob_titoAI : public ScriptedAI
void boss_dorotheeAI::SummonTito()
{
- Creature* Tito = DoSpawnCreature(CREATURE_TITO, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
- if(Tito)
+ if (Creature* pTito = m_creature->SummonCreature(CREATURE_TITO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
{
DoScriptText(SAY_DOROTHEE_SUMMON, m_creature);
- CAST_AI(mob_titoAI, Tito->AI())->DorotheeGUID = m_creature->GetGUID();
- Tito->AI()->AttackStart(m_creature->getVictim());
+ CAST_AI(mob_titoAI, pTito->AI())->DorotheeGUID = m_creature->GetGUID();
+ pTito->AI()->AttackStart(m_creature->getVictim());
SummonedTito = true;
TitoDied = false;
}
diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
index b34e7124371..7d576989055 100644
--- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
+++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_felblood_kaelthas.cpp
@@ -511,7 +511,7 @@ struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI
void JustDied(Unit* slayer)
{
- DoSpawnCreature(CREATURE_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
+ m_creature->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
}
void UpdateAI(const uint32 diff)
@@ -531,7 +531,7 @@ struct TRINITY_DLL_DECL mob_felkael_phoenixAI : public ScriptedAI
if (Death_Timer < diff)
{
- DoSpawnCreature(CREATURE_PHOENIX_EGG, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
+ m_creature->SummonCreature(CREATURE_PHOENIX_EGG, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45000);
m_creature->setDeathState(JUST_DIED);
m_creature->RemoveCorpse();
Rebirth = false;
@@ -576,7 +576,7 @@ struct TRINITY_DLL_DECL mob_felkael_phoenix_eggAI : public ScriptedAI
{
if (HatchTimer < diff)
{
- DoSpawnCreature(CREATURE_PHOENIX, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
+ m_creature->SummonCreature(CREATURE_PHOENIX, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
m_creature->DealDamage(m_creature, m_creature->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
}else HatchTimer -= diff;
diff --git a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
index 352b8563732..9f79c07d2ef 100644
--- a/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
+++ b/src/bindings/scripts/scripts/zone/magisters_terrace/boss_vexallus.cpp
@@ -143,10 +143,10 @@ struct TRINITY_DLL_DECL boss_vexallusAI : public ScriptedAI
m_creature->CastSpell(m_creature,SPELL_SUMMON_PURE_ENERGY,false);
//below are workaround summons, remove when summoning spells w/implicitTarget 73 implemented in Mangos
- DoSpawnCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ m_creature->SummonCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
if (Heroic)
- DoSpawnCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
+ m_creature->SummonCreature(NPC_PURE_ENERGY, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0);
}
if (ChainLightningTimer < diff)
diff --git a/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp b/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
index 7bbc3b91e98..ea64fd8d738 100644
--- a/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
+++ b/src/bindings/scripts/scripts/zone/stratholme/stratholme.cpp
@@ -147,7 +147,7 @@ struct TRINITY_DLL_DECL mob_restless_soulAI : public ScriptedAI
void JustDied(Unit* Killer)
{
if (Tagged)
- DoSpawnCreature(ENTRY_FREED, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 300000);
+ m_creature->SummonCreature(ENTRY_FREED, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
}
void UpdateAI(const uint32 diff)
diff --git a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
index 695c347a554..923612d2fe0 100644
--- a/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
+++ b/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp
@@ -913,8 +913,8 @@ struct TRINITY_DLL_DECL eye_tentacleAI : public Scripted_NoMovementAI
{
eye_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
{
- if (Unit* p = DoSpawnCreature(MOB_SMALL_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0))
- Portal = p->GetGUID();
+ if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ Portal = pPortal->GetGUID();
}
uint32 MindflayTimer;
@@ -972,8 +972,8 @@ struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI
{
claw_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
{
- if (Unit* p = DoSpawnCreature(MOB_SMALL_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0))
- Portal = p->GetGUID();
+ if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ Portal = pPortal->GetGUID();
}
uint32 GroundRuptureTimer;
@@ -1026,8 +1026,8 @@ struct TRINITY_DLL_DECL claw_tentacleAI : public Scripted_NoMovementAI
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
{
m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
- if (Unit* p = DoSpawnCreature(MOB_SMALL_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0))
- Portal = p->GetGUID();
+ if (Unit* pPortal = m_creature->SummonCreature(MOB_SMALL_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ Portal = pPortal->GetGUID();
GroundRuptureTimer = 500;
HamstringTimer = 2000;
@@ -1061,8 +1061,8 @@ struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI
{
giant_claw_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
{
- if (Unit* p = DoSpawnCreature(MOB_GIANT_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0))
- Portal = p->GetGUID();
+ if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ Portal = pPortal->GetGUID();
}
uint32 GroundRuptureTimer;
@@ -1117,8 +1117,8 @@ struct TRINITY_DLL_DECL giant_claw_tentacleAI : public Scripted_NoMovementAI
if (!target->HasAura(SPELL_DIGESTIVE_ACID))
{
m_creature->GetMap()->CreatureRelocation(m_creature, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0);
- if (Unit* p = DoSpawnCreature(MOB_GIANT_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0))
- Portal = p->GetGUID();
+ if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ Portal = pPortal->GetGUID();
GroundRuptureTimer = 500;
HamstringTimer = 2000;
@@ -1160,8 +1160,8 @@ struct TRINITY_DLL_DECL giant_eye_tentacleAI : public Scripted_NoMovementAI
{
giant_eye_tentacleAI(Creature *c) : Scripted_NoMovementAI(c)
{
- if (Unit* p = DoSpawnCreature(MOB_GIANT_PORTAL,0,0,0,0,TEMPSUMMON_CORPSE_DESPAWN, 0))
- Portal = p->GetGUID();
+ if (Unit* pPortal = m_creature->SummonCreature(MOB_GIANT_PORTAL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 0))
+ Portal = pPortal->GetGUID();
}
uint32 BeamTimer;
diff --git a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
index 4fb92eac739..d54db15dac5 100644
--- a/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
+++ b/src/bindings/scripts/scripts/zone/terokkar_forest/terokkar_forest.cpp
@@ -219,14 +219,15 @@ struct TRINITY_DLL_DECL mob_netherweb_victimAI : public ScriptedAI
{
if( rand()%100 < 25 )
{
- DoSpawnCreature(QUEST_TARGET,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,60000);
+ m_creature->SummonCreature(QUEST_TARGET, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
CAST_PLR(Killer)->KilledMonsterCredit(QUEST_TARGET, m_creature->GetGUID());
- }else
- DoSpawnCreature(netherwebVictims[rand()%6],0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,60000);
+ }
+ else
+ m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
if( rand()%100 < 75 )
- DoSpawnCreature(netherwebVictims[rand()%6],0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,60000);
- DoSpawnCreature(netherwebVictims[rand()%6],0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,60000);
+ m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f,0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
+ m_creature->SummonCreature(netherwebVictims[rand()%6], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000);
}
}
}
diff --git a/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp b/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
index c6518d5f131..533480d1f6f 100644
--- a/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
+++ b/src/bindings/scripts/scripts/zone/western_plaguelands/western_plaguelands.cpp
@@ -167,7 +167,7 @@ struct TRINITY_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI
if( CAST_PLR(who)->GetQuestStatus(5216) == QUEST_STATUS_INCOMPLETE ||
CAST_PLR(who)->GetQuestStatus(5229) == QUEST_STATUS_INCOMPLETE )
{
- DoSpawnCreature(11075,0,0,0,m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
+ m_creature->SummonCreature(11075, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
DoDie();
}
break;
@@ -175,7 +175,7 @@ struct TRINITY_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI
if( CAST_PLR(who)->GetQuestStatus(5219) == QUEST_STATUS_INCOMPLETE ||
CAST_PLR(who)->GetQuestStatus(5231) == QUEST_STATUS_INCOMPLETE )
{
- DoSpawnCreature(11077,0,0,0,m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
+ m_creature->SummonCreature(11077, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 600000);
DoDie();
}
break;
@@ -183,7 +183,7 @@ struct TRINITY_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI
if( CAST_PLR(who)->GetQuestStatus(5225) == QUEST_STATUS_INCOMPLETE ||
CAST_PLR(who)->GetQuestStatus(5235) == QUEST_STATUS_INCOMPLETE )
{
- DoSpawnCreature(11078,0,0,0,m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
+ m_creature->SummonCreature(11078, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
DoDie();
}
break;
@@ -191,7 +191,7 @@ struct TRINITY_DLL_DECL npc_the_scourge_cauldronAI : public ScriptedAI
if( CAST_PLR(who)->GetQuestStatus(5222) == QUEST_STATUS_INCOMPLETE ||
CAST_PLR(who)->GetQuestStatus(5233) == QUEST_STATUS_INCOMPLETE )
{
- DoSpawnCreature(11076,0,0,0,m_creature->GetOrientation(),TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
+ m_creature->SummonCreature(11076, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,600000);
DoDie();
}
break;