mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-25 06:36:24 +00:00
Merge branch 'azerothcore:master' into Playerbot
This commit is contained in:
@@ -23,7 +23,6 @@ SDCategory: Azshara
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_spitelashes
|
||||
npc_rizzle_sprysprocket
|
||||
npc_depth_charge
|
||||
EndContentData */
|
||||
@@ -34,96 +33,6 @@ EndContentData */
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
/*######
|
||||
## npc_spitelashes
|
||||
######*/
|
||||
|
||||
enum Spitelashes
|
||||
{
|
||||
SPELL_POLYMORPH_RANK1 = 118,
|
||||
SPELL_POLYMORPH_RANK2 = 12824,
|
||||
SPELL_POLYMORPH_RANK3 = 12825,
|
||||
SPELL_POLYMORPH_RANK4 = 12826,
|
||||
SPELL_POLYMORPH = 29124,
|
||||
SPELL_POLYMORPH_BACKFIRE = 28406,
|
||||
SPELL_REMOVE_POLYMORPH = 6924
|
||||
};
|
||||
|
||||
class npc_spitelashes : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_spitelashes() : CreatureScript("npc_spitelashes") { }
|
||||
|
||||
struct npc_spitelashesAI : public ScriptedAI
|
||||
{
|
||||
npc_spitelashesAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
uint32 morphtimer;
|
||||
bool spellhit;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
morphtimer = 0;
|
||||
spellhit = false;
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
|
||||
void SpellHit(Unit* unit, SpellInfo const* spell) override
|
||||
{
|
||||
if (spellhit)
|
||||
return;
|
||||
|
||||
switch (spell->Id)
|
||||
{
|
||||
case SPELL_POLYMORPH_RANK1:
|
||||
case SPELL_POLYMORPH_RANK2:
|
||||
case SPELL_POLYMORPH_RANK3:
|
||||
case SPELL_POLYMORPH_RANK4:
|
||||
if (Player* player = unit->ToPlayer())
|
||||
if (player->GetQuestStatus(9364) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
spellhit = true;
|
||||
DoCast(me, SPELL_POLYMORPH);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
// we mustn't remove the Creature in the same round in which we cast the summon spell, otherwise there will be no summons
|
||||
if (spellhit && morphtimer >= 5000)
|
||||
{
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
}
|
||||
// walk 5 seconds before summoning
|
||||
if (spellhit && morphtimer < 5000)
|
||||
{
|
||||
morphtimer += diff;
|
||||
if (morphtimer >= 5000)
|
||||
{
|
||||
DoCast(me, SPELL_POLYMORPH_BACKFIRE); // summon copies
|
||||
DoCast(me, SPELL_REMOVE_POLYMORPH); // visual explosion
|
||||
}
|
||||
}
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
/// @todo add abilities for the different creatures
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_spitelashesAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
/*####
|
||||
# npc_rizzle_sprysprocket
|
||||
####*/
|
||||
@@ -460,7 +369,6 @@ public:
|
||||
|
||||
void AddSC_azshara()
|
||||
{
|
||||
new npc_spitelashes();
|
||||
new npc_rizzle_sprysprocket();
|
||||
new npc_depth_charge();
|
||||
}
|
||||
|
||||
@@ -427,6 +427,8 @@ enum DyingKodo
|
||||
|
||||
QUEST_KODO = 5561,
|
||||
|
||||
NPC_TEXT_KODO = 4449, // MenuID 3650
|
||||
|
||||
NPC_SMEED = 11596,
|
||||
NPC_AGED_KODO = 4700,
|
||||
NPC_DYING_KODO = 4701,
|
||||
@@ -498,7 +500,7 @@ public:
|
||||
player->RemoveAurasDueToSpell(SPELL_KODO_KOMBO_PLAYER_BUFF);
|
||||
}
|
||||
|
||||
SendGossipMenuFor(player, player->GetGossipTextId(creature), creature->GetGUID());
|
||||
SendGossipMenuFor(player, NPC_TEXT_KODO, creature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -170,8 +170,11 @@ public:
|
||||
|
||||
enum Yor
|
||||
{
|
||||
SPELL_DOUBLE_BREATH = 38361,
|
||||
EVENT_DOUBLE_BREATH = 1
|
||||
SPELL_DOUBLE_BREATH = 38361,
|
||||
SPELL_STOMP = 36405,
|
||||
|
||||
EVENT_DOUBLE_BREATH = 1,
|
||||
EVENT_STOMP = 2
|
||||
};
|
||||
|
||||
class npc_yor : public CreatureScript
|
||||
@@ -192,7 +195,8 @@ public:
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(6000, 9000));
|
||||
events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(26500, 30500));
|
||||
events.ScheduleEvent(EVENT_STOMP, urand(12000, 18000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -201,6 +205,10 @@ public:
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
@@ -209,16 +217,16 @@ public:
|
||||
case EVENT_DOUBLE_BREATH:
|
||||
if (me->IsWithinDist(me->GetVictim(), ATTACK_DISTANCE))
|
||||
DoCastVictim(SPELL_DOUBLE_BREATH);
|
||||
events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(6000, 9000));
|
||||
events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(10000, 20000));
|
||||
break;
|
||||
default:
|
||||
case EVENT_STOMP:
|
||||
DoCastAOE(SPELL_STOMP);
|
||||
events.ScheduleEvent(EVENT_STOMP, urand(14000, 24000));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ struct boss_ambassador_hellmaw : public BossAI
|
||||
{
|
||||
Reset();
|
||||
|
||||
if (instance->GetData(TYPE_RITUALISTS) != DONE)
|
||||
if (instance->GetPersistentData(TYPE_RITUALISTS) != DONE)
|
||||
{
|
||||
isBanished = true;
|
||||
me->SetImmuneToAll(true);
|
||||
@@ -98,7 +98,6 @@ struct boss_ambassador_hellmaw : public BossAI
|
||||
}
|
||||
|
||||
Talk(SAY_AGGRO);
|
||||
events.ScheduleEvent(EVENT_SPELL_CORROSIVE, urand(23050, 30350));
|
||||
|
||||
scheduler.Schedule(23050ms, 30350ms, [this](TaskContext context)
|
||||
{
|
||||
|
||||
@@ -43,12 +43,6 @@ enum GrandmasterVorpil
|
||||
|
||||
NPC_VOID_PORTAL = 19224,
|
||||
SPELL_VOID_PORTAL_VISUAL = 33569,
|
||||
|
||||
EVENT_SPELL_SHADOWBOLT = 1,
|
||||
EVENT_SPELL_DRAWSHADOWS = 2,
|
||||
EVENT_SUMMON_TRAVELER = 3,
|
||||
EVENT_SPELL_BANISH = 4,
|
||||
EVENT_SPELL_RAIN_OF_FIRE = 5
|
||||
};
|
||||
|
||||
float VorpilPosition[3] = {-253.548f, -263.646f, 17.0864f};
|
||||
@@ -67,23 +61,15 @@ struct boss_grandmaster_vorpil : public BossAI
|
||||
{
|
||||
boss_grandmaster_vorpil(Creature* creature) : BossAI(creature, DATA_GRANDMASTER_VORPIL)
|
||||
{
|
||||
instance = creature->GetInstanceScript();
|
||||
sayIntro = false;
|
||||
}
|
||||
|
||||
InstanceScript* instance;
|
||||
bool sayIntro, sayHelp;
|
||||
int count = 0;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_Reset();
|
||||
sayHelp = false;
|
||||
events.Reset();
|
||||
summons.DespawnAll();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_GRANDMASTER_VORPIL_EVENT, NOT_STARTED);
|
||||
}
|
||||
}
|
||||
|
||||
void summonPortals()
|
||||
@@ -105,36 +91,30 @@ struct boss_grandmaster_vorpil : public BossAI
|
||||
}
|
||||
}
|
||||
|
||||
int counterVoidSpawns(int count)
|
||||
Milliseconds counterVoidSpawns(uint8 count)
|
||||
{
|
||||
int timer = 0;
|
||||
switch(count)
|
||||
switch (count)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
timer = 13300;
|
||||
break;
|
||||
return 13300ms;
|
||||
case 3:
|
||||
timer = 12100;
|
||||
break;
|
||||
return 12100ms;
|
||||
case 4:
|
||||
timer = 10900;
|
||||
break;
|
||||
return 10900ms;
|
||||
case 5:
|
||||
case 6:
|
||||
timer = 9700;
|
||||
break;
|
||||
return 9700ms;
|
||||
case 7:
|
||||
case 8:
|
||||
timer = 7200;
|
||||
break;
|
||||
return 7200ms;
|
||||
case 9:
|
||||
timer = 6000;
|
||||
break;
|
||||
return 6000ms;
|
||||
default:
|
||||
timer = 4800;
|
||||
return 4800ms;
|
||||
}
|
||||
return timer;
|
||||
|
||||
return 1s;
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
@@ -152,7 +132,7 @@ struct boss_grandmaster_vorpil : public BossAI
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
if (victim->IsPlayer())
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
@@ -161,27 +141,50 @@ struct boss_grandmaster_vorpil : public BossAI
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
summons.DespawnAll();
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_GRANDMASTER_VORPIL_EVENT, DONE);
|
||||
}
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
summonPortals();
|
||||
events.ScheduleEvent(EVENT_SPELL_SHADOWBOLT, urand(9700, 20000));
|
||||
events.ScheduleEvent(EVENT_SPELL_DRAWSHADOWS, 36400);
|
||||
events.ScheduleEvent(EVENT_SUMMON_TRAVELER, 10900);
|
||||
|
||||
scheduler.Schedule(9700ms, 20s, [this](TaskContext context)
|
||||
{
|
||||
DoCastAOE(SPELL_SHADOWBOLT_VOLLEY);
|
||||
context.Repeat();
|
||||
}).Schedule(36400ms, [this](TaskContext context)
|
||||
{
|
||||
DoCastSelf(SPELL_DRAW_SHADOWS, true);
|
||||
|
||||
me->GetMap()->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->IsAlive() && !player->HasAura(SPELL_BANISH))
|
||||
{
|
||||
player->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
}
|
||||
});
|
||||
|
||||
scheduler.Schedule(1s, [this](TaskContext /*context*/)
|
||||
{
|
||||
DoCastSelf(DUNGEON_MODE(SPELL_RAIN_OF_FIRE_N, SPELL_RAIN_OF_FIRE_H));
|
||||
});
|
||||
|
||||
me->NearTeleportTo(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
context.Repeat(36400ms, 44950ms);
|
||||
}).Schedule(10900ms, [this](TaskContext context)
|
||||
{
|
||||
spawnVoidTraveler();
|
||||
context.Repeat(counterVoidSpawns(context.GetRepeatCounter()));
|
||||
});
|
||||
|
||||
if (IsHeroic())
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SPELL_BANISH, urand(17000, 28000));
|
||||
}
|
||||
if (instance)
|
||||
{
|
||||
instance->SetData(DATA_GRANDMASTER_VORPIL_EVENT, IN_PROGRESS);
|
||||
scheduler.Schedule(17s, 28s, [this](TaskContext context)
|
||||
{
|
||||
DoCastRandomTarget(SPELL_BANISH, 0, 30.0f, true);
|
||||
context.Repeat();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,55 +197,6 @@ struct boss_grandmaster_vorpil : public BossAI
|
||||
sayIntro = true;
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_SPELL_SHADOWBOLT:
|
||||
DoCastAOE(SPELL_SHADOWBOLT_VOLLEY);
|
||||
events.RepeatEvent(urand(9700, 20000));
|
||||
break;
|
||||
case EVENT_SPELL_BANISH:
|
||||
DoCastRandomTarget(SPELL_BANISH, 0, 30.0f, true);
|
||||
events.RepeatEvent(urand(17000, 28000));
|
||||
break;
|
||||
case EVENT_SUMMON_TRAVELER:
|
||||
spawnVoidTraveler();
|
||||
count++;
|
||||
events.RepeatEvent(counterVoidSpawns(count));
|
||||
break;
|
||||
case EVENT_SPELL_DRAWSHADOWS:
|
||||
{
|
||||
DoCastSelf(SPELL_DRAW_SHADOWS, true);
|
||||
Map* map = me->GetMap();
|
||||
Map::PlayerList const& PlayerList = map->GetPlayers();
|
||||
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
|
||||
{
|
||||
if (Player* player = i->GetSource())
|
||||
{
|
||||
if (player->IsAlive() && !player->HasAura(SPELL_BANISH))
|
||||
{
|
||||
player->TeleportTo(me->GetMapId(), VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0, TELE_TO_NOT_LEAVE_COMBAT);
|
||||
}
|
||||
}
|
||||
}
|
||||
me->NearTeleportTo(VorpilPosition[0], VorpilPosition[1], VorpilPosition[2], 0.0f);
|
||||
events.ScheduleEvent(EVENT_SPELL_RAIN_OF_FIRE, 1000);
|
||||
events.RepeatEvent(urand(36400, 44950));
|
||||
break;
|
||||
}
|
||||
case EVENT_SPELL_RAIN_OF_FIRE:
|
||||
DoCastSelf(DUNGEON_MODE(SPELL_RAIN_OF_FIRE_N, SPELL_RAIN_OF_FIRE_H));
|
||||
events.DelayEvents(6000);
|
||||
break;
|
||||
}
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_voidtraveler : public ScriptedAI
|
||||
|
||||
@@ -218,7 +218,6 @@ class spell_murmur_touch : public AuraScript
|
||||
{
|
||||
if (GetTarget())
|
||||
{
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_SHOCKWAVE, true);
|
||||
GetTarget()->CastSpell(GetTarget(), SPELL_SHOCKWAVE_SERVERSIDE, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,19 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "shadow_labyrinth.h"
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
{ GO_REFECTORY_DOOR, DATA_BLACKHEARTTHEINCITEREVENT, DOOR_TYPE_PASSAGE },
|
||||
{ GO_SCREAMING_HALL_DOOR, DATA_GRANDMASTER_VORPIL, DOOR_TYPE_PASSAGE },
|
||||
{ 0, 0, DOOR_TYPE_ROOM } // END
|
||||
};
|
||||
|
||||
ObjectData const creatureData[] =
|
||||
{
|
||||
{ NPC_HELLMAW, TYPE_HELLMAW },
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
class instance_shadow_labyrinth : public InstanceMapScript
|
||||
{
|
||||
public:
|
||||
@@ -31,62 +44,31 @@ public:
|
||||
|
||||
struct instance_shadow_labyrinth_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_shadow_labyrinth_InstanceMapScript(Map* map) : InstanceScript(map) {}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
ObjectGuid m_uiHellmawGUID;
|
||||
ObjectGuid m_uiRefectoryDoorGUID;
|
||||
ObjectGuid m_uiScreamingHallDoorGUID;
|
||||
instance_shadow_labyrinth_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetBossNumber(EncounterCount);
|
||||
SetPersistentDataCount(PersistentDataCount);
|
||||
LoadDoorData(doorData);
|
||||
LoadObjectData(creatureData, nullptr);
|
||||
}
|
||||
|
||||
uint32 _ritualistsAliveCount;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
_ritualistsAliveCount = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
{
|
||||
case REFECTORY_DOOR:
|
||||
m_uiRefectoryDoorGUID = go->GetGUID();
|
||||
if (m_auiEncounter[DATA_BLACKHEARTTHEINCITEREVENT] == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
case SCREAMING_HALL_DOOR:
|
||||
m_uiScreamingHallDoorGUID = go->GetGUID();
|
||||
if (m_auiEncounter[DATA_GRANDMASTER_VORPIL_EVENT] == DONE)
|
||||
go->SetGoState(GO_STATE_ACTIVE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
InstanceScript::OnCreatureCreate(creature);
|
||||
|
||||
switch (creature->GetEntry())
|
||||
if (creature->GetEntry() == NPC_CABAL_RITUALIST)
|
||||
{
|
||||
case NPC_CABAL_RITUALIST:
|
||||
if (creature->IsAlive())
|
||||
++_ritualistsAliveCount;
|
||||
break;
|
||||
case NPC_HELLMAW:
|
||||
m_uiHellmawGUID = creature->GetGUID();
|
||||
break;
|
||||
if (creature->IsAlive())
|
||||
{
|
||||
++_ritualistsAliveCount;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,84 +77,25 @@ public:
|
||||
InstanceScript::OnUnitDeath(unit);
|
||||
|
||||
if (unit->GetEntry() == NPC_CABAL_RITUALIST)
|
||||
{
|
||||
if (!--_ritualistsAliveCount)
|
||||
{
|
||||
m_auiEncounter[TYPE_RITUALISTS] = DONE;
|
||||
SaveToDB();
|
||||
if (Creature* cr = instance->GetCreature(m_uiHellmawGUID))
|
||||
StorePersistentData(TYPE_RITUALISTS, DONE);
|
||||
if (Creature* hellmaw = GetCreature(TYPE_HELLMAW))
|
||||
{
|
||||
cr->AI()->DoAction(1);
|
||||
hellmaw->AI()->DoAction(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetData(uint32 type, uint32 uiData) override
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case DATA_BLACKHEARTTHEINCITEREVENT:
|
||||
if (uiData == DONE)
|
||||
DoUseDoorOrButton(m_uiRefectoryDoorGUID);
|
||||
m_auiEncounter[type] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_GRANDMASTER_VORPIL_EVENT:
|
||||
if (uiData == DONE)
|
||||
DoUseDoorOrButton(m_uiScreamingHallDoorGUID);
|
||||
m_auiEncounter[type] = uiData;
|
||||
break;
|
||||
|
||||
case DATA_MURMUREVENT:
|
||||
case TYPE_HELLMAW:
|
||||
m_auiEncounter[type] = uiData;
|
||||
break;
|
||||
}
|
||||
|
||||
if (uiData == DONE)
|
||||
SaveToDB();
|
||||
}
|
||||
|
||||
uint32 GetData(uint32 type) const override
|
||||
{
|
||||
if (type == TYPE_RITUALISTS)
|
||||
return m_auiEncounter[0];
|
||||
return GetPersistentData(TYPE_RITUALISTS);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
std::string GetSaveData() override
|
||||
{
|
||||
std::ostringstream saveStream;
|
||||
saveStream << "S L " << m_auiEncounter[0] << ' ' << m_auiEncounter[1] << ' '
|
||||
<< m_auiEncounter[2] << ' ' << m_auiEncounter[3] << ' ' << m_auiEncounter[4];
|
||||
|
||||
return saveStream.str();
|
||||
}
|
||||
|
||||
void Load(const char* in) override
|
||||
{
|
||||
if (!in)
|
||||
{
|
||||
OUT_LOAD_INST_DATA_FAIL;
|
||||
return;
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA(in);
|
||||
|
||||
char dataHead1, dataHead2;
|
||||
std::istringstream loadStream(in);
|
||||
loadStream >> dataHead1 >> dataHead2;
|
||||
if (dataHead1 == 'S' && dataHead2 == 'L')
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
{
|
||||
loadStream >> m_auiEncounter[i];
|
||||
if (m_auiEncounter[i] == IN_PROGRESS)
|
||||
m_auiEncounter[i] = NOT_STARTED;
|
||||
}
|
||||
}
|
||||
|
||||
OUT_LOAD_INST_DATA_COMPLETE;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -42,10 +42,13 @@ enum slNPCandGO
|
||||
NPC_CABAL_RITUALIST = 18794,
|
||||
NPC_HELLMAW = 18731,
|
||||
|
||||
REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies
|
||||
SCREAMING_HALL_DOOR = 183295 //door opened when grandmaster vorpil dies
|
||||
GO_REFECTORY_DOOR = 183296, //door opened when blackheart the inciter dies
|
||||
GO_SCREAMING_HALL_DOOR = 183295 //door opened when grandmaster vorpil dies
|
||||
};
|
||||
|
||||
uint32 constexpr EncounterCount = 4;
|
||||
uint32 constexpr PersistentDataCount = 1;
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetShadowLabyrinthAI(T* obj)
|
||||
{
|
||||
|
||||
@@ -22,37 +22,40 @@
|
||||
|
||||
enum eGrandWarlockNethekurse
|
||||
{
|
||||
SAY_INTRO = 0,
|
||||
SAY_PEON_ATTACKED = 1,
|
||||
SAY_PEON_DIES = 2,
|
||||
SAY_TAUNT = 3,
|
||||
SAY_AGGRO = 4,
|
||||
SAY_SLAY = 5,
|
||||
SAY_DIE = 6,
|
||||
SAY_INTRO = 0,
|
||||
SAY_PEON_ATTACKED = 1,
|
||||
SAY_PEON_DIES = 2,
|
||||
SAY_TAUNT = 3,
|
||||
SAY_AGGRO = 4,
|
||||
SAY_SLAY = 5,
|
||||
SAY_DIE = 6,
|
||||
|
||||
SPELL_DEATH_COIL_N = 30741,
|
||||
SPELL_DEATH_COIL_H = 30500,
|
||||
SPELL_DARK_SPIN = 30502,
|
||||
SPELL_SHADOW_FISSURE = 30496,
|
||||
SPELL_SHADOW_CLEAVE_N = 30495,
|
||||
SPELL_SHADOW_SLAM_H = 35953,
|
||||
SPELL_SHADOW_SEAR = 30735,
|
||||
SPELL_DEATH_COIL_N = 30500,
|
||||
SPELL_DEATH_COIL_H = 35954,
|
||||
SPELL_DARK_SPIN = 30502,
|
||||
SPELL_SHADOW_FISSURE = 30496,
|
||||
SPELL_SHADOW_CLEAVE_N = 30495,
|
||||
SPELL_SHADOW_SLAM_H = 35953,
|
||||
|
||||
SETDATA_DATA = 1,
|
||||
SETDATA_PEON_AGGRO = 1,
|
||||
SETDATA_PEON_DEATH = 2,
|
||||
// Spells used exclusively in RP
|
||||
SPELL_SHADOW_SEAR = 30735,
|
||||
SPELL_DEATH_COIL = 30741,
|
||||
|
||||
EVENT_STAGE_NONE = 0,
|
||||
EVENT_STAGE_INTRO = 1,
|
||||
EVENT_STAGE_TAUNT = 2,
|
||||
EVENT_STAGE_MAIN = 3,
|
||||
EVENT_INTRO = 1,
|
||||
EVENT_SPELL_DEATH_COIL = 2,
|
||||
EVENT_SPELL_SHADOW_FISSURE = 3,
|
||||
EVENT_SPELL_CLEAVE = 4,
|
||||
EVENT_CHECK_HEALTH = 5,
|
||||
EVENT_START_ATTACK = 6,
|
||||
|
||||
EVENT_INTRO = 1,
|
||||
EVENT_SPELL_DEATH_COIL = 2,
|
||||
EVENT_SPELL_SHADOW_FISSURE = 3,
|
||||
EVENT_SPELL_CLEAVE = 4,
|
||||
EVENT_CHECK_HEALTH = 5,
|
||||
EVENT_START_ATTACK = 6
|
||||
EVENT_STAGE_NONE = 0,
|
||||
EVENT_STAGE_INTRO = 1,
|
||||
EVENT_STAGE_TAUNT = 2,
|
||||
EVENT_STAGE_MAIN = 3,
|
||||
|
||||
SETDATA_DATA = 1,
|
||||
SETDATA_PEON_AGGRO = 1,
|
||||
SETDATA_PEON_DEATH = 2
|
||||
};
|
||||
|
||||
// ########################################################
|
||||
@@ -71,23 +74,11 @@ public:
|
||||
EventMap events2;
|
||||
void Reset() override
|
||||
{
|
||||
me->SetUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
EventStage = EVENT_STAGE_NONE;
|
||||
PeonEngagedCount = 0;
|
||||
PeonKilledCount = 0;
|
||||
_Reset();
|
||||
SummonMinions();
|
||||
events2.Reset();
|
||||
}
|
||||
|
||||
void SummonMinions()
|
||||
{
|
||||
me->SummonCreature(NPC_FEL_ORC_CONVERT, 172.556f, 258.227f, -13.191f, 1.41189f);
|
||||
me->SummonCreature(NPC_FEL_ORC_CONVERT, 165.181f, 261.511f, -13.1926f, 0.942743f);
|
||||
me->SummonCreature(NPC_FEL_ORC_CONVERT, 182.482f, 258.635f, -13.1788f, 1.70929f);
|
||||
me->SummonCreature(NPC_FEL_ORC_CONVERT, 189.616f, 259.866f, -13.1966f, 1.95748f);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DIE);
|
||||
@@ -132,13 +123,6 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->SetReactState(REACT_DEFENSIVE);
|
||||
summon->SetRegeneratingHealth(false);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
if (me->IsWithinDistInMap(who, 30.0f))
|
||||
@@ -194,7 +178,6 @@ public:
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
EventStage = EVENT_STAGE_MAIN;
|
||||
me->RemoveUnitFlag(UNIT_FLAG_NON_ATTACKABLE);
|
||||
if (Unit* target = me->SelectNearestPlayer(50.0f))
|
||||
AttackStart(target);
|
||||
|
||||
@@ -246,9 +229,9 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 PeonEngagedCount;
|
||||
uint32 PeonKilledCount;
|
||||
uint32 EventStage;
|
||||
uint8 PeonEngagedCount = 0;
|
||||
uint8 PeonKilledCount = 0;
|
||||
uint8 EventStage;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -55,7 +55,6 @@ enum DruidSpells
|
||||
SPELL_DRUID_SURVIVAL_INSTINCTS = 50322,
|
||||
SPELL_DRUID_SAVAGE_ROAR = 62071,
|
||||
SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178,
|
||||
SPELL_DRUID_ITEM_T8_BALANCE_RELIC = 64950,
|
||||
SPELL_DRUID_BEAR_FORM_PASSIVE = 1178,
|
||||
SPELL_DRUID_DIRE_BEAR_FORM_PASSIVE = 9635,
|
||||
SPELL_DRUID_ENRAGE = 5229,
|
||||
@@ -501,31 +500,6 @@ class spell_dru_glyph_of_starfire : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
/* 34246 - Increased Lifebloom Periodic
|
||||
60779 - Idol of Lush Moss */
|
||||
class spell_dru_idol_lifebloom : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dru_idol_lifebloom);
|
||||
|
||||
void HandleEffectCalcSpellMod(AuraEffect const* aurEff, SpellModifier*& spellMod)
|
||||
{
|
||||
if (!spellMod)
|
||||
{
|
||||
spellMod = new SpellModifier(GetAura());
|
||||
spellMod->op = SPELLMOD_DOT;
|
||||
spellMod->type = SPELLMOD_FLAT;
|
||||
spellMod->spellId = GetId();
|
||||
spellMod->mask = GetSpellInfo()->Effects[aurEff->GetEffIndex()].SpellClassMask;
|
||||
}
|
||||
spellMod->value = aurEff->GetAmount() / 7;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcSpellMod += AuraEffectCalcSpellModFn(spell_dru_idol_lifebloom::HandleEffectCalcSpellMod, EFFECT_0, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 29166 - Innervate
|
||||
class spell_dru_innervate : public AuraScript
|
||||
{
|
||||
@@ -545,24 +519,6 @@ class spell_dru_innervate : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// -5570 - Insect Swarm
|
||||
class spell_dru_insect_swarm : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dru_insect_swarm);
|
||||
|
||||
void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
if (AuraEffect const* relicAurEff = caster->GetAuraEffect(SPELL_DRUID_ITEM_T8_BALANCE_RELIC, EFFECT_0))
|
||||
amount += relicAurEff->GetAmount() / aurEff->GetTotalTicks();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_insect_swarm::CalculateAmount, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
// -33763 - Lifebloom
|
||||
class spell_dru_lifebloom : public AuraScript
|
||||
{
|
||||
@@ -1202,9 +1158,7 @@ void AddSC_druid_spell_scripts()
|
||||
RegisterSpellScript(spell_dru_dash);
|
||||
RegisterSpellScript(spell_dru_enrage);
|
||||
RegisterSpellScript(spell_dru_glyph_of_starfire);
|
||||
RegisterSpellScript(spell_dru_idol_lifebloom);
|
||||
RegisterSpellScript(spell_dru_innervate);
|
||||
RegisterSpellScript(spell_dru_insect_swarm);
|
||||
RegisterSpellScript(spell_dru_lifebloom);
|
||||
RegisterSpellScript(spell_dru_living_seed);
|
||||
RegisterSpellScript(spell_dru_living_seed_proc);
|
||||
|
||||
Reference in New Issue
Block a user