Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
Conflicts: src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp src/server/scripts/Spells/spell_dk.cpp src/server/scripts/Spells/spell_druid.cpp src/server/scripts/Spells/spell_shaman.cpp src/server/scripts/Spells/spell_warrior.cpp
This commit is contained in:
commit
da91ae1f22
93 files changed
+2131
-827
No files matched your search
+10
-12
@@ -76,7 +76,16 @@ public:
|
||||
|
||||
struct instance_blackrock_depths_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_blackrock_depths_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
BarAleCount = 0;
|
||||
GhostKillCount = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter = 0;
|
||||
}
|
||||
|
||||
uint32 encounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
@@ -115,17 +124,6 @@ public:
|
||||
uint32 TombTimer;
|
||||
uint32 TombEventCounter;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
BarAleCount = 0;
|
||||
GhostKillCount = 0;
|
||||
TombTimer = TIMER_TOMBOFTHESEVEN;
|
||||
TombEventCounter = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
-7
@@ -63,13 +63,6 @@ public:
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
// Razorgore
|
||||
EggCount = 0;
|
||||
EggEvent = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -56,7 +56,12 @@ class instance_deadmines : public InstanceMapScript
|
||||
|
||||
struct instance_deadmines_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_deadmines_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_deadmines_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
|
||||
State = CANNON_NOT_USED;
|
||||
}
|
||||
|
||||
ObjectGuid FactoryDoorGUID;
|
||||
ObjectGuid IronCladDoorGUID;
|
||||
@@ -71,13 +76,6 @@ class instance_deadmines : public InstanceMapScript
|
||||
uint32 PiratesDelay_Timer;
|
||||
ObjectGuid uiSmiteChestGUID;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
|
||||
State = CANNON_NOT_USED;
|
||||
}
|
||||
|
||||
virtual void Update(uint32 diff) override
|
||||
{
|
||||
if (!IronCladDoorGUID || !DefiasCannonGUID || !DoorLeverGUID)
|
||||
|
||||
@@ -37,6 +37,7 @@ public:
|
||||
instance_gnomeregan_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
@@ -46,11 +47,6 @@ public:
|
||||
|
||||
ObjectGuid uiBastmasterEmiShortfuseGUID;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
void Load(const char* in) override
|
||||
{
|
||||
if (!in)
|
||||
|
||||
@@ -56,7 +56,15 @@ public:
|
||||
|
||||
struct instance_karazhan_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_karazhan_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_karazhan_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
// 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered.
|
||||
m_uiOperaEvent = urand(1, 3);
|
||||
m_uiOzDeathCount = 0;
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string strSaveData;
|
||||
@@ -80,16 +88,6 @@ public:
|
||||
ObjectGuid ImageGUID;
|
||||
ObjectGuid DustCoveredChest;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
// 1 - OZ, 2 - HOOD, 3 - RAJ, this never gets altered.
|
||||
m_uiOperaEvent = urand(1, 3);
|
||||
m_uiOzDeathCount = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
|
||||
@@ -162,6 +162,13 @@ class spell_shadow_portal : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_shadow_portal_SpellScript);
|
||||
|
||||
public:
|
||||
spell_shadow_portal_SpellScript()
|
||||
{
|
||||
_instance = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_instance = GetCaster()->GetInstanceScript();
|
||||
@@ -222,7 +229,6 @@ class spell_shadow_portal : public SpellScriptLoader
|
||||
OnEffectHitTarget += SpellEffectFn(spell_shadow_portal_SpellScript::HandleCast, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
@@ -285,6 +291,13 @@ class spell_shadow_portal_rooms : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_shadow_portal_rooms_SpellScript);
|
||||
|
||||
public:
|
||||
spell_shadow_portal_rooms_SpellScript()
|
||||
{
|
||||
_instance = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_instance = GetCaster()->GetInstanceScript();
|
||||
@@ -358,7 +371,6 @@ class spell_shadow_portal_rooms : public SpellScriptLoader
|
||||
OnEffectHit += SpellEffectFn(spell_shadow_portal_rooms_SpellScript::HandleSendEvent, EFFECT_1, SPELL_EFFECT_SEND_EVENT);
|
||||
}
|
||||
|
||||
private:
|
||||
InstanceScript* _instance;
|
||||
};
|
||||
|
||||
|
||||
@@ -78,7 +78,14 @@ public:
|
||||
|
||||
struct instance_shadowfang_keep_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_shadowfang_keep_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_shadowfang_keep_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
uiPhase = 0;
|
||||
uiTimer = 0;
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
std::string str_data;
|
||||
@@ -94,15 +101,6 @@ public:
|
||||
uint8 uiPhase;
|
||||
uint16 uiTimer;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
uiPhase = 0;
|
||||
uiTimer = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -50,6 +50,11 @@ class instance_stratholme : public InstanceMapScript
|
||||
instance_stratholme_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
EncounterState[i] = NOT_STARTED;
|
||||
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
IsSilverHandDead[i] = false;
|
||||
}
|
||||
|
||||
uint32 EncounterState[MAX_ENCOUNTER];
|
||||
@@ -73,18 +78,6 @@ class instance_stratholme : public InstanceMapScript
|
||||
GuidSet abomnationGUID;
|
||||
EventMap events;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
EncounterState[i] = NOT_STARTED;
|
||||
|
||||
for (uint8 i = 0; i < 5; ++i)
|
||||
IsSilverHandDead[i] = false;
|
||||
|
||||
crystalsGUID.clear();
|
||||
abomnationGUID.clear();
|
||||
}
|
||||
|
||||
bool StartSlaugtherSquare()
|
||||
{
|
||||
//change to DONE when crystals implemented
|
||||
|
||||
@@ -61,6 +61,14 @@ public:
|
||||
instance_sunken_temple_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
State = 0;
|
||||
|
||||
s1 = false;
|
||||
s2 = false;
|
||||
s3 = false;
|
||||
s4 = false;
|
||||
s5 = false;
|
||||
s6 = false;
|
||||
}
|
||||
|
||||
ObjectGuid GOAtalaiStatue1;
|
||||
@@ -80,19 +88,6 @@ public:
|
||||
bool s5;
|
||||
bool s6;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
|
||||
State = 0;
|
||||
|
||||
s1 = false;
|
||||
s2 = false;
|
||||
s3 = false;
|
||||
s4 = false;
|
||||
s5 = false;
|
||||
s6 = false;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* go) override
|
||||
{
|
||||
switch (go->GetEntry())
|
||||
|
||||
@@ -45,9 +45,7 @@ class instance_uldaman : public InstanceMapScript
|
||||
|
||||
struct instance_uldaman_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_uldaman_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void Initialize() override
|
||||
instance_uldaman_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
@@ -19,123 +19,56 @@
|
||||
/* ScriptData
|
||||
SDName: Isle_of_Queldanas
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 11524, 11525, 11532, 11533, 11542, 11543, 11541
|
||||
SDComment: Quest support: 11541
|
||||
SDCategory: Isle Of Quel'Danas
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npc_converted_sentry
|
||||
npc_greengill_slave
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "Player.h"
|
||||
#include "Pet.h"
|
||||
#include "SpellInfo.h"
|
||||
|
||||
/*######
|
||||
## npc_converted_sentry
|
||||
######*/
|
||||
enum ConvertedSentry
|
||||
{
|
||||
SAY_CONVERTED = 0,
|
||||
|
||||
SPELL_CONVERT_CREDIT = 45009
|
||||
};
|
||||
|
||||
class npc_converted_sentry : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_converted_sentry() : CreatureScript("npc_converted_sentry") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_converted_sentryAI(creature);
|
||||
}
|
||||
|
||||
struct npc_converted_sentryAI : public ScriptedAI
|
||||
{
|
||||
npc_converted_sentryAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Credit = false;
|
||||
Timer = 2500;
|
||||
}
|
||||
|
||||
bool Credit;
|
||||
uint32 Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!Credit)
|
||||
{
|
||||
if (Timer <= diff)
|
||||
{
|
||||
Talk(SAY_CONVERTED);
|
||||
|
||||
DoCast(me, SPELL_CONVERT_CREDIT);
|
||||
if (me->IsPet())
|
||||
me->ToPet()->SetDuration(7500);
|
||||
Credit = true;
|
||||
} else Timer -= diff;
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/*######
|
||||
## npc_greengill_slave
|
||||
######*/
|
||||
|
||||
#define ENRAGE 45111
|
||||
#define ORB 45109
|
||||
#define QUESTG 11541
|
||||
#define DM 25060
|
||||
enum GreengillSlave
|
||||
{
|
||||
NPC_DARKSPINE_MYRIDON = 25060,
|
||||
QUEST_GREENGILL_COAST = 11541,
|
||||
SPELL_ENRAGE = 45111,
|
||||
SPELL_ORB_MURLOC_CONTROL = 45109,
|
||||
SPELL_GREENGILL_SLAVE_FREED = 45110
|
||||
};
|
||||
|
||||
class npc_greengill_slave : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_greengill_slave() : CreatureScript("npc_greengill_slave") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_greengill_slaveAI(creature);
|
||||
}
|
||||
|
||||
struct npc_greengill_slaveAI : public ScriptedAI
|
||||
{
|
||||
npc_greengill_slaveAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
void SpellHit(Unit* caster, SpellInfo const* spellInfo) override
|
||||
{
|
||||
Player* player = caster->ToPlayer();
|
||||
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (spellInfo->Id == ORB && !me->HasAura(ENRAGE))
|
||||
if (spellInfo->Id == SPELL_ORB_MURLOC_CONTROL && !me->HasAura(SPELL_ENRAGE))
|
||||
{
|
||||
if (player->GetQuestStatus(QUESTG) == QUEST_STATUS_INCOMPLETE)
|
||||
DoCast(player, 45110, true);
|
||||
if (player->GetQuestStatus(QUEST_GREENGILL_COAST) == QUEST_STATUS_INCOMPLETE)
|
||||
DoCast(player, SPELL_GREENGILL_SLAVE_FREED, true);
|
||||
|
||||
DoCast(me, ENRAGE);
|
||||
DoCast(me, SPELL_ENRAGE);
|
||||
|
||||
if (Creature* Myrmidon = me->FindNearestCreature(DM, 70))
|
||||
if (Creature* Myrmidon = me->FindNearestCreature(NPC_DARKSPINE_MYRIDON, 70))
|
||||
{
|
||||
me->AddThreat(Myrmidon, 100000.0f);
|
||||
AttackStart(Myrmidon);
|
||||
@@ -148,10 +81,14 @@ public:
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_greengill_slaveAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_isle_of_queldanas()
|
||||
{
|
||||
new npc_converted_sentry();
|
||||
new npc_greengill_slave();
|
||||
}
|
||||
@@ -64,7 +64,14 @@ public:
|
||||
|
||||
struct instance_blackfathom_deeps_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_blackfathom_deeps_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
countFires = 0;
|
||||
deathTimes = 0;
|
||||
}
|
||||
|
||||
ObjectGuid twilightLordKelrisGUID;
|
||||
ObjectGuid shrine1GUID;
|
||||
@@ -79,15 +86,6 @@ public:
|
||||
uint8 countFires;
|
||||
uint8 deathTimes;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&encounter, 0, sizeof(encounter));
|
||||
|
||||
countFires = 0;
|
||||
deathTimes = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -55,19 +55,17 @@ public:
|
||||
|
||||
struct instance_mount_hyjal_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void Initialize() override
|
||||
instance_mount_hyjal_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
RaidDamage = 0;
|
||||
Trash = 0;
|
||||
hordeRetreat = 0;
|
||||
allianceRetreat = 0;
|
||||
RaidDamage = 0;
|
||||
Trash = 0;
|
||||
hordeRetreat = 0;
|
||||
allianceRetreat = 0;
|
||||
|
||||
ArchiYell = false;
|
||||
ArchiYell = false;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
|
||||
+8
-10
@@ -52,7 +52,14 @@ public:
|
||||
|
||||
struct instance_old_hillsbrad_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_old_hillsbrad_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_old_hillsbrad_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
mBarrelCount = 0;
|
||||
mThrallEventCount = 0;
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
uint32 mBarrelCount;
|
||||
@@ -62,15 +69,6 @@ public:
|
||||
ObjectGuid TarethaGUID;
|
||||
ObjectGuid EpochGUID;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
mBarrelCount = 0;
|
||||
mThrallEventCount = 0;
|
||||
}
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
+5
-7
@@ -80,7 +80,11 @@ public:
|
||||
|
||||
struct instance_the_black_morass_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_the_black_morass_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_the_black_morass_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
Clear();
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[EncounterCount];
|
||||
|
||||
@@ -92,12 +96,6 @@ public:
|
||||
ObjectGuid _medivhGUID;
|
||||
uint8 _currentRiftId;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
@@ -43,24 +43,22 @@ public:
|
||||
|
||||
struct instance_onyxias_lair_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_onyxias_lair_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
//Eruption is a BFS graph problem
|
||||
//One map to remember all floor, one map to keep floor that still need to erupt and one queue to know what needs to be removed
|
||||
|
||||
void Initialize() override
|
||||
instance_onyxias_lair_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
|
||||
onyxiaLiftoffTimer = 0;
|
||||
manyWhelpsCounter = 0;
|
||||
eruptTimer = 0;
|
||||
onyxiaLiftoffTimer = 0;
|
||||
manyWhelpsCounter = 0;
|
||||
eruptTimer = 0;
|
||||
|
||||
achievManyWhelpsHandleIt = false;
|
||||
achievSheDeepBreathMore = true;
|
||||
achievSheDeepBreathMore = true;
|
||||
}
|
||||
|
||||
//Eruption is a BFS graph problem
|
||||
//One map to remember all floor, one map to keep floor that still need to erupt and one queue to know what needs to be removed
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -55,16 +55,12 @@ public:
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
gongWave = 0;
|
||||
fiendsKilled = 0;
|
||||
reaversKilled = 0;
|
||||
summonLowRange = 0;
|
||||
gongWave = 0;
|
||||
fiendsKilled = 0;
|
||||
reaversKilled = 0;
|
||||
summonLowRange = 0;
|
||||
summonHighRange = 0;
|
||||
summonCreature = 0;
|
||||
summonCreature = 0;
|
||||
}
|
||||
|
||||
void OnGameObjectCreate(GameObject* gameObject) override
|
||||
|
||||
@@ -42,17 +42,15 @@ public:
|
||||
|
||||
struct instance_razorfen_kraul_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_razorfen_kraul_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
ObjectGuid DoorWardGUID;
|
||||
int WardKeeperDeath;
|
||||
|
||||
void Initialize() override
|
||||
instance_razorfen_kraul_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
WardKeeperDeath = 0;
|
||||
}
|
||||
|
||||
ObjectGuid DoorWardGUID;
|
||||
int WardKeeperDeath;
|
||||
|
||||
Player* GetPlayerInMap()
|
||||
{
|
||||
Map::PlayerList const& players = instance->GetPlayers();
|
||||
|
||||
@@ -39,7 +39,17 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript
|
||||
|
||||
struct instance_temple_of_ahnqiraj_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_temple_of_ahnqiraj_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
IsBossDied[0] = false;
|
||||
IsBossDied[1] = false;
|
||||
IsBossDied[2] = false;
|
||||
|
||||
BugTrioDeathCount = 0;
|
||||
|
||||
CthunPhase = 0;
|
||||
}
|
||||
|
||||
//If Vem is dead...
|
||||
bool IsBossDied[3];
|
||||
@@ -56,18 +66,6 @@ class instance_temple_of_ahnqiraj : public InstanceMapScript
|
||||
|
||||
uint32 CthunPhase;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
IsBossDied[0] = false;
|
||||
IsBossDied[1] = false;
|
||||
IsBossDied[2] = false;
|
||||
|
||||
BugTrioDeathCount = 0;
|
||||
|
||||
CthunPhase = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -41,14 +41,7 @@ public:
|
||||
|
||||
struct instance_wailing_caverns_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_wailing_caverns_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
bool yelled;
|
||||
ObjectGuid NaralexGUID;
|
||||
|
||||
void Initialize() override
|
||||
instance_wailing_caverns_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
@@ -56,6 +49,11 @@ public:
|
||||
yelled = false;
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
bool yelled;
|
||||
ObjectGuid NaralexGUID;
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
if (creature->GetEntry() == DATA_NARALEX)
|
||||
|
||||
@@ -108,7 +108,15 @@ public:
|
||||
|
||||
struct instance_zulfarrak_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_zulfarrak_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_zulfarrak_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
PyramidPhase = 0;
|
||||
major_wave_Timer = 0;
|
||||
minor_wave_Timer = 0;
|
||||
addGroupSize = 0;
|
||||
waypoint = 0;
|
||||
}
|
||||
|
||||
uint32 GahzRillaEncounter;
|
||||
ObjectGuid ZumrahGUID;
|
||||
@@ -124,16 +132,6 @@ public:
|
||||
uint32 addGroupSize;
|
||||
uint32 waypoint;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
PyramidPhase = 0;
|
||||
major_wave_Timer = 0;
|
||||
minor_wave_Timer = 0;
|
||||
addGroupSize = 0;
|
||||
waypoint = 0;
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
switch (creature->GetEntry())
|
||||
|
||||
@@ -238,6 +238,13 @@ class spell_ahn_kahet_swarm : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_ahn_kahet_swarm_SpellScript);
|
||||
|
||||
public:
|
||||
spell_ahn_kahet_swarm_SpellScript()
|
||||
{
|
||||
_targetCount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_SWARM_BUFF))
|
||||
@@ -245,12 +252,6 @@ class spell_ahn_kahet_swarm : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_targetCount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CountTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
_targetCount = targets.size();
|
||||
@@ -278,7 +279,6 @@ class spell_ahn_kahet_swarm : public SpellScriptLoader
|
||||
OnEffectHit += SpellEffectFn(spell_ahn_kahet_swarm_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _targetCount;
|
||||
};
|
||||
|
||||
|
||||
+1
-3
@@ -30,9 +30,7 @@ public:
|
||||
|
||||
struct instance_obsidian_sanctum_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_obsidian_sanctum_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void Initialize() override
|
||||
instance_obsidian_sanctum_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
}
|
||||
|
||||
+11
-13
@@ -41,7 +41,17 @@ public:
|
||||
|
||||
struct instance_trial_of_the_champion_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_trial_of_the_champion_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_trial_of_the_champion_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
uiMovementDone = 0;
|
||||
uiGrandChampionsDeaths = 0;
|
||||
uiArgentSoldierDeaths = 0;
|
||||
|
||||
bDone = false;
|
||||
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
@@ -66,18 +76,6 @@ public:
|
||||
|
||||
bool bDone;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
uiMovementDone = 0;
|
||||
uiGrandChampionsDeaths = 0;
|
||||
uiArgentSoldierDeaths = 0;
|
||||
|
||||
bDone = false;
|
||||
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
|
||||
+15
@@ -703,6 +703,14 @@ class spell_powering_up : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_powering_up_SpellScript);
|
||||
|
||||
public:
|
||||
spell_powering_up_SpellScript()
|
||||
{
|
||||
spellId = 0;
|
||||
poweringUp = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 spellId;
|
||||
uint32 poweringUp;
|
||||
|
||||
@@ -760,6 +768,13 @@ class spell_valkyr_essences : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_valkyr_essences_AuraScript);
|
||||
|
||||
public:
|
||||
spell_valkyr_essences_AuraScript()
|
||||
{
|
||||
spellId = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 spellId;
|
||||
|
||||
bool Load() override
|
||||
|
||||
+1
-3
@@ -29,9 +29,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
|
||||
|
||||
struct instance_trial_of_the_crusader_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void Initialize() override
|
||||
instance_trial_of_the_crusader_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTERS);
|
||||
|
||||
@@ -256,12 +256,13 @@ class spell_garfrost_permafrost : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_garfrost_permafrost_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_garfrost_permafrost_SpellScript()
|
||||
{
|
||||
prevented = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void PreventHitByLoS()
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
|
||||
@@ -421,6 +421,14 @@ class spell_tyrannus_overlord_brand : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_tyrannus_overlord_brand_AuraScript);
|
||||
|
||||
public:
|
||||
spell_tyrannus_overlord_brand_AuraScript()
|
||||
{
|
||||
oldAI = nullptr;
|
||||
oldAIState = false;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster() && GetCaster()->GetEntry() == NPC_TYRANNUS;
|
||||
|
||||
@@ -201,7 +201,8 @@ enum Actions
|
||||
|
||||
enum Misc
|
||||
{
|
||||
DATA_MADE_A_MESS = 45374613 // 4537, 4613 are achievement IDs
|
||||
DATA_MADE_A_MESS = 45374613, // 4537, 4613 are achievement IDs
|
||||
FACTION_SCOURGE = 974,
|
||||
};
|
||||
|
||||
enum MovePoints
|
||||
@@ -460,6 +461,8 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_INTRO_ALLIANCE_2:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(FACTION_SCOURGE);
|
||||
Talk(SAY_INTRO_ALLIANCE_2);
|
||||
break;
|
||||
case EVENT_INTRO_ALLIANCE_3:
|
||||
@@ -471,6 +474,8 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
DoCast(me, SPELL_GRIP_OF_AGONY);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_2:
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setFaction(FACTION_SCOURGE);
|
||||
Talk(SAY_INTRO_HORDE_2);
|
||||
break;
|
||||
case EVENT_INTRO_HORDE_4:
|
||||
@@ -544,7 +549,6 @@ class boss_deathbringer_saurfang : public CreatureScript
|
||||
case PHASE_INTRO_A:
|
||||
case PHASE_INTRO_H:
|
||||
{
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
// controls what events will execute
|
||||
events.SetPhase(uint32(action));
|
||||
|
||||
@@ -1215,13 +1219,13 @@ class spell_deathbringer_blood_nova_targeting : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_deathbringer_blood_nova_targeting_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_deathbringer_blood_nova_targeting_SpellScript()
|
||||
{
|
||||
// initialize variable
|
||||
target = NULL;
|
||||
return true;
|
||||
target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
void FilterTargetsInitial(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.empty())
|
||||
|
||||
@@ -1922,6 +1922,13 @@ class spell_igb_on_gunship_deck : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_igb_on_gunship_deck_AuraScript);
|
||||
|
||||
public:
|
||||
spell_igb_on_gunship_deck_AuraScript()
|
||||
{
|
||||
_teamInInstance = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
if (InstanceScript* instance = GetOwner()->GetInstanceScript())
|
||||
@@ -2031,6 +2038,13 @@ class spell_igb_incinerating_blast : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_igb_incinerating_blast_SpellScript);
|
||||
|
||||
public:
|
||||
spell_igb_incinerating_blast_SpellScript()
|
||||
{
|
||||
_energyLeft = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
void StoreEnergy()
|
||||
{
|
||||
_energyLeft = GetCaster()->GetPower(POWER_ENERGY) - 10;
|
||||
@@ -2370,9 +2384,15 @@ class spell_igb_check_for_players : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_igb_check_for_players_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_igb_check_for_players_SpellScript()
|
||||
{
|
||||
_playerCount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
|
||||
@@ -698,12 +698,13 @@ class spell_marrowgar_bone_slice : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_marrowgar_bone_slice_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_marrowgar_bone_slice_SpellScript()
|
||||
{
|
||||
_targetCount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void ClearSpikeImmunities()
|
||||
{
|
||||
GetCaster()->GetAI()->DoAction(ACTION_CLEAR_SPIKE_IMMUNITIES);
|
||||
|
||||
@@ -858,6 +858,13 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_putricide_ooze_channel_SpellScript);
|
||||
|
||||
public:
|
||||
spell_putricide_ooze_channel_SpellScript()
|
||||
{
|
||||
_target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* spell) override
|
||||
{
|
||||
if (!spell->ExcludeTargetAuraSpell)
|
||||
@@ -871,7 +878,6 @@ class spell_putricide_ooze_channel : public SpellScriptLoader
|
||||
// this will let use safely use ToCreature() casts in entire script
|
||||
bool Load() override
|
||||
{
|
||||
_target = NULL;
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
|
||||
@@ -507,12 +507,13 @@ class spell_rotface_mutated_infection : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rotface_mutated_infection_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_rotface_mutated_infection_SpellScript()
|
||||
{
|
||||
_target = NULL;
|
||||
return true;
|
||||
_target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
// remove targets with this aura already
|
||||
|
||||
@@ -1044,10 +1044,15 @@ class spell_sindragosa_s_fury : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_sindragosa_s_fury_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_sindragosa_s_fury_SpellScript()
|
||||
{
|
||||
_targetCount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
// This script should execute only in Icecrown Citadel
|
||||
if (InstanceMap* instance = GetCaster()->GetMap()->ToInstanceMap())
|
||||
if (instance->GetInstanceScript())
|
||||
|
||||
@@ -2080,12 +2080,13 @@ class spell_the_lich_king_necrotic_plague_jump : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_the_lich_king_necrotic_plague_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_the_lich_king_necrotic_plague_SpellScript()
|
||||
{
|
||||
_hadAura = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void SelectTarget(std::list<Unit*>& targets)
|
||||
{
|
||||
targets.sort(Trinity::ObjectDistanceOrderPred(GetCaster()));
|
||||
@@ -2120,12 +2121,13 @@ class spell_the_lich_king_necrotic_plague_jump : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_the_lich_king_necrotic_plague_AuraScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_the_lich_king_necrotic_plague_AuraScript()
|
||||
{
|
||||
_lastAmount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
@@ -2497,6 +2499,13 @@ class spell_the_lich_king_valkyr_target_search : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_the_lich_king_valkyr_target_search_SpellScript);
|
||||
|
||||
public:
|
||||
spell_the_lich_king_valkyr_target_search_SpellScript()
|
||||
{
|
||||
_target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ICE_BURST))
|
||||
@@ -2504,12 +2513,6 @@ class spell_the_lich_king_valkyr_target_search : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_target = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
void SelectTarget(std::list<WorldObject*>& targets)
|
||||
{
|
||||
if (targets.empty())
|
||||
@@ -2622,6 +2625,13 @@ class spell_the_lich_king_vile_spirits : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_the_lich_king_vile_spirits_AuraScript);
|
||||
|
||||
public:
|
||||
spell_the_lich_king_vile_spirits_AuraScript()
|
||||
{
|
||||
_is25Man = false;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_is25Man = GetUnitOwner()->GetMap()->Is25ManRaid();
|
||||
@@ -2684,9 +2694,15 @@ class spell_the_lich_king_vile_spirit_move_target_search : public SpellScriptLoa
|
||||
{
|
||||
PrepareSpellScript(spell_the_lich_king_vile_spirit_move_target_search_SpellScript);
|
||||
|
||||
public:
|
||||
spell_the_lich_king_vile_spirit_move_target_search_SpellScript()
|
||||
{
|
||||
_target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_target = NULL;
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
@@ -2873,6 +2889,13 @@ class spell_the_lich_king_restore_soul : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_the_lich_king_restore_soul_SpellScript);
|
||||
|
||||
public:
|
||||
spell_the_lich_king_restore_soul_SpellScript()
|
||||
{
|
||||
_instance = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_instance = GetCaster()->GetInstanceScript();
|
||||
|
||||
@@ -1158,6 +1158,13 @@ class spell_dreamwalker_decay_periodic_timer : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dreamwalker_decay_periodic_timer_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dreamwalker_decay_periodic_timer_AuraScript()
|
||||
{
|
||||
_decayRate = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_decayRate = GetId() != SPELL_TIMER_BLAZING_SKELETON ? 1000 : 5000;
|
||||
@@ -1385,6 +1392,13 @@ class spell_dreamwalker_nightmare_cloud : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dreamwalker_nightmare_cloud_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dreamwalker_nightmare_cloud_AuraScript()
|
||||
{
|
||||
_instance = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
_instance = GetOwner()->GetInstanceScript();
|
||||
|
||||
@@ -1880,12 +1880,13 @@ class spell_frost_giant_death_plague : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_frost_giant_death_plague_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_frost_giant_death_plague_SpellScript()
|
||||
{
|
||||
_failed = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
// First effect
|
||||
void CountTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
|
||||
@@ -2459,6 +2459,13 @@ class spell_alexstrasza_gift_beam_visual : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_alexstrasza_gift_beam_visual_AuraScript);
|
||||
|
||||
public:
|
||||
spell_alexstrasza_gift_beam_visual_AuraScript()
|
||||
{
|
||||
_alexstraszaGift = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
|
||||
@@ -40,7 +40,11 @@ public:
|
||||
|
||||
struct instance_nexus_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_nexus_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[NUMBER_OF_ENCOUNTERS];
|
||||
|
||||
@@ -53,12 +57,6 @@ public:
|
||||
|
||||
std::string strInstData;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
void OnCreatureCreate(Creature* creature) override
|
||||
{
|
||||
Map::PlayerList const &players = instance->GetPlayers();
|
||||
|
||||
@@ -1206,9 +1206,15 @@ class spell_algalon_big_bang : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_algalon_big_bang_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_algalon_big_bang_SpellScript()
|
||||
{
|
||||
_targetCount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT && GetCaster()->IsAIEnabled;
|
||||
}
|
||||
|
||||
|
||||
@@ -1688,12 +1688,13 @@ class spell_pursue : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_pursue_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_pursue_SpellScript()
|
||||
{
|
||||
_target = NULL;
|
||||
return true;
|
||||
_target = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
targets.remove_if(FlameLeviathanPursuedTargetSelector(GetCaster()));
|
||||
|
||||
@@ -1748,6 +1748,13 @@ class spell_mimiron_fire_search : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_mimiron_fire_search_SpellScript);
|
||||
|
||||
public:
|
||||
spell_mimiron_fire_search_SpellScript()
|
||||
{
|
||||
_noTarget = false;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_WATER_SPRAY))
|
||||
@@ -1755,12 +1762,6 @@ class spell_mimiron_fire_search : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_noTarget = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
_noTarget = targets.empty();
|
||||
|
||||
@@ -60,7 +60,32 @@ class instance_ulduar : public InstanceMapScript
|
||||
|
||||
struct instance_ulduar_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map) { }
|
||||
instance_ulduar_InstanceMapScript(InstanceMap* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
|
||||
LoadDoorData(doorData);
|
||||
LoadMinionData(minionData);
|
||||
|
||||
_algalonTimer = 61;
|
||||
_maxArmorItemLevel = 0;
|
||||
_maxWeaponItemLevel = 0;
|
||||
TeamInInstance = 0;
|
||||
HodirRareCacheData = 0;
|
||||
ColossusData = 0;
|
||||
elderCount = 0;
|
||||
illusion = 0;
|
||||
keepersCount = 0;
|
||||
conSpeedAtory = false;
|
||||
Unbroken = true;
|
||||
IsDriveMeCrazyEligible = true;
|
||||
_algalonSummoned = false;
|
||||
_summonAlgalon = false;
|
||||
|
||||
memset(_summonObservationRingKeeper, 0, sizeof(_summonObservationRingKeeper));
|
||||
memset(_summonYSKeeper, 0, sizeof(_summonYSKeeper));
|
||||
}
|
||||
|
||||
// Creatures
|
||||
ObjectGuid LeviathanGUID;
|
||||
@@ -119,31 +144,6 @@ class instance_ulduar : public InstanceMapScript
|
||||
bool Unbroken;
|
||||
bool IsDriveMeCrazyEligible;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(MAX_ENCOUNTER);
|
||||
LoadDoorData(doorData);
|
||||
LoadMinionData(minionData);
|
||||
_algalonTimer = 61;
|
||||
_maxArmorItemLevel = 0;
|
||||
_maxWeaponItemLevel = 0;
|
||||
TeamInInstance = 0;
|
||||
HodirRareCacheData = 0;
|
||||
ColossusData = 0;
|
||||
elderCount = 0;
|
||||
illusion = 0;
|
||||
keepersCount = 0;
|
||||
conSpeedAtory = false;
|
||||
Unbroken = true;
|
||||
IsDriveMeCrazyEligible = true;
|
||||
_algalonSummoned = false;
|
||||
_summonAlgalon = false;
|
||||
|
||||
memset(_summonObservationRingKeeper, 0, sizeof(_summonObservationRingKeeper));
|
||||
memset(_summonYSKeeper, 0, sizeof(_summonYSKeeper));
|
||||
}
|
||||
|
||||
void FillInitialWorldStates(WorldPacket& packet) override
|
||||
{
|
||||
packet << uint32(WORLD_STATE_ALGALON_TIMER_ENABLED) << uint32(_algalonTimer && _algalonTimer <= 60);
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(100 - HealthAmountMultipler * HealthAmountModifier, damage))
|
||||
if (me->HealthBelowPctDamaged(100 - HealthAmountMultipler * HealthAmountModifier, damage) && !(damage >= me->GetHealth()))
|
||||
{
|
||||
uint8 Order = HealthAmountModifier - 1;
|
||||
++HealthAmountModifier;
|
||||
|
||||
@@ -225,12 +225,13 @@ class spell_koralon_meteor_fists_damage : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_koralon_meteor_fists_damage_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_koralon_meteor_fists_damage_SpellScript()
|
||||
{
|
||||
_chainTargets = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
_chainTargets = targets.size();
|
||||
|
||||
@@ -112,7 +112,34 @@ public:
|
||||
|
||||
struct instance_violet_hold_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_violet_hold_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_violet_hold_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
|
||||
uiRemoveNpc = 0;
|
||||
|
||||
uiDoorIntegrity = 100;
|
||||
|
||||
uiWaveCount = 0;
|
||||
uiLocation = urand(0, 5);
|
||||
uiFirstBoss = 0;
|
||||
uiSecondBoss = 0;
|
||||
uiCountErekemGuards = 0;
|
||||
uiCountActivationCrystals = 0;
|
||||
uiCyanigosaEventPhase = 1;
|
||||
|
||||
uiActivationTimer = 5000;
|
||||
uiDoorSpellTimer = 2000;
|
||||
uiCyanigosaEventTimer = 3 * IN_MILLISECONDS;
|
||||
|
||||
bActive = false;
|
||||
bIsDoorSpellCast = false;
|
||||
bCrystalActivated = false;
|
||||
defenseless = true;
|
||||
uiMainEventPhase = NOT_STARTED;
|
||||
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
ObjectGuid uiMoragg;
|
||||
ObjectGuid uiErekem;
|
||||
@@ -168,35 +195,6 @@ public:
|
||||
|
||||
std::string str_data;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
|
||||
uiRemoveNpc = 0;
|
||||
|
||||
uiDoorIntegrity = 100;
|
||||
|
||||
uiWaveCount = 0;
|
||||
uiLocation = urand(0, 5);
|
||||
uiFirstBoss = 0;
|
||||
uiSecondBoss = 0;
|
||||
uiCountErekemGuards = 0;
|
||||
uiCountActivationCrystals = 0;
|
||||
uiCyanigosaEventPhase = 1;
|
||||
|
||||
uiActivationTimer = 5000;
|
||||
uiDoorSpellTimer = 2000;
|
||||
uiCyanigosaEventTimer = 3*IN_MILLISECONDS;
|
||||
|
||||
bActive = false;
|
||||
bIsDoorSpellCast = false;
|
||||
bCrystalActivated = false;
|
||||
defenseless = true;
|
||||
uiMainEventPhase = NOT_STARTED;
|
||||
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
|
||||
@@ -812,12 +812,13 @@ class spell_close_rift : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_close_rift_AuraScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_close_rift_AuraScript()
|
||||
{
|
||||
_counter = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
return sSpellMgr->GetSpellInfo(SPELL_DESPAWN_RIFT) != nullptr;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2008-2014 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
|
||||
@@ -23,13 +22,9 @@ SDComment: Need more tuning of spell timers, it should not be as linear fight as
|
||||
SDCategory: Auchindoun, Mana Tombs
|
||||
EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
boss_nexusprince_shaffar
|
||||
npc_ethereal_beacon
|
||||
EndContentData */
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "mana_tombs.h"
|
||||
|
||||
enum Yells
|
||||
{
|
||||
@@ -37,7 +32,7 @@ enum Yells
|
||||
SAY_AGGRO = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_SUMMON = 3,
|
||||
SAY_DEAD = 4,
|
||||
SAY_DEAD = 4
|
||||
};
|
||||
|
||||
enum Spells
|
||||
@@ -66,326 +61,271 @@ enum Misc
|
||||
NR_INITIAL_BEACONS = 3
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
EVENT_BLINK = 1,
|
||||
EVENT_BEACON,
|
||||
EVENT_FIREBALL,
|
||||
EVENT_FROSTBOLT,
|
||||
EVENT_FROST_NOVA
|
||||
};
|
||||
|
||||
class boss_nexusprince_shaffar : public CreatureScript
|
||||
{
|
||||
public:
|
||||
boss_nexusprince_shaffar() : CreatureScript("boss_nexusprince_shaffar") { }
|
||||
public:
|
||||
boss_nexusprince_shaffar() : CreatureScript("boss_nexusprince_shaffar") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new boss_nexusprince_shaffarAI(creature);
|
||||
}
|
||||
|
||||
struct boss_nexusprince_shaffarAI : public ScriptedAI
|
||||
{
|
||||
boss_nexusprince_shaffarAI(Creature* creature) : ScriptedAI(creature), summons(me)
|
||||
struct boss_nexusprince_shaffarAI : public BossAI
|
||||
{
|
||||
Initialize();
|
||||
HasTaunted = false;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Blink_Timer = 1500;
|
||||
Beacon_Timer = 10000;
|
||||
FireBall_Timer = 8000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 15000;
|
||||
|
||||
CanBlink = false;
|
||||
}
|
||||
|
||||
uint32 Blink_Timer;
|
||||
uint32 Beacon_Timer;
|
||||
uint32 FireBall_Timer;
|
||||
uint32 Frostbolt_Timer;
|
||||
uint32 FrostNova_Timer;
|
||||
|
||||
SummonList summons;
|
||||
|
||||
bool HasTaunted;
|
||||
bool CanBlink;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
|
||||
float dist = 8.0f;
|
||||
float posX, posY, posZ, angle;
|
||||
me->GetHomePosition(posX, posY, posZ, angle);
|
||||
|
||||
me->SummonCreature(NPC_BEACON, posX - dist, posY - dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
me->SummonCreature(NPC_BEACON, posX - dist, posY + dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
me->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
}
|
||||
|
||||
void EnterEvadeMode() override
|
||||
{
|
||||
summons.DespawnAll();
|
||||
ScriptedAI::EnterEvadeMode();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
|
||||
{
|
||||
if (!HasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
|
||||
boss_nexusprince_shaffarAI(Creature* creature) : BossAI(creature, DATA_NEXUSPRINCE_SHAFFAR)
|
||||
{
|
||||
Talk(SAY_INTRO);
|
||||
HasTaunted = true;
|
||||
}
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
|
||||
DoZoneInCombat();
|
||||
summons.DoZoneInCombat();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_BEACON)
|
||||
{
|
||||
summoned->CastSpell(summoned, SPELL_ETHEREAL_BEACON_VISUAL, false);
|
||||
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->AI()->AttackStart(target);
|
||||
_hasTaunted = false;
|
||||
}
|
||||
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void SummonedCreatureDespawn(Creature* summon) override
|
||||
{
|
||||
summons.Despawn(summon);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEAD);
|
||||
summons.DespawnAll();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (FrostNova_Timer <= diff)
|
||||
void Reset() override
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
_Reset();
|
||||
|
||||
DoCast(me, SPELL_FROSTNOVA);
|
||||
FrostNova_Timer = urand(17500, 25000);
|
||||
CanBlink = true;
|
||||
} else FrostNova_Timer -= diff;
|
||||
float dist = 8.0f;
|
||||
float posX, posY, posZ, angle;
|
||||
me->GetHomePosition(posX, posY, posZ, angle);
|
||||
|
||||
if (Frostbolt_Timer <= diff)
|
||||
me->SummonCreature(NPC_BEACON, posX - dist, posY - dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
me->SummonCreature(NPC_BEACON, posX - dist, posY + dist, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
me->SummonCreature(NPC_BEACON, posX + dist, posY, posZ, angle, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 7200000);
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who) override
|
||||
{
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
Frostbolt_Timer = urand(4500, 6000);
|
||||
} else Frostbolt_Timer -= diff;
|
||||
|
||||
if (FireBall_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_FIREBALL);
|
||||
FireBall_Timer = urand(4500, 6000);
|
||||
} else FireBall_Timer -= diff;
|
||||
|
||||
if (CanBlink)
|
||||
{
|
||||
if (Blink_Timer <= diff)
|
||||
if (!_hasTaunted && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 100.0f))
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
|
||||
//expire movement, will prevent from running right back to victim after cast
|
||||
//(but should MoveChase be used again at a certain time or should he not move?)
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
|
||||
DoCast(me, SPELL_BLINK);
|
||||
Blink_Timer = urand(1000, 2500);
|
||||
CanBlink = false;
|
||||
} else Blink_Timer -= diff;
|
||||
Talk(SAY_INTRO);
|
||||
_hasTaunted = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (Beacon_Timer <= diff)
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
Talk(SAY_AGGRO);
|
||||
_EnterCombat();
|
||||
|
||||
if (!urand(0, 3))
|
||||
Talk(SAY_SUMMON);
|
||||
events.ScheduleEvent(EVENT_BEACON, 10000);
|
||||
events.ScheduleEvent(EVENT_FIREBALL, 8000);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, 4000);
|
||||
events.ScheduleEvent(EVENT_FROST_NOVA, 15000);
|
||||
}
|
||||
|
||||
DoCast(me, SPELL_ETHEREAL_BEACON, true);
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
if (summoned->GetEntry() == NPC_BEACON)
|
||||
{
|
||||
summoned->CastSpell(summoned, SPELL_ETHEREAL_BEACON_VISUAL, false);
|
||||
|
||||
Beacon_Timer = 10000;
|
||||
} else Beacon_Timer -= diff;
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
summoned->AI()->AttackStart(target);
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
summons.Summon(summoned);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEAD);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void ExecuteEvent(uint32 eventId) override
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_BLINK:
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
|
||||
// expire movement, will prevent from running right back to victim after cast
|
||||
// (but should MoveChase be used again at a certain time or should he not move?)
|
||||
if (me->GetMotionMaster()->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
|
||||
DoCast(me, SPELL_BLINK);
|
||||
break;
|
||||
case EVENT_BEACON:
|
||||
if (!urand(0, 3))
|
||||
Talk(SAY_SUMMON);
|
||||
|
||||
DoCast(me, SPELL_ETHEREAL_BEACON, true);
|
||||
events.ScheduleEvent(EVENT_BEACON, 10000);
|
||||
break;
|
||||
case EVENT_FIREBALL:
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
events.ScheduleEvent(EVENT_FIREBALL, urand(4500, 6000));
|
||||
break;
|
||||
case EVENT_FROSTBOLT:
|
||||
DoCastVictim(SPELL_FROSTBOLT);
|
||||
events.ScheduleEvent(EVENT_FROSTBOLT, urand(4500, 6000));
|
||||
break;
|
||||
case EVENT_FROST_NOVA:
|
||||
DoCast(me, SPELL_FROSTNOVA);
|
||||
events.ScheduleEvent(EVENT_FROST_NOVA, urand(17500, 25000));
|
||||
events.ScheduleEvent(EVENT_BLINK, 1500);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
bool _hasTaunted;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetManaTombsAI<boss_nexusprince_shaffarAI>(creature);
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
enum EtherealBeacon
|
||||
{
|
||||
EVENT_APPRENTICE = 1,
|
||||
EVENT_ARCANE_BOLT
|
||||
};
|
||||
|
||||
class npc_ethereal_beacon : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_ethereal_beacon() : CreatureScript("npc_ethereal_beacon") { }
|
||||
public:
|
||||
npc_ethereal_beacon() : CreatureScript("npc_ethereal_beacon") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ethereal_beaconAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ethereal_beaconAI : public ScriptedAI
|
||||
{
|
||||
npc_ethereal_beaconAI(Creature* creature) : ScriptedAI(creature)
|
||||
struct npc_ethereal_beaconAI : public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
npc_ethereal_beaconAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Apprentice_Timer = DUNGEON_MODE(20000, 10000);
|
||||
ArcaneBolt_Timer = 1000;
|
||||
Check_Timer = 1000;
|
||||
}
|
||||
|
||||
uint32 Apprentice_Timer;
|
||||
uint32 ArcaneBolt_Timer;
|
||||
uint32 Check_Timer;
|
||||
|
||||
void KillSelf()
|
||||
{
|
||||
me->Kill(me);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
// Send Shaffar to fight
|
||||
Creature* Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
|
||||
if (!Shaffar || Shaffar->isDead())
|
||||
void Reset() override
|
||||
{
|
||||
KillSelf();
|
||||
return;
|
||||
_events.Reset();
|
||||
}
|
||||
if (!Shaffar->IsInCombat())
|
||||
Shaffar->AI()->AttackStart(who);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Check_Timer <= diff)
|
||||
void EnterCombat(Unit* who) override
|
||||
{
|
||||
Creature* Shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100);
|
||||
if (!Shaffar || Shaffar->isDead() || !Shaffar->IsInCombat())
|
||||
{
|
||||
KillSelf();
|
||||
if (Creature* shaffar = me->FindNearestCreature(NPC_SHAFFAR, 100.0f))
|
||||
if (!shaffar->IsInCombat())
|
||||
shaffar->AI()->AttackStart(who);
|
||||
|
||||
_events.ScheduleEvent(EVENT_APPRENTICE, DUNGEON_MODE(20000, 10000));
|
||||
_events.ScheduleEvent(EVENT_ARCANE_BOLT, 1000);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned) override
|
||||
{
|
||||
summoned->AI()->AttackStart(me->GetVictim());
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_APPRENTICE:
|
||||
DoCast(me, SPELL_ETHEREAL_APPRENTICE, true);
|
||||
me->DespawnOrUnsummon();
|
||||
break;
|
||||
case EVENT_ARCANE_BOLT:
|
||||
DoCastVictim(SPELL_ARCANE_BOLT);
|
||||
_events.ScheduleEvent(EVENT_ARCANE_BOLT, urand(2000, 4500));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
Check_Timer = 1000;
|
||||
} else Check_Timer -= diff;
|
||||
}
|
||||
|
||||
if (ArcaneBolt_Timer <= diff)
|
||||
{
|
||||
DoCastVictim(SPELL_ARCANE_BOLT);
|
||||
ArcaneBolt_Timer = urand(2000, 4500);
|
||||
} else ArcaneBolt_Timer -= diff;
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
if (Apprentice_Timer <= diff)
|
||||
{
|
||||
if (me->IsNonMeleeSpellCast(false))
|
||||
me->InterruptNonMeleeSpells(true);
|
||||
|
||||
DoCast(me, SPELL_ETHEREAL_APPRENTICE, true);
|
||||
me->DespawnOrUnsummon();
|
||||
return;
|
||||
} else Apprentice_Timer -= diff;
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ethereal_beaconAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
enum Ethereal
|
||||
enum EtherealApprentice
|
||||
{
|
||||
SPELL_ETHEREAL_APPRENTICE_FIREBOLT = 32369,
|
||||
SPELL_ETHEREAL_APPRENTICE_FROSTBOLT = 32370
|
||||
SPELL_ETHEREAL_APPRENTICE_FROSTBOLT = 32370,
|
||||
EVENT_ETHEREAL_APPRENTICE_FIREBOLT = 1,
|
||||
EVENT_ETHEREAL_APPRENTICE_FROSTBOLT
|
||||
};
|
||||
|
||||
class npc_ethereal_apprentice : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_ethereal_apprentice() : CreatureScript("npc_ethereal_apprentice") { }
|
||||
public:
|
||||
npc_ethereal_apprentice() : CreatureScript("npc_ethereal_apprentice") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ethereal_apprenticeAI(creature);
|
||||
}
|
||||
|
||||
struct npc_ethereal_apprenticeAI : public ScriptedAI
|
||||
{
|
||||
npc_ethereal_apprenticeAI(Creature* creature) : ScriptedAI(creature)
|
||||
struct npc_ethereal_apprenticeAI : public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
npc_ethereal_apprenticeAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Cast_Timer = 3000;
|
||||
isFireboltTurn = true;
|
||||
}
|
||||
|
||||
uint32 Cast_Timer;
|
||||
|
||||
bool isFireboltTurn;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (Cast_Timer <= diff)
|
||||
void Reset() override
|
||||
{
|
||||
if (isFireboltTurn)
|
||||
{
|
||||
DoCastVictim(SPELL_ETHEREAL_APPRENTICE_FIREBOLT, true);
|
||||
isFireboltTurn = false;
|
||||
}else{
|
||||
DoCastVictim(SPELL_ETHEREAL_APPRENTICE_FROSTBOLT, true);
|
||||
isFireboltTurn = true;
|
||||
}
|
||||
Cast_Timer = 3000;
|
||||
} else Cast_Timer -= diff;
|
||||
}
|
||||
};
|
||||
_events.Reset();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
_events.ScheduleEvent(EVENT_ETHEREAL_APPRENTICE_FIREBOLT, 3000);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_ETHEREAL_APPRENTICE_FIREBOLT:
|
||||
DoCastVictim(SPELL_ETHEREAL_APPRENTICE_FIREBOLT, true);
|
||||
_events.ScheduleEvent(EVENT_ETHEREAL_APPRENTICE_FROSTBOLT, 3000);
|
||||
break;
|
||||
case EVENT_ETHEREAL_APPRENTICE_FROSTBOLT:
|
||||
DoCastVictim(SPELL_ETHEREAL_APPRENTICE_FROSTBOLT, true);
|
||||
_events.ScheduleEvent(EVENT_ETHEREAL_APPRENTICE_FIREBOLT, 3000);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new npc_ethereal_apprenticeAI(creature);
|
||||
}
|
||||
};
|
||||
|
||||
enum Yor
|
||||
@@ -407,7 +347,7 @@ public:
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(6000,9000));
|
||||
_events.ScheduleEvent(EVENT_DOUBLE_BREATH, urand(6000,9000));
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -415,26 +355,27 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
{
|
||||
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(6000,9000));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
EventMap events;
|
||||
EventMap _events;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
|
||||
@@ -88,10 +88,6 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
instance_serpentshrine_cavern_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
}
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
StrangePool = 0;
|
||||
@@ -106,7 +102,6 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
FrenzySpawnTimer = 2000;
|
||||
DoSpawnFrenzy = false;
|
||||
TrashCount = 0;
|
||||
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
|
||||
@@ -66,6 +66,7 @@ class boss_kelidan_the_breaker : public CreatureScript
|
||||
boss_kelidan_the_breakerAI(Creature* creature) : BossAI(creature, DATA_KELIDAN_THE_BREAKER)
|
||||
{
|
||||
Initialize();
|
||||
Firenova_Timer = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
|
||||
-4
@@ -37,10 +37,6 @@ class instance_ramparts : public InstanceMapScript
|
||||
instance_ramparts_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
spawned = false;
|
||||
}
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
}
|
||||
|
||||
+5
-9
@@ -54,6 +54,11 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
{
|
||||
instance_magtheridons_lair_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
CageTimer = 0;
|
||||
RespawnTimer = 0;
|
||||
}
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
@@ -66,15 +71,6 @@ class instance_magtheridons_lair : public InstanceMapScript
|
||||
uint32 CageTimer;
|
||||
uint32 RespawnTimer;
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
CageTimer = 0;
|
||||
RespawnTimer = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
|
||||
+1
-3
@@ -39,9 +39,7 @@ class instance_shattered_halls : public InstanceMapScript
|
||||
|
||||
struct instance_shattered_halls_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_shattered_halls_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
|
||||
void Initialize() override
|
||||
instance_shattered_halls_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
SetBossNumber(EncounterCount);
|
||||
|
||||
@@ -46,7 +46,14 @@ class instance_the_eye : public InstanceMapScript
|
||||
|
||||
struct instance_the_eye_InstanceMapScript : public InstanceScript
|
||||
{
|
||||
instance_the_eye_InstanceMapScript(Map* map) : InstanceScript(map) { }
|
||||
instance_the_eye_InstanceMapScript(Map* map) : InstanceScript(map)
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
KaelthasEventPhase = 0;
|
||||
AlarEventPhase = 0;
|
||||
}
|
||||
|
||||
ObjectGuid ThaladredTheDarkener;
|
||||
ObjectGuid LordSanguinar;
|
||||
@@ -60,15 +67,6 @@ class instance_the_eye : public InstanceMapScript
|
||||
|
||||
uint32 m_auiEncounter[MAX_ENCOUNTER];
|
||||
|
||||
void Initialize() override
|
||||
{
|
||||
SetHeaders(DataHeader);
|
||||
memset(&m_auiEncounter, 0, sizeof(m_auiEncounter));
|
||||
|
||||
KaelthasEventPhase = 0;
|
||||
AlarEventPhase = 0;
|
||||
}
|
||||
|
||||
bool IsEncounterInProgress() const override
|
||||
{
|
||||
for (uint8 i = 0; i < MAX_ENCOUNTER; ++i)
|
||||
|
||||
@@ -218,7 +218,21 @@ public:
|
||||
|
||||
struct npc_mature_netherwing_drakeAI : public ScriptedAI
|
||||
{
|
||||
npc_mature_netherwing_drakeAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_mature_netherwing_drakeAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
uiPlayerGUID.Clear();
|
||||
|
||||
bCanEat = false;
|
||||
bIsEating = false;
|
||||
|
||||
EatTimer = 5000;
|
||||
CastTimer = 5000;
|
||||
}
|
||||
|
||||
ObjectGuid uiPlayerGUID;
|
||||
|
||||
@@ -230,13 +244,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
uiPlayerGUID.Clear();
|
||||
|
||||
bCanEat = false;
|
||||
bIsEating = false;
|
||||
|
||||
EatTimer = 5000;
|
||||
CastTimer = 5000;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* pCaster, SpellInfo const* spell) override
|
||||
@@ -486,7 +494,17 @@ public:
|
||||
|
||||
struct npc_dragonmaw_peonAI : public ScriptedAI
|
||||
{
|
||||
npc_dragonmaw_peonAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_dragonmaw_peonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PlayerGUID.Clear();
|
||||
Tapped = false;
|
||||
PoisonTimer = 0;
|
||||
}
|
||||
|
||||
ObjectGuid PlayerGUID;
|
||||
bool Tapped;
|
||||
@@ -494,9 +512,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
PlayerGUID.Clear();
|
||||
Tapped = false;
|
||||
PoisonTimer = 0;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* caster, const SpellInfo* spell) override
|
||||
@@ -720,7 +736,21 @@ public:
|
||||
|
||||
struct npc_overlord_morghorAI : public ScriptedAI
|
||||
{
|
||||
npc_overlord_morghorAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_overlord_morghorAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
PlayerGUID.Clear();
|
||||
IllidanGUID.Clear();
|
||||
|
||||
ConversationTimer = 0;
|
||||
Step = 0;
|
||||
|
||||
Event = false;
|
||||
}
|
||||
|
||||
ObjectGuid PlayerGUID;
|
||||
ObjectGuid IllidanGUID;
|
||||
@@ -732,13 +762,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
PlayerGUID.Clear();
|
||||
IllidanGUID.Clear();
|
||||
|
||||
ConversationTimer = 0;
|
||||
Step = 0;
|
||||
|
||||
Event = false;
|
||||
Initialize();
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, 2);
|
||||
}
|
||||
|
||||
@@ -1264,7 +1288,22 @@ public:
|
||||
|
||||
struct npc_torloth_the_magnificentAI : public ScriptedAI
|
||||
{
|
||||
npc_torloth_the_magnificentAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_torloth_the_magnificentAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
SpellTimer1 = 0;
|
||||
SpellTimer2 = 0;
|
||||
SpellTimer3 = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
AnimationTimer = 4000;
|
||||
AnimationCount = 0;
|
||||
LordIllidanGUID.Clear();
|
||||
AggroTargetGUID.Clear();
|
||||
Timers = false;
|
||||
}
|
||||
|
||||
uint32 AnimationTimer, SpellTimer1, SpellTimer2, SpellTimer3;
|
||||
|
||||
@@ -1277,11 +1316,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
AnimationTimer = 4000;
|
||||
AnimationCount = 0;
|
||||
LordIllidanGUID.Clear();
|
||||
AggroTargetGUID.Clear();
|
||||
Timers = false;
|
||||
Initialize();
|
||||
|
||||
me->AddUnitState(UNIT_STATE_ROOT);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
@@ -1569,7 +1604,19 @@ public:
|
||||
|
||||
struct npc_illidari_spawnAI : public ScriptedAI
|
||||
{
|
||||
npc_illidari_spawnAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_illidari_spawnAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
SpellTimer1 = 0;
|
||||
SpellTimer2 = 0;
|
||||
SpellTimer3 = 0;
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
LordIllidanGUID.Clear();
|
||||
Timers = false;
|
||||
}
|
||||
|
||||
ObjectGuid LordIllidanGUID;
|
||||
uint32 SpellTimer1, SpellTimer2, SpellTimer3;
|
||||
@@ -1577,8 +1624,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
LordIllidanGUID.Clear();
|
||||
Timers = false;
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override { }
|
||||
|
||||
@@ -87,15 +87,19 @@ public:
|
||||
{
|
||||
npc_raliq_the_drunkAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
m_uiNormFaction = creature->getFaction();
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Uppercut_Timer = 5000;
|
||||
}
|
||||
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 Uppercut_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Uppercut_Timer = 5000;
|
||||
Initialize();
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
@@ -161,13 +165,21 @@ public:
|
||||
|
||||
struct npc_salsalabimAI : public ScriptedAI
|
||||
{
|
||||
npc_salsalabimAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_salsalabimAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
MagneticPull_Timer = 15000;
|
||||
}
|
||||
|
||||
uint32 MagneticPull_Timer;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
MagneticPull_Timer = 15000;
|
||||
Initialize();
|
||||
me->RestoreFaction();
|
||||
}
|
||||
|
||||
|
||||
@@ -68,7 +68,17 @@ public:
|
||||
|
||||
struct npc_unkor_the_ruthlessAI : public ScriptedAI
|
||||
{
|
||||
npc_unkor_the_ruthlessAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
npc_unkor_the_ruthlessAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
CanDoQuest = false;
|
||||
UnkorUnfriendly_Timer = 0;
|
||||
Pulverize_Timer = 3000;
|
||||
}
|
||||
|
||||
bool CanDoQuest;
|
||||
uint32 UnkorUnfriendly_Timer;
|
||||
@@ -76,9 +86,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
CanDoQuest = false;
|
||||
UnkorUnfriendly_Timer = 0;
|
||||
Pulverize_Timer = 3000;
|
||||
Initialize();
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
me->setFaction(FACTION_HOSTILE);
|
||||
}
|
||||
@@ -397,9 +405,17 @@ public:
|
||||
{
|
||||
npc_floonAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
m_uiNormFaction = creature->getFaction();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
Silence_Timer = 2000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 9000;
|
||||
}
|
||||
|
||||
uint32 m_uiNormFaction;
|
||||
uint32 Silence_Timer;
|
||||
uint32 Frostbolt_Timer;
|
||||
@@ -407,9 +423,7 @@ public:
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
Silence_Timer = 2000;
|
||||
Frostbolt_Timer = 4000;
|
||||
FrostNova_Timer = 9000;
|
||||
Initialize();
|
||||
if (me->getFaction() != m_uiNormFaction)
|
||||
me->setFaction(m_uiNormFaction);
|
||||
}
|
||||
|
||||
@@ -78,6 +78,13 @@ class spell_dk_anti_magic_shell_raid : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dk_anti_magic_shell_raid_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dk_anti_magic_shell_raid_AuraScript()
|
||||
{
|
||||
absorbPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbPct;
|
||||
|
||||
bool Load() override
|
||||
@@ -120,6 +127,14 @@ class spell_dk_anti_magic_shell_self : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dk_anti_magic_shell_self_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dk_anti_magic_shell_self_AuraScript()
|
||||
{
|
||||
absorbPct = 0;
|
||||
hpPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbPct, hpPct;
|
||||
bool Load() override
|
||||
{
|
||||
@@ -177,6 +192,13 @@ class spell_dk_anti_magic_zone : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dk_anti_magic_zone_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dk_anti_magic_zone_AuraScript()
|
||||
{
|
||||
absorbPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbPct;
|
||||
|
||||
bool Load() override
|
||||
@@ -228,6 +250,13 @@ class spell_dk_blood_boil : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_dk_blood_boil_SpellScript);
|
||||
|
||||
public:
|
||||
spell_dk_blood_boil_SpellScript()
|
||||
{
|
||||
_executed = false;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_BOIL_TRIGGERED))
|
||||
@@ -237,7 +266,6 @@ class spell_dk_blood_boil : public SpellScriptLoader
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_executed = false;
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCaster()->getClass() == CLASS_DEATH_KNIGHT;
|
||||
}
|
||||
|
||||
@@ -274,6 +302,13 @@ class spell_dk_blood_gorged : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dk_blood_gorged_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dk_blood_gorged_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DK_BLOOD_GORGED_HEAL))
|
||||
@@ -281,12 +316,6 @@ class spell_dk_blood_gorged : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_procTarget = GetTarget()->GetOwner();
|
||||
@@ -1192,6 +1221,14 @@ class spell_dk_raise_dead : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_dk_raise_dead_SpellScript);
|
||||
|
||||
public:
|
||||
spell_dk_raise_dead_SpellScript()
|
||||
{
|
||||
_result = SPELL_CAST_OK;
|
||||
_corpse = false;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(spellInfo->Effects[EFFECT_1].CalcValue())
|
||||
@@ -1204,8 +1241,6 @@ class spell_dk_raise_dead : public SpellScriptLoader
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_result = SPELL_CAST_OK;
|
||||
_corpse = false;
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
@@ -1387,14 +1422,16 @@ class spell_dk_scourge_strike : public SpellScriptLoader
|
||||
class spell_dk_scourge_strike_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_dk_scourge_strike_SpellScript);
|
||||
float multiplier;
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_dk_scourge_strike_SpellScript()
|
||||
{
|
||||
multiplier = 1.0f;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
float multiplier;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_DK_SCOURGE_STRIKE_TRIGGERED))
|
||||
|
||||
@@ -746,6 +746,13 @@ class spell_dru_savage_defense : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_dru_savage_defense_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dru_savage_defense_AuraScript()
|
||||
{
|
||||
absorbPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbPct;
|
||||
|
||||
bool Load() override
|
||||
|
||||
@@ -47,6 +47,13 @@ class spell_gen_absorb0_hitlimit1 : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_gen_absorb0_hitlimit1_AuraScript);
|
||||
|
||||
public:
|
||||
spell_gen_absorb0_hitlimit1_AuraScript()
|
||||
{
|
||||
limit = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 limit;
|
||||
|
||||
bool Load() override
|
||||
@@ -849,6 +856,13 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_gen_clone_weapon_auraScript);
|
||||
|
||||
public:
|
||||
spell_gen_clone_weapon_auraScript()
|
||||
{
|
||||
prevItem = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_COPY_WEAPON_AURA) ||
|
||||
@@ -861,12 +875,6 @@ class spell_gen_clone_weapon_aura : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
prevItem = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
@@ -1409,9 +1417,15 @@ class spell_gen_dungeon_credit : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_gen_dungeon_credit_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_gen_dungeon_credit_SpellScript()
|
||||
{
|
||||
_handled = false;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetTypeId() == TYPEID_UNIT;
|
||||
}
|
||||
|
||||
@@ -2240,11 +2254,17 @@ class spell_gen_on_tournament_mount : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_gen_on_tournament_mount_AuraScript);
|
||||
|
||||
public:
|
||||
spell_gen_on_tournament_mount_AuraScript()
|
||||
{
|
||||
_pennantSpellId = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 _pennantSpellId;
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_pennantSpellId = 0;
|
||||
return GetCaster() && GetCaster()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
|
||||
@@ -301,12 +301,9 @@ class spell_pilgrims_bounty_buff_food : public SpellScriptLoader
|
||||
uint32 const _triggeredSpellId;
|
||||
|
||||
public:
|
||||
spell_pilgrims_bounty_buff_food_AuraScript(uint32 triggeredSpellId) : AuraScript(), _triggeredSpellId(triggeredSpellId) { }
|
||||
|
||||
bool Load() override
|
||||
spell_pilgrims_bounty_buff_food_AuraScript(uint32 triggeredSpellId) : AuraScript(), _triggeredSpellId(triggeredSpellId)
|
||||
{
|
||||
_handled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
|
||||
@@ -444,6 +441,365 @@ class spell_winter_veil_px_238_winter_wondervolt : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum RamBlaBla
|
||||
{
|
||||
SPELL_GIDDYUP = 42924,
|
||||
SPELL_RENTAL_RACING_RAM = 43883,
|
||||
SPELL_RENTAL_RACING_RAM_AURA = 42146,
|
||||
SPELL_RAM_LEVEL_NEUTRAL = 43310,
|
||||
SPELL_RAM_TROT = 42992,
|
||||
SPELL_RAM_CANTER = 42993,
|
||||
SPELL_RAM_GALLOP = 42994,
|
||||
SPELL_RAM_FATIGUE = 43052,
|
||||
SPELL_EXHAUSTED_RAM = 43332,
|
||||
|
||||
// Quest
|
||||
SPELL_BREWFEST_QUEST_SPEED_BUNNY_GREEN = 43345,
|
||||
SPELL_BREWFEST_QUEST_SPEED_BUNNY_YELLOW = 43346,
|
||||
SPELL_BREWFEST_QUEST_SPEED_BUNNY_RED = 43347
|
||||
};
|
||||
|
||||
// 42924 - Giddyup!
|
||||
class spell_brewfest_giddyup : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_giddyup() : SpellScriptLoader("spell_brewfest_giddyup") { }
|
||||
|
||||
class spell_brewfest_giddyup_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_brewfest_giddyup_AuraScript);
|
||||
|
||||
void OnChange(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (!target->HasAura(SPELL_RENTAL_RACING_RAM))
|
||||
{
|
||||
target->RemoveAura(GetId());
|
||||
return;
|
||||
}
|
||||
|
||||
if (target->HasAura(SPELL_EXHAUSTED_RAM))
|
||||
return;
|
||||
|
||||
switch (GetStackAmount())
|
||||
{
|
||||
case 1: // green
|
||||
target->RemoveAura(SPELL_RAM_LEVEL_NEUTRAL);
|
||||
target->RemoveAura(SPELL_RAM_CANTER);
|
||||
target->CastSpell(target, SPELL_RAM_TROT, true);
|
||||
break;
|
||||
case 6: // yellow
|
||||
target->RemoveAura(SPELL_RAM_TROT);
|
||||
target->RemoveAura(SPELL_RAM_GALLOP);
|
||||
target->CastSpell(target, SPELL_RAM_CANTER, true);
|
||||
break;
|
||||
case 11: // red
|
||||
target->RemoveAura(SPELL_RAM_CANTER);
|
||||
target->CastSpell(target, SPELL_RAM_GALLOP, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_DEFAULT)
|
||||
{
|
||||
target->RemoveAura(SPELL_RAM_TROT);
|
||||
target->CastSpell(target, SPELL_RAM_LEVEL_NEUTRAL, true);
|
||||
}
|
||||
}
|
||||
|
||||
void OnPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
GetTarget()->RemoveAuraFromStack(GetId());
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_brewfest_giddyup_AuraScript::OnChange, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_brewfest_giddyup_AuraScript::OnChange, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_CHANGE_AMOUNT_MASK);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_brewfest_giddyup_AuraScript::OnPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_brewfest_giddyup_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 43310 - Ram Level - Neutral
|
||||
// 42992 - Ram - Trot
|
||||
// 42993 - Ram - Canter
|
||||
// 42994 - Ram - Gallop
|
||||
class spell_brewfest_ram : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_ram() : SpellScriptLoader("spell_brewfest_ram") { }
|
||||
|
||||
class spell_brewfest_ram_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_brewfest_ram_AuraScript);
|
||||
|
||||
void OnPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target->HasAura(SPELL_EXHAUSTED_RAM))
|
||||
return;
|
||||
|
||||
switch (GetId())
|
||||
{
|
||||
case SPELL_RAM_LEVEL_NEUTRAL:
|
||||
if (Aura* aura = target->GetAura(SPELL_RAM_FATIGUE))
|
||||
aura->ModStackAmount(-4);
|
||||
break;
|
||||
case SPELL_RAM_TROT: // green
|
||||
if (Aura* aura = target->GetAura(SPELL_RAM_FATIGUE))
|
||||
aura->ModStackAmount(-2);
|
||||
if (aurEff->GetTickNumber() == 4)
|
||||
target->CastSpell(target, SPELL_BREWFEST_QUEST_SPEED_BUNNY_GREEN, true);
|
||||
break;
|
||||
case SPELL_RAM_CANTER:
|
||||
target->CastCustomSpell(SPELL_RAM_FATIGUE, SPELLVALUE_AURA_STACK, 1, target, TRIGGERED_FULL_MASK);
|
||||
if (aurEff->GetTickNumber() == 4)
|
||||
target->CastSpell(target, SPELL_BREWFEST_QUEST_SPEED_BUNNY_YELLOW, true);
|
||||
break;
|
||||
case SPELL_RAM_GALLOP:
|
||||
target->CastCustomSpell(SPELL_RAM_FATIGUE, SPELLVALUE_AURA_STACK, target->HasAura(SPELL_RAM_FATIGUE) ? 4 : 5 /*Hack*/, target, TRIGGERED_FULL_MASK);
|
||||
if (aurEff->GetTickNumber() == 4)
|
||||
target->CastSpell(target, SPELL_BREWFEST_QUEST_SPEED_BUNNY_RED, true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_brewfest_ram_AuraScript::OnPeriodic, EFFECT_1, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_brewfest_ram_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 43052 - Ram Fatigue
|
||||
class spell_brewfest_ram_fatigue : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_ram_fatigue() : SpellScriptLoader("spell_brewfest_ram_fatigue") { }
|
||||
|
||||
class spell_brewfest_ram_fatigue_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_brewfest_ram_fatigue_AuraScript);
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
|
||||
if (GetStackAmount() == 101)
|
||||
{
|
||||
target->RemoveAura(SPELL_RAM_LEVEL_NEUTRAL);
|
||||
target->RemoveAura(SPELL_RAM_TROT);
|
||||
target->RemoveAura(SPELL_RAM_CANTER);
|
||||
target->RemoveAura(SPELL_RAM_GALLOP);
|
||||
target->RemoveAura(SPELL_GIDDYUP);
|
||||
|
||||
target->CastSpell(target, SPELL_EXHAUSTED_RAM, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_brewfest_ram_fatigue_AuraScript::OnApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_brewfest_ram_fatigue_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 43450 - Brewfest - apple trap - friendly DND
|
||||
class spell_brewfest_apple_trap : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_apple_trap() : SpellScriptLoader("spell_brewfest_apple_trap") { }
|
||||
|
||||
class spell_brewfest_apple_trap_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_brewfest_apple_trap_AuraScript);
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
GetTarget()->RemoveAura(SPELL_RAM_FATIGUE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_brewfest_apple_trap_AuraScript::OnApply, EFFECT_0, SPELL_AURA_FORCE_REACTION, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_brewfest_apple_trap_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 43332 - Exhausted Ram
|
||||
class spell_brewfest_exhausted_ram : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_exhausted_ram() : SpellScriptLoader("spell_brewfest_exhausted_ram") { }
|
||||
|
||||
class spell_brewfest_exhausted_ram_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_brewfest_exhausted_ram_AuraScript);
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
target->CastSpell(target, SPELL_RAM_LEVEL_NEUTRAL, true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectRemove += AuraEffectApplyFn(spell_brewfest_exhausted_ram_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_brewfest_exhausted_ram_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 43714 - Brewfest - Relay Race - Intro - Force - Player to throw- DND
|
||||
class spell_brewfest_relay_race_intro_force_player_to_throw : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_relay_race_intro_force_player_to_throw() : SpellScriptLoader("spell_brewfest_relay_race_intro_force_player_to_throw") { }
|
||||
|
||||
class spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript);
|
||||
|
||||
void HandleForceCast(SpellEffIndex effIndex)
|
||||
{
|
||||
PreventHitDefaultEffect(effIndex);
|
||||
// All this spells trigger a spell that requires reagents; if the
|
||||
// triggered spell is cast as "triggered", reagents are not consumed
|
||||
GetHitUnit()->CastSpell((Unit*)NULL, GetSpellInfo()->Effects[effIndex].TriggerSpell, TriggerCastFlags(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_POWER_AND_REAGENT_COST));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 43876 - Dismount Ram
|
||||
class spell_brewfest_dismount_ram : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_dismount_ram() : SpellScriptLoader("spell_brewfest_dismount_ram") { }
|
||||
|
||||
class spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
GetCaster()->RemoveAura(SPELL_RENTAL_RACING_RAM);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_brewfest_relay_race_intro_force_player_to_throw_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum RamBlub
|
||||
{
|
||||
QUEST_BARK_FOR_DROHNS_DISTILLERY = 11407,
|
||||
QUEST_BARK_FOR_TCHALIS_VOODOO_BREWERY = 11408,
|
||||
|
||||
SAY_DROHN_DISTILLERY_1 = 23520,
|
||||
SAY_DROHN_DISTILLERY_2 = 23521,
|
||||
SAY_DROHN_DISTILLERY_3 = 23522,
|
||||
SAY_DROHN_DISTILLERY_4 = 23523,
|
||||
|
||||
SAY_TCHALIS_VOODOO_1 = 23524,
|
||||
SAY_TCHALIS_VOODOO_2 = 23525,
|
||||
SAY_TCHALIS_VOODOO_3 = 23526,
|
||||
SAY_TCHALIS_VOODOO_4 = 23527
|
||||
};
|
||||
|
||||
// 43259 Brewfest - Barker Bunny 1
|
||||
// 43260 Brewfest - Barker Bunny 2
|
||||
// 43261 Brewfest - Barker Bunny 3
|
||||
// 43262 Brewfest - Barker Bunny 4
|
||||
class spell_brewfest_barker_bunny : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_brewfest_barker_bunny() : SpellScriptLoader("spell_brewfest_barker_bunny") { }
|
||||
|
||||
class spell_brewfest_barker_bunny_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_brewfest_barker_bunny_AuraScript);
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetUnitOwner()->GetTypeId() == TYPEID_PLAYER;
|
||||
}
|
||||
|
||||
void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Player* target = GetTarget()->ToPlayer();
|
||||
|
||||
uint32 BroadcastTextId = 0;
|
||||
|
||||
if (target->GetQuestStatus(QUEST_BARK_FOR_DROHNS_DISTILLERY) == QUEST_STATUS_INCOMPLETE ||
|
||||
target->GetQuestStatus(QUEST_BARK_FOR_DROHNS_DISTILLERY) == QUEST_STATUS_COMPLETE)
|
||||
BroadcastTextId = RAND(SAY_DROHN_DISTILLERY_1, SAY_DROHN_DISTILLERY_2, SAY_DROHN_DISTILLERY_3, SAY_DROHN_DISTILLERY_4);
|
||||
|
||||
if (target->GetQuestStatus(QUEST_BARK_FOR_TCHALIS_VOODOO_BREWERY) == QUEST_STATUS_INCOMPLETE ||
|
||||
target->GetQuestStatus(QUEST_BARK_FOR_TCHALIS_VOODOO_BREWERY) == QUEST_STATUS_COMPLETE)
|
||||
BroadcastTextId = RAND(SAY_TCHALIS_VOODOO_1, SAY_TCHALIS_VOODOO_2, SAY_TCHALIS_VOODOO_3, SAY_TCHALIS_VOODOO_4);
|
||||
|
||||
if (BroadcastTextId)
|
||||
target->Talk(BroadcastTextId, CHAT_MSG_SAY, sWorld->getFloatConfig(CONFIG_LISTEN_RANGE_SAY), target);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_brewfest_barker_bunny_AuraScript::OnApply, EFFECT_1, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_brewfest_barker_bunny_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_holiday_spell_scripts()
|
||||
{
|
||||
// Love is in the Air
|
||||
@@ -461,4 +817,13 @@ void AddSC_holiday_spell_scripts()
|
||||
// Winter Veil
|
||||
new spell_winter_veil_mistletoe();
|
||||
new spell_winter_veil_px_238_winter_wondervolt();
|
||||
// Brewfest
|
||||
new spell_brewfest_giddyup();
|
||||
new spell_brewfest_ram();
|
||||
new spell_brewfest_ram_fatigue();
|
||||
new spell_brewfest_apple_trap();
|
||||
new spell_brewfest_exhausted_ram();
|
||||
new spell_brewfest_relay_race_intro_force_player_to_throw();
|
||||
new spell_brewfest_dismount_ram();
|
||||
new spell_brewfest_barker_bunny();
|
||||
}
|
||||
@@ -537,6 +537,13 @@ class spell_mage_focus_magic : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_mage_focus_magic_AuraScript);
|
||||
|
||||
public:
|
||||
spell_mage_focus_magic_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FOCUS_MAGIC_PROC))
|
||||
@@ -544,12 +551,6 @@ class spell_mage_focus_magic : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_procTarget = GetCaster();
|
||||
|
||||
@@ -88,6 +88,14 @@ class spell_pal_ardent_defender : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pal_ardent_defender_AuraScript);
|
||||
|
||||
public:
|
||||
spell_pal_ardent_defender_AuraScript()
|
||||
{
|
||||
absorbPct = 0;
|
||||
healPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbPct, healPct;
|
||||
|
||||
enum Spell
|
||||
@@ -459,6 +467,13 @@ class spell_pal_divine_storm : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_pal_divine_storm_SpellScript);
|
||||
|
||||
public:
|
||||
spell_pal_divine_storm_SpellScript()
|
||||
{
|
||||
healPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 healPct;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
@@ -502,6 +517,13 @@ class spell_pal_divine_storm_dummy : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_pal_divine_storm_dummy_SpellScript);
|
||||
|
||||
public:
|
||||
spell_pal_divine_storm_dummy_SpellScript()
|
||||
{
|
||||
_targetCount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PALADIN_DIVINE_STORM_HEAL))
|
||||
@@ -693,6 +715,13 @@ class spell_pal_hand_of_sacrifice : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pal_hand_of_sacrifice_AuraScript);
|
||||
|
||||
public:
|
||||
spell_pal_hand_of_sacrifice_AuraScript()
|
||||
{
|
||||
remainingAmount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
int32 remainingAmount;
|
||||
|
||||
bool Load() override
|
||||
|
||||
@@ -229,11 +229,17 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_warl_pet_scaling_01_AuraScript);
|
||||
|
||||
public:
|
||||
spell_warl_pet_scaling_01_AuraScript()
|
||||
{
|
||||
_tempBonus = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
_tempBonus = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -366,11 +372,17 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_warl_pet_scaling_02_AuraScript);
|
||||
|
||||
public:
|
||||
spell_warl_pet_scaling_02_AuraScript()
|
||||
{
|
||||
_tempBonus = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
_tempBonus = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -880,6 +892,13 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_hun_pet_scaling_01_AuraScript);
|
||||
|
||||
public:
|
||||
spell_hun_pet_scaling_01_AuraScript()
|
||||
{
|
||||
_tempHealth = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
void CalculateStaminaAmount(AuraEffect const* /* aurEff */, int32& amount, bool& /*canBeRecalculated*/)
|
||||
{
|
||||
if (Unit* pet = GetUnitOwner())
|
||||
@@ -1457,11 +1476,17 @@ public:
|
||||
{
|
||||
PrepareAuraScript(spell_dk_pet_scaling_01_AuraScript);
|
||||
|
||||
public:
|
||||
spell_dk_pet_scaling_01_AuraScript()
|
||||
{
|
||||
_tempHealth = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
if (!GetCaster() || !GetCaster()->GetOwner() || GetCaster()->GetOwner()->GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
_tempHealth = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -465,6 +465,13 @@ class spell_pri_guardian_spirit : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pri_guardian_spirit_AuraScript);
|
||||
|
||||
public:
|
||||
spell_pri_guardian_spirit_AuraScript()
|
||||
{
|
||||
healPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 healPct;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
@@ -657,6 +664,13 @@ class spell_pri_mana_leech : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_pri_mana_leech_AuraScript);
|
||||
|
||||
public:
|
||||
spell_pri_mana_leech_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_MANA_LEECH_PROC))
|
||||
@@ -664,12 +678,6 @@ class spell_pri_mana_leech : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
_procTarget = GetTarget()->GetOwner();
|
||||
|
||||
@@ -2101,6 +2101,11 @@ class spell_q12641_death_comes_from_on_high : public SpellScriptLoader
|
||||
};
|
||||
|
||||
// 52694 - Recall Eye of Acherus
|
||||
enum Recall_Eye_of_Acherus
|
||||
{
|
||||
THE_EYE_OF_ACHERUS = 51852
|
||||
};
|
||||
|
||||
class spell_q12641_recall_eye_of_acherus : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -2116,6 +2121,7 @@ class spell_q12641_recall_eye_of_acherus : public SpellScriptLoader
|
||||
{
|
||||
player->StopCastingCharm();
|
||||
player->StopCastingBindSight();
|
||||
player->RemoveAura(THE_EYE_OF_ACHERUS);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -68,6 +68,13 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_blade_flurry_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_blade_flurry_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_BLADE_FLURRY_EXTRA_ATTACK))
|
||||
@@ -75,12 +82,6 @@ class spell_rog_blade_flurry : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
_procTarget = GetTarget()->SelectNearbyTarget(eventInfo.GetProcTarget());
|
||||
@@ -126,6 +127,13 @@ class spell_rog_cheat_death : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_cheat_death_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_cheat_death_AuraScript()
|
||||
{
|
||||
absorbChance = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbChance;
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
@@ -253,9 +261,15 @@ class spell_rog_deadly_poison : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_rog_deadly_poison_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_rog_deadly_poison_SpellScript()
|
||||
{
|
||||
_stackAmount = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Load() override
|
||||
{
|
||||
// at this point CastItem must already be initialized
|
||||
return GetCaster()->GetTypeId() == TYPEID_PLAYER && GetCastItem();
|
||||
}
|
||||
@@ -487,6 +501,13 @@ class spell_rog_nerves_of_steel : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_nerves_of_steel_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_nerves_of_steel_AuraScript()
|
||||
{
|
||||
absorbPct = 0;
|
||||
}
|
||||
|
||||
private:
|
||||
uint32 absorbPct;
|
||||
|
||||
bool Load() override
|
||||
@@ -882,6 +903,13 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_rog_tricks_of_the_trade_AuraScript);
|
||||
|
||||
public:
|
||||
spell_rog_tricks_of_the_trade_AuraScript()
|
||||
{
|
||||
_redirectTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_ROGUE_TRICKS_OF_THE_TRADE_DMG_BOOST))
|
||||
@@ -891,12 +919,6 @@ class spell_rog_tricks_of_the_trade : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_redirectTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_DEFAULT)
|
||||
|
||||
@@ -219,14 +219,15 @@ class spell_sha_chain_heal : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_sha_chain_heal_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_sha_chain_heal_SpellScript()
|
||||
{
|
||||
firstHeal = true;
|
||||
riptide = false;
|
||||
amount = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (firstHeal)
|
||||
|
||||
@@ -139,12 +139,13 @@ class spell_warl_banish : public SpellScriptLoader
|
||||
{
|
||||
PrepareSpellScript(spell_warl_banish_SpellScript);
|
||||
|
||||
bool Load() override
|
||||
public:
|
||||
spell_warl_banish_SpellScript()
|
||||
{
|
||||
_removed = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
void HandleBanish()
|
||||
{
|
||||
/// Casting Banish on a banished target will cancel the effect
|
||||
|
||||
@@ -839,6 +839,13 @@ class spell_warr_sweeping_strikes : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_warr_sweeping_strikes_AuraScript);
|
||||
|
||||
public:
|
||||
spell_warr_sweeping_strikes_AuraScript()
|
||||
{
|
||||
_procTarget = nullptr;
|
||||
}
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_1) || !sSpellMgr->GetSpellInfo(SPELL_WARRIOR_SWEEPING_STRIKES_EXTRA_ATTACK_2))
|
||||
@@ -846,12 +853,6 @@ class spell_warr_sweeping_strikes : public SpellScriptLoader
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
_procTarget = NULL;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
_procTarget = eventInfo.GetActor()->SelectNearbyTarget(eventInfo.GetProcTarget());
|
||||
@@ -903,6 +904,7 @@ class spell_warr_sword_and_board : public SpellScriptLoader
|
||||
{
|
||||
PrepareAuraScript(spell_warr_sword_and_board_AuraScript);
|
||||
|
||||
private:
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
if (!sSpellMgr->GetSpellInfo(SPELL_WARRIOR_SHIELD_SLAM))
|
||||
|
||||
Reference in new issue
Block a user