1 parent
c75d274362
commit
9991f4ae2d
5 files changed
+397
-113
No files matched your search
@@ -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 ********
|
||||
|
||||
@@ -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,275 @@
|
||||
* 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 "temple_of_ahnqiraj.h"
|
||||
|
||||
#define SPELL_POISON_SHOCK 25993
|
||||
#define SPELL_POISONBOLT_VOLLEY 25991
|
||||
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
|
||||
};
|
||||
|
||||
#define SPELL_TOXIN_CLOUD 25989
|
||||
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)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
uint8 Hitcounter;
|
||||
uint8 Phase;
|
||||
|
||||
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;
|
||||
for (uint8 i = 0; i < NumGlobes; ++i)
|
||||
{
|
||||
float Angle = i * 2 * PI / NumGlobes;
|
||||
float X = ViscidusCoord.GetPositionX() + std::cos(Angle) * RoomRadius;
|
||||
float Y = ViscidusCoord.GetPositionY() + std::sin(Angle) * RoomRadius;
|
||||
float Z = -35;
|
||||
|
||||
TempSummon* Glob = me->SummonCreature(NPC_GLOB_OF_VISCIDUS, X, Y, Z);
|
||||
Glob->UpdateAllowedPositionZ(X, Y, Z);
|
||||
Glob->NearTeleportTo(X, Y, Z, 0);
|
||||
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)
|
||||
{
|
||||
++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(const uint32 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();
|
||||
}
|
||||
};
|
||||
|
||||
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)
|
||||
{
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MovementInform(uint32 /*type*/, uint32 id)
|
||||
{
|
||||
if (id == ROOM_CENTER)
|
||||
{
|
||||
DoCast(me, SPELL_REJOIN_VISCIDUS);
|
||||
((TempSummon*)me)->UnSummon();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const
|
||||
{
|
||||
return new npc_glob_of_viscidusAI (creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_viscidus()
|
||||
{
|
||||
new boss_viscidus();
|
||||
new npc_glob_of_viscidus();
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
//If Vem is dead...
|
||||
bool IsBossDied[3];
|
||||
|
||||
//Storing Skeram, Vem and Kri.
|
||||
uint64 SkeramGUID;
|
||||
uint64 VemGUID;
|
||||
uint64 KriGUID;
|
||||
uint64 VeklorGUID;
|
||||
uint64 VeknilashGUID;
|
||||
|
||||
uint32 BugTrioDeathCount;
|
||||
|
||||
uint32 CthunPhase;
|
||||
|
||||
void Initialize()
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const
|
||||
{
|
||||
IsBossDied[0] = false;
|
||||
IsBossDied[1] = false;
|
||||
IsBossDied[2] = false;
|
||||
|
||||
SkeramGUID = 0;
|
||||
VemGUID = 0;
|
||||
KriGUID = 0;
|
||||
VeklorGUID = 0;
|
||||
VeknilashGUID = 0;
|
||||
|
||||
BugTrioDeathCount = 0;
|
||||
|
||||
CthunPhase = 0;
|
||||
return new instance_temple_of_ahnqiraj_InstanceMapScript(map);
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
//If Vem is dead...
|
||||
bool IsBossDied[3];
|
||||
|
||||
//Storing Skeram, Vem and Kri.
|
||||
uint64 SkeramGUID;
|
||||
uint64 VemGUID;
|
||||
uint64 KriGUID;
|
||||
uint64 VeklorGUID;
|
||||
uint64 VeknilashGUID;
|
||||
uint64 ViscidusGUID;
|
||||
|
||||
uint32 BugTrioDeathCount;
|
||||
|
||||
uint32 CthunPhase;
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
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;
|
||||
IsBossDied[0] = false;
|
||||
IsBossDied[1] = false;
|
||||
IsBossDied[2] = false;
|
||||
|
||||
SkeramGUID = 0;
|
||||
VemGUID = 0;
|
||||
KriGUID = 0;
|
||||
VeklorGUID = 0;
|
||||
VeknilashGUID = 0;
|
||||
ViscidusGUID = 0;
|
||||
|
||||
BugTrioDeathCount = 0;
|
||||
|
||||
CthunPhase = 0;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const
|
||||
{
|
||||
//not active in AQ40
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const
|
||||
{
|
||||
switch (type)
|
||||
void OnCreatureCreate(Creature* creature)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -19,19 +19,48 @@
|
||||
#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
|
||||
};
|
||||
|
||||
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
|
||||
};
|
||||
|
||||
#define PI 3.14
|
||||
|
||||
#define DATA_CTHUN_PHASE 20
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user