mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Core/ScriptedAI: std::chrono-ify DoSpawnCreature
(cherry picked from commit f5076112cb)
This commit is contained in:
@@ -282,9 +282,9 @@ void ScriptedAI::ForceCombatStopForCreatureEntry(std::vector<uint32> creatureEnt
|
||||
ForceCombatStopForCreatureEntry(entry, maxSearchRange, samePhase, reset);
|
||||
}
|
||||
|
||||
Creature* ScriptedAI::DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime)
|
||||
Creature* ScriptedAI::DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime)
|
||||
{
|
||||
return me->SummonCreature(entry, me->GetPositionX() + offsetX, me->GetPositionY() + offsetY, me->GetPositionZ() + offsetZ, angle, TempSummonType(type), despawntime);
|
||||
return me->SummonCreature(entry, me->GetPositionX() + offsetX, me->GetPositionY() + offsetY, me->GetPositionZ() + offsetZ, angle, TempSummonType(type), despawntime.count());
|
||||
}
|
||||
|
||||
bool ScriptedAI::HealthBelowPct(uint32 pct) const
|
||||
|
||||
@@ -218,7 +218,7 @@ struct TC_GAME_API ScriptedAI : public CreatureAI
|
||||
Player* GetPlayerAtMinimumRange(float minRange);
|
||||
|
||||
// Spawns a creature relative to me
|
||||
Creature* DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, uint32 despawntime);
|
||||
Creature* DoSpawnCreature(uint32 entry, float offsetX, float offsetY, float offsetZ, float angle, uint32 type, Milliseconds despawntime);
|
||||
|
||||
bool HealthBelowPct(uint32 pct) const;
|
||||
bool HealthAbovePct(uint32 pct) const;
|
||||
|
||||
@@ -52,7 +52,7 @@ class boss_ambassador_flamelash : public CreatureScript
|
||||
|
||||
void SummonSpirit(Unit* victim)
|
||||
{
|
||||
if (Creature* spirit = DoSpawnCreature(9178, frand(-9, 9), frand(-9, 9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000))
|
||||
if (Creature* spirit = DoSpawnCreature(9178, frand(-9, 9), frand(-9, 9), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60s))
|
||||
spirit->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -75,13 +75,13 @@ class boss_general_angerforge : public CreatureScript
|
||||
|
||||
void SummonAdd(Unit* victim)
|
||||
{
|
||||
if (Creature* SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature* SummonedAdd = DoSpawnCreature(8901, float(irand(-14, 14)), float(irand(-14, 14)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120s))
|
||||
SummonedAdd->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
void SummonMedic(Unit* victim)
|
||||
{
|
||||
if (Creature* SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120000))
|
||||
if (Creature* SummonedMedic = DoSpawnCreature(8894, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 120s))
|
||||
SummonedMedic->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -727,7 +727,7 @@ public:
|
||||
|
||||
if (CycloneTimer <= diff)
|
||||
{
|
||||
if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0, 9)), float(urand(0, 9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000))
|
||||
if (Creature* Cyclone = DoSpawnCreature(CREATURE_CYCLONE, float(urand(0, 9)), float(urand(0, 9)), 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15s))
|
||||
Cyclone->CastSpell(Cyclone, SPELL_CYCLONE_VISUAL, true);
|
||||
CycloneTimer = 30000;
|
||||
} else CycloneTimer -= diff;
|
||||
|
||||
@@ -387,7 +387,7 @@ struct npc_head : public ScriptedAI
|
||||
|
||||
DoPlaySoundToSet(me, Trinity::Containers::SelectRandomContainerElement(HeadlessHorsemanRandomLaughSound));
|
||||
|
||||
if (Creature* speaker = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 1 * IN_MILLISECONDS))
|
||||
if (Creature* speaker = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 1s))
|
||||
speaker->CastSpell(speaker, SPELL_HEADLESS_HORSEMAN___SPEAKS, false);
|
||||
}
|
||||
}
|
||||
@@ -423,7 +423,7 @@ private:
|
||||
Talk(entry);
|
||||
_laughTimer.Reset(3 * IN_MILLISECONDS);
|
||||
|
||||
if (Creature* speaker = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 1 * IN_MILLISECONDS))
|
||||
if (Creature* speaker = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 1s))
|
||||
speaker->CastSpell(speaker, SPELL_HEADLESS_HORSEMAN___SPEAKS, false);
|
||||
}
|
||||
|
||||
@@ -626,9 +626,9 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
DoTalk(SAY_DEATH);
|
||||
if (Creature* flame = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 60 * IN_MILLISECONDS))
|
||||
if (Creature* flame = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 60s))
|
||||
flame->CastSpell(flame, SPELL_HEADLESS_HORSEMAN___FIRE);
|
||||
if (Creature* wisp = DoSpawnCreature(NPC_WISP_INVIS, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 60 * IN_MILLISECONDS))
|
||||
if (Creature* wisp = DoSpawnCreature(NPC_WISP_INVIS, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_DESPAWN, 60s))
|
||||
wisp->AI()->SetData(DATA_INVIS_WISP_CREATURE_TYPE, INVIS_WISP_CREATURE_TYPE_BLUE);
|
||||
|
||||
_instance->SetBossState(DATA_HORSEMAN_EVENT, DONE);
|
||||
@@ -733,7 +733,7 @@ struct boss_headless_horseman : public ScriptedAI
|
||||
Creature* head = nullptr;
|
||||
if (!_headGUID)
|
||||
{
|
||||
if (Creature* newHead = DoSpawnCreature(NPC_HEADLESS_HORSEMAN_HEAD, frand(0.f, 5.f), frand(0.f, 5.f), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0))
|
||||
if (Creature* newHead = DoSpawnCreature(NPC_HEADLESS_HORSEMAN_HEAD, frand(0.f, 5.f), frand(0.f, 5.f), 0, 0, TEMPSUMMON_DEAD_DESPAWN, 0s))
|
||||
{
|
||||
_headGUID = newHead->GetGUID();
|
||||
head = newHead;
|
||||
@@ -827,7 +827,7 @@ struct npc_pulsing_pumpkin : public ScriptedAI
|
||||
|
||||
Despawn();
|
||||
|
||||
Creature* debuff = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14 * IN_MILLISECONDS + 500);
|
||||
Creature* debuff = DoSpawnCreature(NPC_HELPER, 0.f, 0.f, 0.f, 0.f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 14500ms);
|
||||
if (debuff)
|
||||
{
|
||||
debuff->SetDisplayId(me->GetDisplayId());
|
||||
|
||||
@@ -84,7 +84,7 @@ public:
|
||||
|
||||
void RaiseUndeadScarab(Unit* victim)
|
||||
{
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180000))
|
||||
if (Creature* pUndeadScarab = DoSpawnCreature(10876, float(irand(-9, 9)), float(irand(-9, 9)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 180s))
|
||||
if (pUndeadScarab->AI())
|
||||
pUndeadScarab->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@ public:
|
||||
for (uint8 i = 0; i<3; ++i)
|
||||
{
|
||||
target = SelectTarget(SelectTargetMethod::Random, 0);
|
||||
temp = DoSpawnCreature(NPC_SHADOW_IMAGE, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 10000);
|
||||
temp = DoSpawnCreature(NPC_SHADOW_IMAGE, 0, 0, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 10s);
|
||||
if (temp && target)
|
||||
{
|
||||
AddThreat(target, 1000000.0f, temp); //don't change target(healers)
|
||||
|
||||
@@ -494,7 +494,7 @@ public:
|
||||
for (uint8 i = 0; i < 3; ++i)
|
||||
me->SummonCreature(NPC_HAND_OF_THE_DECEIVER, DeceiverLocations[i], TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
|
||||
DoSpawnCreature(NPC_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0);
|
||||
DoSpawnCreature(NPC_ANVEENA, 0, 0, 40, 0, TEMPSUMMON_DEAD_DESPAWN, 0s);
|
||||
DoCast(me, SPELL_ANVEENA_ENERGY_DRAIN);
|
||||
bSummonedDeceivers = true;
|
||||
}
|
||||
@@ -503,7 +503,7 @@ public:
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_ANVEENA_ENERGY_DRAIN);
|
||||
phase = PHASE_NORMAL;
|
||||
DoSpawnCreature(NPC_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0);
|
||||
DoSpawnCreature(NPC_KILJAEDEN, 0, 0, 0, 0, TEMPSUMMON_MANUAL_DESPAWN, 0s);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -995,7 +995,7 @@ public:
|
||||
// Felfire Portal - Creatres a portal, that spawns Volatile Felfire Fiends, which do suicide bombing.
|
||||
if (FelfirePortalTimer <= diff)
|
||||
{
|
||||
if (Creature* pPortal = DoSpawnCreature(NPC_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20000))
|
||||
if (Creature* pPortal = DoSpawnCreature(NPC_FELFIRE_PORTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 20s))
|
||||
for (ThreatReference const* ref : me->GetThreatManager().GetUnsortedThreatList())
|
||||
AddThreat(ref->GetVictim(), 1.0f, pPortal);
|
||||
FelfirePortalTimer = 20000;
|
||||
@@ -1056,7 +1056,7 @@ public:
|
||||
|
||||
if (uiSpawnFiendTimer <= diff)
|
||||
{
|
||||
if (Creature* pFiend = DoSpawnCreature(NPC_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20000))
|
||||
if (Creature* pFiend = DoSpawnCreature(NPC_VOLATILE_FELFIRE_FIEND, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 20s))
|
||||
AddThreat(SelectTarget(SelectTargetMethod::Random, 0), 100000.0f, pFiend);
|
||||
uiSpawnFiendTimer = urand(4000, 8000);
|
||||
} else uiSpawnFiendTimer -= diff;
|
||||
|
||||
@@ -387,7 +387,7 @@ public:
|
||||
events.ScheduleEvent(EVENT_DISTANCE_CHECK, 5s);
|
||||
break;
|
||||
case EVENT_SUMMON_WHISP:
|
||||
DoSpawnCreature(NPC_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000);
|
||||
DoSpawnCreature(NPC_ANCIENT_WISP, float(rand32() % 40), float(rand32() % 40), 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15s);
|
||||
++WispCount;
|
||||
if (WispCount >= 30)
|
||||
me->KillSelf();
|
||||
|
||||
@@ -790,15 +790,15 @@ public:
|
||||
switch (urand(0, 2))
|
||||
{
|
||||
case 0:
|
||||
DoSpawnCreature(17902, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
DoSpawnCreature(17902, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
DoSpawnCreature(17902, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s);
|
||||
DoSpawnCreature(17902, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s);
|
||||
break;
|
||||
case 1:
|
||||
DoSpawnCreature(17903, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
DoSpawnCreature(17903, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
DoSpawnCreature(17903, 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s);
|
||||
DoSpawnCreature(17903, -3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s);
|
||||
break;
|
||||
case 2:
|
||||
DoSpawnCreature(RAND(17902, 17903), 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60000);
|
||||
DoSpawnCreature(RAND(17902, 17903), 3, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 60s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
|
||||
void SummonAdds(Unit* victim)
|
||||
{
|
||||
if (Creature* Add = DoSpawnCreature(13456, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90000))
|
||||
if (Creature* Add = DoSpawnCreature(13456, float(irand(-7, 7)), float(irand(-7, 7)), 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 90s))
|
||||
Add->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ public:
|
||||
|
||||
void SpawnEyeTentacle(float x, float y)
|
||||
{
|
||||
if (Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500))
|
||||
if (Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500ms))
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
if (Spawned->AI())
|
||||
Spawned->AI()->AttackStart(target);
|
||||
@@ -531,7 +531,7 @@ public:
|
||||
|
||||
void SpawnEyeTentacle(float x, float y)
|
||||
{
|
||||
Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500);
|
||||
Creature* Spawned = DoSpawnCreature(NPC_EYE_TENTACLE, x, y, 0, 0, TEMPSUMMON_CORPSE_DESPAWN, 500ms);
|
||||
if (Spawned && Spawned->AI())
|
||||
if (Unit* target = SelectRandomNotStomach())
|
||||
Spawned->AI()->AttackStart(target);
|
||||
|
||||
@@ -98,7 +98,7 @@ public:
|
||||
case 1: RandY = 0.0f + Rand; break;
|
||||
}
|
||||
Rand = 0;
|
||||
Creature* Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
Creature* Spawn = DoSpawnCreature(15630, RandX, RandY, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30s);
|
||||
if (Spawn)
|
||||
Spawn->AI()->AttackStart(victim);
|
||||
}
|
||||
|
||||
@@ -246,7 +246,7 @@ class npc_malformed_ooze : public CreatureScript
|
||||
{
|
||||
if (Creature* temp = me->FindNearestCreature(NPC_MALFORMED_OOZE, 3.0f, true))
|
||||
{
|
||||
DoSpawnCreature(NPC_IRON_SLUDGE, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000);
|
||||
DoSpawnCreature(NPC_IRON_SLUDGE, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20s);
|
||||
temp->DisappearAndDie();
|
||||
me->DisappearAndDie();
|
||||
}
|
||||
|
||||
@@ -432,7 +432,7 @@ public:
|
||||
//DoCast(me, spell_id, true);
|
||||
if (Unit* target = SelectTarget(SelectTargetMethod::Random, 0))
|
||||
{
|
||||
if (Creature* Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000))
|
||||
if (Creature* Pet = DoSpawnCreature(pet_id, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15s))
|
||||
{
|
||||
Pet->AI()->AttackStart(target);
|
||||
SummonedPet = Pet->GetGUID();
|
||||
|
||||
@@ -297,10 +297,10 @@ public:
|
||||
SummonBeams();
|
||||
|
||||
// spawn 4 adds
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
DoSpawnCreature(ENTRY_PURE_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
|
||||
me->SetMeleeDamageSchool(SPELL_SCHOOL_FROST);
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_FROST, true);
|
||||
@@ -381,10 +381,10 @@ public:
|
||||
DeSummonBeams();
|
||||
|
||||
// spawn 4 adds
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF1, SPAWN_Y_DIFF1, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF2, SPAWN_Y_DIFF2, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF3, SPAWN_Y_DIFF3, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
DoSpawnCreature(ENTRY_TAINTED_SPAWN, SPAWN_X_DIFF4, SPAWN_Y_DIFF4, 3, 0, TEMPSUMMON_CORPSE_DESPAWN, 0s);
|
||||
|
||||
me->SetMeleeDamageSchool(SPELL_SCHOOL_NATURE);
|
||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_NATURE, true);
|
||||
|
||||
@@ -582,7 +582,7 @@ public:
|
||||
//at this point he divides himself in two parts
|
||||
CastConsumingMadness();
|
||||
DespawnDemon();
|
||||
if (Creature* Copy = DoSpawnCreature(DEMON_FORM, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 6000))
|
||||
if (Creature* Copy = DoSpawnCreature(DEMON_FORM, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 6s))
|
||||
{
|
||||
Demon = Copy->GetGUID();
|
||||
if (me->GetVictim())
|
||||
|
||||
@@ -120,14 +120,14 @@ public:
|
||||
{
|
||||
Talk(SAY_MECHANICS);
|
||||
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, -5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, -5, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240s);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, -5, 5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240s);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, -5, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240s);
|
||||
|
||||
if (rand32() % 2)
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 5, -7, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 5, -7, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240s);
|
||||
if (rand32() % 2)
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 7, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000);
|
||||
DoSpawnCreature(NPC_STREAMRIGGER_MECHANIC, 7, -5, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -334,7 +334,7 @@ class boss_alar : public CreatureScript
|
||||
return;
|
||||
case WE_SUMMON:
|
||||
for (uint8 i = 0; i < 2; ++i)
|
||||
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
|
||||
me->SetBoundingRadius(10);
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetDisplayId(me->GetNativeDisplayId());
|
||||
@@ -373,7 +373,7 @@ class boss_alar : public CreatureScript
|
||||
{
|
||||
if (urand(0, 4)) // next platform
|
||||
{
|
||||
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(CREATURE_EMBER_OF_ALAR, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
|
||||
if (cur_wp == 3)
|
||||
cur_wp = 0;
|
||||
else
|
||||
|
||||
@@ -302,8 +302,8 @@ public:
|
||||
case 9:
|
||||
Talk(SAY_ELF_SUMMON1, player);
|
||||
// Spawn two Haal'eshi Talonguard
|
||||
DoSpawnCreature(NPC_HAALESHI_TALONGUARD, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(NPC_HAALESHI_TALONGUARD, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(NPC_HAALESHI_TALONGUARD, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
|
||||
DoSpawnCreature(NPC_HAALESHI_TALONGUARD, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
|
||||
break;
|
||||
case 13:
|
||||
Talk(SAY_ELF_RESTING, player);
|
||||
@@ -311,8 +311,8 @@ public:
|
||||
case 14:
|
||||
Talk(SAY_ELF_SUMMON2, player);
|
||||
// Spawn two Haal'eshi Windwalker
|
||||
DoSpawnCreature(NPC_HAALESHI_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(NPC_HAALESHI_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5000);
|
||||
DoSpawnCreature(NPC_HAALESHI_WINDWALKER, -15, -15, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
|
||||
DoSpawnCreature(NPC_HAALESHI_WINDWALKER, -17, -17, 0, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 5s);
|
||||
break;
|
||||
case 27:
|
||||
Talk(SAY_ELF_COMPLETE, player);
|
||||
|
||||
@@ -1570,7 +1570,7 @@ public:
|
||||
Unit* totemOspirits = nullptr;
|
||||
|
||||
if (entry != 0)
|
||||
Summoned = DoSpawnCreature(entry, 0, 0, 1, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5000);
|
||||
Summoned = DoSpawnCreature(entry, 0, 0, 1, 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 5s);
|
||||
|
||||
// FIND TOTEM, PROCESS QUEST
|
||||
if (Summoned)
|
||||
|
||||
Reference in New Issue
Block a user