diff options
author | Spp <spp@jorge.gr> | 2012-12-19 08:23:34 +0100 |
---|---|---|
committer | Spp <spp@jorge.gr> | 2012-12-19 08:23:34 +0100 |
commit | 80b1b6c4940a43fa0db175097a54d6cb50e7b15c (patch) | |
tree | ab3c1f0d7ea2df6fb563e3af7e205fcc84baacda /src/server/scripts/Kalimdor | |
parent | a227a3494766103cf6805cf52839612854c2767b (diff) | |
parent | a2832805afb9a8a3434172479c814ca2a729ece1 (diff) |
Merge branch 'master' into 4.3.4
Conflicts:
src/server/game/Globals/ObjectMgr.cpp
src/server/game/World/World.h
src/server/scripts/Kalimdor/moonglade.cpp
Diffstat (limited to 'src/server/scripts/Kalimdor')
9 files changed, 439 insertions, 154 deletions
diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp index 56d07a49dc4..2e70081fe87 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp @@ -27,9 +27,9 @@ enum Spells enum Yells { - SAY_AGGRO = -1595045, - SAY_FAIL = -1595046, - SAY_DEATH = -1595047 + SAY_AGGRO = 0, + SAY_DEATH = 1, + SAY_FAIL = 2 }; class boss_infinite_corruptor : public CreatureScript @@ -59,11 +59,12 @@ public: void EnterCombat(Unit* /*who*/) { + Talk(SAY_AGGRO); if (instance) instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS); } - void UpdateAI(const uint32 /*diff*/) + void UpdateAI(uint32 const /*diff*/) { //Return since we have no target if (!UpdateVictim()) @@ -74,6 +75,7 @@ public: void JustDied(Unit* /*killer*/) { + Talk(SAY_DEATH); if (instance) instance->SetData(DATA_INFINITE_EVENT, DONE); } diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index 40d4d5d54b4..7dd395770db 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -29,7 +29,7 @@ EndScriptData */ enum Yells { - EMOTE_TARGET = -1509002 + EMOTE_TARGET = 0 }; class boss_buru : public CreatureScript diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp index 4abbf99d4ef..5f5b958fb9b 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp @@ -21,8 +21,8 @@ enum Texts { - EMOTE_AGGRO = -1509000, - EMOTE_MANA_FULL = -1509001 + EMOTE_AGGRO = 0, + EMOTE_MANA_FULL = 1 }; enum Spells diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index da67f93f968..1ffd74eddf3 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -23,22 +23,22 @@ enum Yells { // The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35 - SAY_ANDOROV_INTRO = -1509003, // Before for the first wave - SAY_ANDOROV_ATTACK = -1509004, // Beginning the event - SAY_ANDOROV_WAVE_1 = -1509001, // When the first wave comes text: Kill first, ask questions later... Incoming! emote: 45 sound: 8653 - SAY_WAVE3 = -1509005, - SAY_WAVE4 = -1509006, - SAY_WAVE5 = -1509007, - SAY_WAVE6 = -1509008, - SAY_WAVE7 = -1509009, - SAY_INTRO = -1509010, - SAY_UNK1 = -1509011, - SAY_UNK2 = -1509012, - SAY_UNK3 = -1509013, - SAY_DEATH = -1509014, - SAY_CHANGEAGGRO = -1509015, - SAY_KILLS_ANDOROV = -1509016, - SAY_COMPLETE_QUEST = -1509017 // Yell when realm complete quest 8743 for world event + SAY_ANDOROV_INTRO = 0, // Before for the first wave + SAY_ANDOROV_ATTACK = 1, // Beginning the event + + SAY_WAVE3 = 0, + SAY_WAVE4 = 1, + SAY_WAVE5 = 2, + SAY_WAVE6 = 3, + SAY_WAVE7 = 4, + SAY_INTRO = 5, + SAY_UNK1 = 6, + SAY_UNK2 = 7, + SAY_UNK3 = 8, + SAY_DEATH = 9, + SAY_CHANGEAGGRO = 10, + SAY_KILLS_ANDOROV = 11, + SAY_COMPLETE_QUEST = 12 // Yell when realm complete quest 8743 for world event // Warriors, Captains, continue the fight! Sound: 8640 }; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index 1cb69689b67..c97f8a0495f 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -58,8 +58,6 @@ EndScriptData */ * - the current phase is stored in the instance data to be easily shared between the eye and cthun. */ -#define PI 3.14 - enum Phases { PHASE_NOT_STARTED = 0, @@ -76,24 +74,6 @@ enum Phases PHASE_CTHUN_DONE = 6, }; -enum Creatures -{ - MOB_CTHUN_PORTAL = 15896, - - // ***** Main Phase 1 ******** - BOSS_EYE_OF_CTHUN = 15589, - MOB_CLAW_TENTACLE = 15725, - MOB_EYE_TENTACLE = 15726, - MOB_SMALL_PORTAL = 15904, - - // ***** Main Phase 2 ******** - MOB_BODY_OF_CTHUN = 15809, - MOB_GIANT_CLAW_TENTACLE = 15728, - MOB_GIANT_EYE_TENTACLE = 15334, - MOB_FLESH_TENTACLE = 15802, - MOB_GIANT_PORTAL = 15910, -}; - enum Spells { // ***** Main Phase 1 ******** diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp index d0e97bc36c8..0f575043da6 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_viscidus.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2008-2012 TrinityCore <http://www.trinitycore.org/> - * Copyright (C) 2006-2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the @@ -16,18 +15,274 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/* ScriptData -SDName: Boss_Viscidus -SD%Complete: 0 -SDComment: place holder -SDCategory: Temple of Ahn'Qiraj -EndScriptData */ - #include "ScriptMgr.h" #include "ScriptedCreature.h" +#include "SpellInfo.h" +#include "temple_of_ahnqiraj.h" + +enum Spells +{ + SPELL_POISON_SHOCK = 25993, + SPELL_POISONBOLT_VOLLEY = 25991, + SPELL_TOXIN = 26575, + SPELL_VISCIDUS_SLOWED = 26034, + SPELL_VISCIDUS_SLOWED_MORE = 26036, + SPELL_VISCIDUS_FREEZE = 25937, + SPELL_REJOIN_VISCIDUS = 25896, + SPELL_VISCIDUS_EXPLODE = 25938, + SPELL_VISCIDUS_SUICIDE = 26003, + + SPELL_MEMBRANE_VISCIDUS = 25994, // damage reduction spell - removed from DBC + SPELL_VISCIDUS_WEAKNESS = 25926, // aura which procs at damage - should trigger the slow spells - removed from DBC + SPELL_VISCIDUS_SHRINKS = 25893, // (6) Apply Aura #61: Mod Scale Value: -4 - removed from DBC + SPELL_VISCIDUS_GROWS = 25897, // removed from DBC + SPELL_SUMMON_GLOBS = 25885, // summons npc 15667 using spells from 25865 to 25884; All spells have target coords - removed from DBC + SPELL_VISCIDUS_TELEPORT = 25904, // removed from DBC +}; + +enum Events +{ + EVENT_POISONBOLT_VOLLEY = 1, + EVENT_POISON_SHOCK = 2, + EVENT_RESET_PHASE = 3 +}; + +enum Phases +{ + PHASE_FROST = 1, + PHASE_MELEE = 2, + PHASE_GLOB = 3 +}; + +enum HitCounter +{ + HITCOUNTER_SLOW = 100, // "Viscidus begins to slow." + HITCOUNTER_SLOW_MORE = 150, // "Viscidus begins to freeze." + HITCOUNTER_FREEZE = 200, // "Viscidus is frozen solid." + + // 4.3.4 data + HITCOUNTER_CRACK = 50, // "Viscidus begins to crack." + HITCOUNTER_SHATTER = 100, // "Viscidus looks ready to shatter." + HITCOUNTER_EXPLODE = 150, // "Viscidus explodes." + + // 1.12 data + // HITCOUNTER_EXPLODE = 75 +}; + +enum MovePoints +{ + ROOM_CENTER = 1 +}; + +Position const ViscidusCoord = { -7992.36f, 908.19f, -52.62f, 1.68f }; // TODO: Visci ain't room middle +float const RoomRadius = 40.0f; // TODO: Not sure if its correct + +class boss_viscidus : public CreatureScript +{ + public: + boss_viscidus() : CreatureScript("boss_viscidus") { } + + struct boss_viscidusAI : public BossAI + { + boss_viscidusAI(Creature* creature) : BossAI(creature, DATA_VISCIDUS) { } + + void Reset() + { + _Reset(); + _hitcounter = 0; + _phase = PHASE_FROST; + } + + void DamageTaken(Unit* attacker, uint32& /*damage*/) + { + if (_phase != PHASE_MELEE) + return; + + ++_hitcounter; + + if (attacker->HasUnitState(UNIT_STATE_MELEE_ATTACKING) && _hitcounter >= HITCOUNTER_EXPLODE) + { + events.Reset(); + _phase = PHASE_GLOB; + DoCast(me, SPELL_VISCIDUS_EXPLODE); + me->SetVisible(false); + me->RemoveAura(SPELL_TOXIN); + me->RemoveAura(SPELL_VISCIDUS_FREEZE); + + uint8 NumGlobes = me->GetHealthPct() / 5.0f; + for (uint8 i = 0; i < NumGlobes; ++i) + { + float Angle = i * 2 * M_PI / NumGlobes; + float X = ViscidusCoord.GetPositionX() + std::cos(Angle) * RoomRadius; + float Y = ViscidusCoord.GetPositionY() + std::sin(Angle) * RoomRadius; + float Z = -35.0f; + + if (TempSummon* Glob = me->SummonCreature(NPC_GLOB_OF_VISCIDUS, X, Y, Z)) + { + Glob->UpdateAllowedPositionZ(X, Y, Z); + Glob->NearTeleportTo(X, Y, Z, 0.0f); + Glob->GetMotionMaster()->MovePoint(ROOM_CENTER, ViscidusCoord); + } + } + } + } + + void SpellHit(Unit* /*caster*/, SpellInfo const* spell) + { + if ((spell->GetSchoolMask() & SPELL_SCHOOL_MASK_FROST) && _phase == PHASE_FROST && me->GetHealthPct() > 5.0f) + { + ++_hitcounter; + + if (_hitcounter >= HITCOUNTER_FREEZE) + { + _phase = PHASE_MELEE; + DoCast(me, SPELL_VISCIDUS_FREEZE); + me->RemoveAura(SPELL_VISCIDUS_SLOWED_MORE); + events.ScheduleEvent(EVENT_RESET_PHASE, 15000); + } + else if (_hitcounter >= HITCOUNTER_SLOW_MORE) + { + me->RemoveAura(SPELL_VISCIDUS_SLOWED); + DoCast(me, SPELL_VISCIDUS_SLOWED_MORE); + } + else if (_hitcounter >= HITCOUNTER_SLOW) + DoCast(me, SPELL_VISCIDUS_SLOWED); + } + } + + void EnterCombat(Unit* /*who*/) + { + _EnterCombat(); + events.Reset(); + InitSpells(); + } + + void InitSpells() + { + DoCast(me, SPELL_TOXIN); + events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000)); + events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000)); + } + + void EnterEvadeMode() + { + summons.DespawnAll(); + ScriptedAI::EnterEvadeMode(); + } + + void JustDied(Unit* /*killer*/) + { + DoCast(me, SPELL_VISCIDUS_SUICIDE); + summons.DespawnAll(); + } + + void UpdateAI(uint32 const diff) + { + if (!UpdateVictim()) + return; + + if (_phase == PHASE_GLOB && summons.empty()) + { + me->NearTeleportTo(ViscidusCoord.GetPositionX(), + ViscidusCoord.GetPositionY(), + ViscidusCoord.GetPositionZ(), + ViscidusCoord.GetOrientation()); + + _hitcounter = 0; + _phase = PHASE_FROST; + InitSpells(); + me->SetVisible(true); + } + + events.Update(diff); + + while (uint32 eventId = events.ExecuteEvent()) + { + switch (eventId) + { + case EVENT_POISONBOLT_VOLLEY: + DoCast(me, SPELL_POISONBOLT_VOLLEY); + events.ScheduleEvent(EVENT_POISONBOLT_VOLLEY, urand(10000, 15000)); + break; + case EVENT_POISON_SHOCK: + DoCast(me, SPELL_POISON_SHOCK); + events.ScheduleEvent(EVENT_POISON_SHOCK, urand(7000, 12000)); + break; + case EVENT_RESET_PHASE: + _hitcounter = 0; + _phase = PHASE_FROST; + break; + default: + break; + } + } + + if (_phase != PHASE_GLOB) + DoMeleeAttackIfReady(); + } + + private: + uint8 _hitcounter; + Phases _phase; + }; + + CreatureAI* GetAI(Creature* creature) const + { + return new boss_viscidusAI(creature); + } +}; + +class npc_glob_of_viscidus : public CreatureScript +{ + public: + npc_glob_of_viscidus() : CreatureScript("boss_glob_of_viscidus") { } + + struct npc_glob_of_viscidusAI : public ScriptedAI + { + npc_glob_of_viscidusAI(Creature* creature) : ScriptedAI(creature) { } + + void JustDied(Unit* /*killer*/) + { + InstanceScript* Instance = me->GetInstanceScript(); + if (!Instance) + return; + + if (Creature* Viscidus = me->GetMap()->GetCreature(Instance->GetData64(DATA_VISCIDUS))) + { + if (BossAI* ViscidusAI = dynamic_cast<BossAI*>(Viscidus->GetAI())) + ViscidusAI->SummonedCreatureDespawn(me); + + if (Viscidus->isAlive() && Viscidus->GetHealthPct() < 5.0f) + { + Viscidus->SetVisible(true); + Viscidus->getVictim()->Kill(Viscidus); + } + else + { + Viscidus->SetHealth(Viscidus->GetHealth() - Viscidus->GetMaxHealth() / 20); + Viscidus->SetObjectScale(Viscidus->GetFloatValue(OBJECT_FIELD_SCALE_X) - 0.05f); // TODO: Not sure if blizzlike + } + } + } -#define SPELL_POISON_SHOCK 25993 -#define SPELL_POISONBOLT_VOLLEY 25991 + void MovementInform(uint32 /*type*/, uint32 id) + { + if (id == ROOM_CENTER) + { + DoCast(me, SPELL_REJOIN_VISCIDUS); + ((TempSummon*)me)->UnSummon(); + } + } + }; -#define SPELL_TOXIN_CLOUD 25989 + CreatureAI* GetAI(Creature* creature) const + { + return new npc_glob_of_viscidusAI(creature); + } +}; +void AddSC_boss_viscidus() +{ + new boss_viscidus(); + new npc_glob_of_viscidus(); +} diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp index c8a1ff63925..3efdcd0dcf6 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/instance_temple_of_ahnqiraj.cpp @@ -29,71 +29,86 @@ EndScriptData */ class instance_temple_of_ahnqiraj : public InstanceMapScript { -public: - instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { } + public: + instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { } - InstanceScript* GetInstanceScript(InstanceMap* map) const - { - return new instance_temple_of_ahnqiraj_InstanceMapScript(map); - } + InstanceScript* GetInstanceScript(InstanceMap* map) const + { + return new instance_temple_of_ahnqiraj_InstanceMapScript(map); + } - struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript - { - instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {} + struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript + { + instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {} - //If Vem is dead... - bool IsBossDied[3]; + //If Vem is dead... + bool IsBossDied[3]; - //Storing Skeram, Vem and Kri. - uint64 SkeramGUID; - uint64 VemGUID; - uint64 KriGUID; - uint64 VeklorGUID; - uint64 VeknilashGUID; + //Storing Skeram, Vem and Kri. + uint64 SkeramGUID; + uint64 VemGUID; + uint64 KriGUID; + uint64 VeklorGUID; + uint64 VeknilashGUID; + uint64 ViscidusGUID; - uint32 BugTrioDeathCount; + uint32 BugTrioDeathCount; - uint32 CthunPhase; + uint32 CthunPhase; - void Initialize() - { - IsBossDied[0] = false; - IsBossDied[1] = false; - IsBossDied[2] = false; + void Initialize() + { + IsBossDied[0] = false; + IsBossDied[1] = false; + IsBossDied[2] = false; - SkeramGUID = 0; - VemGUID = 0; - KriGUID = 0; - VeklorGUID = 0; - VeknilashGUID = 0; + SkeramGUID = 0; + VemGUID = 0; + KriGUID = 0; + VeklorGUID = 0; + VeknilashGUID = 0; + ViscidusGUID = 0; - BugTrioDeathCount = 0; + BugTrioDeathCount = 0; - CthunPhase = 0; - } + CthunPhase = 0; + } - void OnCreatureCreate(Creature* creature) - { - switch (creature->GetEntry()) + void OnCreatureCreate(Creature* creature) { - case 15263: SkeramGUID = creature->GetGUID(); break; - case 15544: VemGUID = creature->GetGUID(); break; - case 15511: KriGUID = creature->GetGUID(); break; - case 15276: VeklorGUID = creature->GetGUID(); break; - case 15275: VeknilashGUID = creature->GetGUID(); break; + switch (creature->GetEntry()) + { + case NPC_SKERAM: + SkeramGUID = creature->GetGUID(); + break; + case NPC_VEM: + VemGUID = creature->GetGUID(); + break; + case NPC_KRI: + KriGUID = creature->GetGUID(); + break; + case NPC_VEKLOR: + VeklorGUID = creature->GetGUID(); + break; + case NPC_VEKNILASH: + VeknilashGUID = creature->GetGUID(); + break; + case NPC_VISCIDUS: + ViscidusGUID = creature->GetGUID(); + break; + } } - } - bool IsEncounterInProgress() const - { - //not active in AQ40 - return false; - } + bool IsEncounterInProgress() const + { + //not active in AQ40 + return false; + } - uint32 GetData(uint32 type) const - { - switch (type) + uint32 GetData(uint32 type) const { + switch (type) + { case DATA_VEMISDEAD: if (IsBossDied[0]) return 1; @@ -114,14 +129,14 @@ public: case DATA_CTHUN_PHASE: return CthunPhase; + } + return 0; } - return 0; - } - uint64 GetData64(uint32 identifier) const - { - switch (identifier) + uint64 GetData64(uint32 identifier) const { + switch (identifier) + { case DATA_SKERAM: return SkeramGUID; case DATA_VEM: @@ -132,14 +147,16 @@ public: return VeklorGUID; case DATA_VEKNILASH: return VeknilashGUID; - } - return 0; - } // end GetData64 + case DATA_VISCIDUS: + return ViscidusGUID; + } + return 0; + } // end GetData64 - void SetData(uint32 type, uint32 data) - { - switch (type) + void SetData(uint32 type, uint32 data) { + switch (type) + { case DATA_VEM_DEATH: IsBossDied[0] = true; break; @@ -159,9 +176,9 @@ public: case DATA_CTHUN_PHASE: CthunPhase = data; break; + } } - } - }; + }; }; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h index 13c3d56d14c..f154ccf2c5d 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.h @@ -19,19 +19,45 @@ #ifndef DEF_TEMPLE_OF_AHNQIRAJ_H #define DEF_TEMPLE_OF_AHNQIRAJ_H -#define DATA_SKERAM 1 -#define DATA_KRI 2 -#define DATA_VEM 3 -#define DATA_VEMISDEAD 4 -#define DATA_VEM_DEATH 5 -#define DATA_VEKLOR 6 -#define DATA_VEKLORISDEAD 7 -#define DATA_VEKLOR_DEATH 8 -#define DATA_VEKNILASH 9 -#define DATA_VEKNILASHISDEAD 10 -#define DATA_VEKNILASH_DEATH 11 -#define DATA_BUG_TRIO_DEATH 14 +enum DataTypes +{ + DATA_SKERAM = 1, + DATA_KRI = 2, + DATA_VEM = 3, + DATA_VEMISDEAD = 4, + DATA_VEM_DEATH = 5, + DATA_VEKLOR = 6, + DATA_VEKLORISDEAD = 7, + DATA_VEKLOR_DEATH = 8, + DATA_VEKNILASH = 9, + DATA_VEKNILASHISDEAD = 10, + DATA_VEKNILASH_DEATH = 11, + DATA_BUG_TRIO_DEATH = 14, + DATA_CTHUN_PHASE = 20, + DATA_VISCIDUS = 21 +}; -#define DATA_CTHUN_PHASE 20 +enum Creatures +{ + BOSS_EYE_OF_CTHUN = 15589, + MOB_CTHUN_PORTAL = 15896, + MOB_CLAW_TENTACLE = 15725, + MOB_EYE_TENTACLE = 15726, + MOB_SMALL_PORTAL = 15904, + MOB_BODY_OF_CTHUN = 15809, + MOB_GIANT_CLAW_TENTACLE = 15728, + MOB_GIANT_EYE_TENTACLE = 15334, + MOB_FLESH_TENTACLE = 15802, + MOB_GIANT_PORTAL = 15910, + + NPC_VISCIDUS = 15299, + NPC_GLOB_OF_VISCIDUS = 15667, + + NPC_SKERAM = 15263, + NPC_VEM = 15544, + NPC_KRI = 15511, + NPC_VEKLOR = 15276, + NPC_VEKNILASH = 15275 +}; #endif diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index f0a1a61a5fd..bea556bdfa6 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -33,6 +33,9 @@ EndContentData */ #include "ScriptedGossip.h" #include "Player.h" #include "SpellInfo.h" +#include "Cell.h" +#include "CellImpl.h" +#include "GridNotifiers.h" /*###### ## npc_bunthen_plainswind @@ -315,6 +318,28 @@ public: } } + void IsSummonedBy(Unit* /*summoner*/) + { + std::list<Player*> playerOnQuestList; + Trinity::AnyPlayerInObjectRangeCheck checker(me, 5.0f); + Trinity::PlayerListSearcher<Trinity::AnyPlayerInObjectRangeCheck> searcher(me, playerOnQuestList, checker); + me->VisitNearbyWorldObject(5.0f, searcher); + for (std::list<Player*>::const_iterator itr = playerOnQuestList.begin(); itr != playerOnQuestList.end(); ++itr) + { + // Check if found player target has active quest + if (Player* player = (*itr)) + { + if (player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE) + { + StartEvent(player); + break; + } + } + else + break; + } + } + void JustDied(Unit* /*killer*/) { if (!PlayerGUID) @@ -354,7 +379,7 @@ public: return; } - void UpdateAI(const uint32 diff) + void UpdateAI(uint32 const diff) { npc_escortAI::UpdateAI(diff); @@ -529,30 +554,6 @@ public: }; /*#### -# npc_clintar_dreamwalker -####*/ - -enum Clintar -{ - CLINTAR_SPIRIT = 22916 -}; - -class npc_clintar_dreamwalker : public CreatureScript -{ -public: - npc_clintar_dreamwalker() : CreatureScript("npc_clintar_dreamwalker") { } - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) - { - if (quest->GetQuestId() == 10965) - if (Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, ClintarSpiritSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000)) - CAST_AI(npc_clintar_spirit::npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player); - return true; - } - -}; - -/*#### # npc_omen ####*/ @@ -700,6 +701,10 @@ public: void AddSC_moonglade() { + new npc_bunthen_plainswind(); + new npc_great_bear_spirit(); + new npc_silva_filnaveth(); + new npc_clintar_spirit(); new npc_omen(); new npc_giant_spotlight(); } |