Merge branch '4.3.4' of https://gitlab.com/trinitycore/TrinityCore_434 into 4.3.4
This commit is contained in:
commit
c9b5bf9534
203 files changed
+1608
-341
No files matched your search
@@ -613,6 +613,8 @@ public:
|
||||
if (GameObjectTemplateAddon const* addon = sObjectMgr->GetGameObjectTemplateAddon(entry))
|
||||
handler->PSendSysMessage(LANG_GOINFO_ADDON, addon->faction, addon->flags);
|
||||
|
||||
handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, gameObjectInfo->AIName.c_str(), sObjectMgr->GetScriptName(gameObjectInfo->ScriptId).c_str());
|
||||
|
||||
if (GameObjectDisplayInfoEntry const* modelInfo = sGameObjectDisplayInfoStore.LookupEntry(displayId))
|
||||
handler->PSendSysMessage(LANG_GOINFO_MODEL, modelInfo->maxX, modelInfo->maxY, modelInfo->maxZ, modelInfo->minX, modelInfo->minY, modelInfo->minZ);
|
||||
|
||||
|
||||
@@ -734,7 +734,7 @@ public:
|
||||
|
||||
handler->PSendSysMessage(LANG_NPCINFO_ARMOR, target->GetArmor());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_POSITION, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str());
|
||||
handler->PSendSysMessage(LANG_OBJECTINFO_AIINFO, target->GetAIName().c_str(), target->GetScriptName().c_str());
|
||||
handler->PSendSysMessage(LANG_NPCINFO_FLAGS_EXTRA, cInfo->flags_extra);
|
||||
for (uint8 i = 0; i < FLAGS_EXTRA_COUNT; ++i)
|
||||
if (cInfo->flags_extra & flagsExtra[i].Value)
|
||||
|
||||
+2
-1
@@ -348,6 +348,7 @@ public:
|
||||
if (Creature* nefarian = me->SummonCreature(NPC_NEFARIAN, NefarianLoc[0]))
|
||||
{
|
||||
nefarian->setActive(true);
|
||||
nefarian->SetFarVisible(true);
|
||||
nefarian->SetCanFly(true);
|
||||
nefarian->SetDisableGravity(true);
|
||||
nefarian->CastSpell((Unit*)NULL, SPELL_SHADOWFLAME_INITIAL);
|
||||
@@ -431,7 +432,7 @@ public:
|
||||
Talk(SAY_RANDOM);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*Killer*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
+1
@@ -252,6 +252,7 @@ public:
|
||||
{
|
||||
nefarius->SetPhaseMask(1, true);
|
||||
nefarius->setActive(true);
|
||||
nefarius->SetFarVisible(true);
|
||||
nefarius->Respawn();
|
||||
nefarius->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
|
||||
@@ -198,13 +198,13 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
if (Unit* midnight = ObjectAccessor::GetUnit(*me, _midnightGUID))
|
||||
midnight->KillSelf();
|
||||
|
||||
BossAI::JustDied(killer);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void SetGUID(ObjectGuid const& guid, int32 id) override
|
||||
|
||||
@@ -153,6 +153,7 @@ public:
|
||||
Talk(EMOTE_SUMMON);
|
||||
events.SetPhase(PHASE_INTRO);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->GetMotionMaster()->MoveAlongSplineChain(POINT_INTRO_START, SPLINE_CHAIN_INTRO_START, false);
|
||||
HandleTerraceDoors(false);
|
||||
|
||||
@@ -558,6 +558,7 @@ public:
|
||||
{
|
||||
arca->GetMotionMaster()->MovePoint(0, -11010.82f, -1761.18f, 156.47f);
|
||||
arca->setActive(true);
|
||||
arca->SetFarVisible(true);
|
||||
arca->InterruptNonMeleeSpells(true);
|
||||
arca->SetSpeedRate(MOVE_FLIGHT, 2.0f);
|
||||
}
|
||||
|
||||
@@ -360,7 +360,6 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
{
|
||||
Initialize();
|
||||
instance = creature->GetInstanceScript();
|
||||
AcquireGUIDs();
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -384,6 +383,7 @@ struct boss_priestess_lackey_commonAI : public ScriptedAI
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
AcquireGUIDs();
|
||||
|
||||
// in case she is not alive and Reset was for some reason called, respawn her (most likely party wipe after killing her)
|
||||
if (Creature* pDelrissa = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_DELRISSA)))
|
||||
|
||||
@@ -82,11 +82,6 @@ class boss_vexallus : public CreatureScript
|
||||
Talk(SAY_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override
|
||||
{
|
||||
Talk(SAY_AGGRO);
|
||||
@@ -207,7 +202,8 @@ class npc_pure_energy : public CreatureScript
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
killer->CastSpell(killer, SPELL_ENERGY_FEEDBACK, true);
|
||||
if (killer)
|
||||
killer->CastSpell(killer, SPELL_ENERGY_FEEDBACK, true);
|
||||
me->RemoveAurasDueToSpell(SPELL_PURE_ENERGY_PASSIVE);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -866,7 +866,7 @@ public:
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
Creature* deathcharger = me->FindNearestCreature(28782, 30);
|
||||
if (!deathcharger)
|
||||
if (!deathcharger || !killer)
|
||||
return;
|
||||
|
||||
if (killer->GetTypeId() == TYPEID_PLAYER && deathcharger->GetTypeId() == TYPEID_UNIT && deathcharger->IsVehicle())
|
||||
|
||||
@@ -549,7 +549,8 @@ public:
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
Talk(SAY_VALROTH_DEATH);
|
||||
killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true);
|
||||
if (killer)
|
||||
killer->CastSpell(me, SPELL_SUMMON_VALROTH_REMAINS, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetVisible(false);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->SetCanFly(true);
|
||||
|
||||
@@ -314,7 +314,7 @@ class npc_apothecary_frye : public CreatureScript
|
||||
{
|
||||
npc_apothecary_fryeAI(Creature* creature) : npc_apothecary_genericAI(creature, FryeMovePos) { }
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_FRYE_DEATH);
|
||||
}
|
||||
@@ -342,7 +342,7 @@ class npc_apothecary_baxter : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_CHAIN_REACTION, Seconds(12));
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_events.Reset();
|
||||
Talk(SAY_BAXTER_DEATH);
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
break;
|
||||
}
|
||||
|
||||
if (instance->GetData(TYPE_SH_QUEST))
|
||||
if (killer && instance->GetData(TYPE_SH_QUEST))
|
||||
{
|
||||
if (Player* player = killer->ToPlayer())
|
||||
player->KilledMonsterCredit(SH_QUEST_CREDIT);
|
||||
|
||||
@@ -151,6 +151,7 @@ public:
|
||||
{
|
||||
Madrigosa->Respawn();
|
||||
Madrigosa->setActive(true);
|
||||
Madrigosa->SetFarVisible(true);
|
||||
IsIntro = true;
|
||||
Madrigosa->SetMaxHealth(me->GetMaxHealth());
|
||||
Madrigosa->SetHealth(me->GetMaxHealth());
|
||||
|
||||
@@ -260,6 +260,7 @@ public:
|
||||
me->SetDisableGravity(true);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
|
||||
for (uint8 i = 0; i < 4; ++i)
|
||||
if (GameObject* pOrb = GetOrb(i))
|
||||
@@ -307,6 +308,7 @@ public:
|
||||
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
|
||||
pOrb->SetFaction(FACTION_FRIENDLY);
|
||||
pOrb->setActive(true);
|
||||
pOrb->SetFarVisible(true);
|
||||
pOrb->Refresh();
|
||||
}
|
||||
}
|
||||
@@ -319,6 +321,7 @@ public:
|
||||
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
|
||||
pOrb->SetFaction(FACTION_FRIENDLY);
|
||||
pOrb->setActive(true);
|
||||
pOrb->SetFarVisible(true);
|
||||
pOrb->Refresh();
|
||||
|
||||
OrbsEmpowered = (OrbsEmpowered+1)%4;
|
||||
@@ -350,6 +353,7 @@ public:
|
||||
{
|
||||
pOrb->CastSpell(me, SPELL_RING_OF_BLUE_FLAMES);
|
||||
pOrb->setActive(true);
|
||||
pOrb->SetFarVisible(true);
|
||||
pOrb->Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +372,7 @@ class npc_stonekeepers : public CreatureScript
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*attacker*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
DoCast (me, SPELL_SELF_DESTRUCT, true);
|
||||
instance->SetData(DATA_STONE_KEEPERS, IN_PROGRESS); // activate next stonekeeper
|
||||
|
||||
@@ -257,6 +257,8 @@ class instance_uldaman : public InstanceMapScript
|
||||
{
|
||||
archaedas->RemoveAura(SPELL_FREEZE_ANIM);
|
||||
archaedas->CastSpell(archaedas, SPELL_ARCHAEDAS_AWAKEN, false);
|
||||
archaedas->SetFaction(FACTION_TITAN);
|
||||
archaedas->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
whoWokeuiArchaedasGUID = target;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,6 +383,7 @@ void hyjalAI::SummonedCreatureDespawn(Creature* summoned)
|
||||
void hyjalAI::Reset()
|
||||
{
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
|
||||
Initialize();
|
||||
|
||||
@@ -503,6 +504,7 @@ void hyjalAI::SummonCreature(uint32 entry, float Base[4][3])
|
||||
|
||||
creature->SetWalk(false);
|
||||
creature->setActive(true);
|
||||
creature->SetFarVisible(true);
|
||||
switch (entry)
|
||||
{
|
||||
case NECROMANCER:
|
||||
@@ -1027,6 +1029,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true;
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i;
|
||||
unit->setActive(true);
|
||||
unit->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
for (uint8 i = 0; i < 3; ++i)//summon 3 abominations
|
||||
@@ -1039,6 +1042,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true;
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i;
|
||||
unit->setActive(true);
|
||||
unit->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
for (uint8 i = 0; i < 5; ++i)//summon 5 gargoyles
|
||||
@@ -1051,6 +1055,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true;
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i;
|
||||
unit->setActive(true);
|
||||
unit->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1068,6 +1073,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true;
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i;
|
||||
unit->setActive(true);
|
||||
unit->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
for (uint8 i = 0; i < 25; ++i)//summon 25 ghouls
|
||||
@@ -1080,6 +1086,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true;
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i;
|
||||
unit->setActive(true);
|
||||
unit->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
for (uint8 i = 0; i < 5; ++i)//summon 5 abominations
|
||||
@@ -1092,6 +1099,7 @@ void hyjalAI::DoOverrun(uint32 faction, const uint32 diff)
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->IsOverrun = true;
|
||||
ENSURE_AI(hyjal_trashAI, unit->AI())->OverrunType = i;
|
||||
unit->setActive(true);
|
||||
unit->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -209,6 +209,7 @@ public:
|
||||
instance = creature->GetInstanceScript();
|
||||
HadMount = false;
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
}
|
||||
|
||||
void Initialize()
|
||||
@@ -528,12 +529,12 @@ public:
|
||||
{
|
||||
Talk(SAY_TH_RANDOM_KILL);
|
||||
}
|
||||
void JustDied(Unit* slayer) override
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
instance->SetData(TYPE_THRALL_EVENT, FAIL);
|
||||
|
||||
// Don't do a yell if he kills self (if player goes too far or at the end).
|
||||
if (slayer == me)
|
||||
if (killer == me)
|
||||
return;
|
||||
|
||||
Talk(SAY_TH_RANDOM_DIE);
|
||||
|
||||
@@ -106,11 +106,11 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -182,6 +182,7 @@ public:
|
||||
break;
|
||||
case NPC_LAIRGUARD:
|
||||
summoned->setActive(true);
|
||||
summoned->SetFarVisible(true);
|
||||
break;
|
||||
}
|
||||
summons.Summon(summoned);
|
||||
|
||||
@@ -82,6 +82,7 @@ public:
|
||||
currentEvent = 0;
|
||||
eventProgress = 0;
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
}
|
||||
|
||||
@@ -172,7 +173,7 @@ public:
|
||||
Talk(SAY_ATTACKED, who);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*slayer*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
instance->SetData(DATA_NARALEX_EVENT, FAIL);
|
||||
instance->SetData(DATA_NARALEX_PART1, FAIL);
|
||||
|
||||
@@ -67,6 +67,9 @@ public:
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
uint32 spawnCreatureID = 0;
|
||||
|
||||
switch (urand(0, 2))
|
||||
@@ -261,6 +264,10 @@ public:
|
||||
{
|
||||
me->SetObjectScale(1.0f);
|
||||
_events.Reset();
|
||||
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
if (Creature* legoso = me->FindNearestCreature(NPC_LEGOSO, SIZE_OF_GRIDS))
|
||||
{
|
||||
Group* group = me->GetLootRecipientGroup();
|
||||
|
||||
@@ -684,7 +684,7 @@ public:
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit* /*who*/) override { }
|
||||
void JustDied(Unit* /*slayer*/) override;
|
||||
void JustDied(Unit* /*killer*/) override;
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
@@ -920,7 +920,7 @@ public:
|
||||
|
||||
};
|
||||
|
||||
void npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::JustDied(Unit* /*slayer*/)
|
||||
void npc_qiraj_war_spawn::npc_qiraj_war_spawnAI::JustDied(Unit* /*killer*/)
|
||||
{
|
||||
me->RemoveCorpse();
|
||||
|
||||
|
||||
@@ -535,25 +535,13 @@ public:
|
||||
IsPostEvent = false;
|
||||
PostEventTimer = 1000;
|
||||
PostEventCount = 0;
|
||||
me->SetReactState(REACT_DEFENSIVE);
|
||||
}
|
||||
|
||||
bool IsPostEvent;
|
||||
uint32 PostEventTimer;
|
||||
uint32 PostEventCount;
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (!HasEscortState(STATE_ESCORT_ESCORTING))
|
||||
{
|
||||
if (me->GetStandState() == UNIT_STAND_STATE_DEAD)
|
||||
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||
|
||||
IsPostEvent = false;
|
||||
PostEventTimer = 1000;
|
||||
PostEventCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void WaypointReached(uint32 waypointId) override
|
||||
{
|
||||
switch (waypointId)
|
||||
@@ -607,43 +595,44 @@ public:
|
||||
|
||||
void UpdateEscortAI(uint32 Diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
if (UpdateVictim())
|
||||
{
|
||||
if (IsPostEvent)
|
||||
{
|
||||
if (PostEventTimer <= Diff)
|
||||
{
|
||||
switch (PostEventCount)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_PROGRESS_2);
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_PROGRESS_3);
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_END);
|
||||
break;
|
||||
case 3:
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
player->GroupEventHappens(QUEST_ESCAPE, me);
|
||||
me->SummonCreature(NPC_PILOT_WIZZ, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
++PostEventCount;
|
||||
PostEventTimer = 5000;
|
||||
}
|
||||
else
|
||||
PostEventTimer -= Diff;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
return;
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
if (!IsPostEvent)
|
||||
return;
|
||||
|
||||
if (PostEventTimer > Diff)
|
||||
{
|
||||
PostEventTimer -= Diff;
|
||||
return;
|
||||
}
|
||||
|
||||
switch (PostEventCount)
|
||||
{
|
||||
case 0:
|
||||
Talk(SAY_PROGRESS_2);
|
||||
break;
|
||||
case 1:
|
||||
Talk(SAY_PROGRESS_3);
|
||||
break;
|
||||
case 2:
|
||||
Talk(SAY_END);
|
||||
break;
|
||||
case 3:
|
||||
if (Player* player = GetPlayerForEscort())
|
||||
{
|
||||
player->GroupEventHappens(QUEST_ESCAPE, me);
|
||||
me->DespawnOrUnsummon(Minutes(3));
|
||||
me->SummonCreature(NPC_PILOT_WIZZ, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 180000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
++PostEventCount;
|
||||
PostEventTimer = 5000;
|
||||
}
|
||||
|
||||
void QuestAccept(Player* player, Quest const* quest) override
|
||||
@@ -652,6 +641,7 @@ public:
|
||||
{
|
||||
me->SetFaction(FACTION_RATCHET);
|
||||
Talk(SAY_START);
|
||||
SetDespawnAtEnd(false);
|
||||
Start(true, false, player->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,14 @@
|
||||
*/
|
||||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "AreaBoundary.h"
|
||||
#include "ahnkahet.h"
|
||||
#include "Creature.h"
|
||||
#include "GameObject.h"
|
||||
#include "InstanceScript.h"
|
||||
#include "Map.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
|
||||
DoorData const doorData[] =
|
||||
{
|
||||
@@ -280,7 +285,26 @@ class instance_ahnkahet : public InstanceMapScript
|
||||
}
|
||||
};
|
||||
|
||||
// 56584 - Combined Toxins
|
||||
class spell_combined_toxins : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_combined_toxins);
|
||||
|
||||
bool CheckProc(AuraEffect const* /*aurEff*/, ProcEventInfo& eventInfo)
|
||||
{
|
||||
// only procs on poisons (damage class check to exclude stuff like Envenom)
|
||||
SpellInfo const* spellInfo = eventInfo.GetSpellInfo();
|
||||
return (spellInfo && spellInfo->Dispel == DISPEL_POISON && spellInfo->DmgClass != SPELL_DAMAGE_CLASS_MELEE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckEffectProc += AuraCheckEffectProcFn(spell_combined_toxins::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_ahnkahet()
|
||||
{
|
||||
new instance_ahnkahet();
|
||||
RegisterAuraScript(spell_combined_toxins);
|
||||
}
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
bool CanAIAttack(Unit const* target) const override
|
||||
{
|
||||
// Prevent Hadronox from going too far from her current home position
|
||||
if (!target->IsControlledByPlayer() && target->GetDistance(me->GetHomePosition()) > 20.0f)
|
||||
if (!target->IsControlledByPlayer() && target->GetDistance(me->GetHomePosition()) > 70.0f)
|
||||
return false;
|
||||
return BossAI::CanAIAttack(target);
|
||||
}
|
||||
|
||||
+2
-2
@@ -173,10 +173,10 @@ class boss_krik_thir : public CreatureScript
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
summons.clear();
|
||||
BossAI::JustDied(killer);
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
|
||||
+3
@@ -54,14 +54,17 @@ public:
|
||||
case NPC_TENEBRON:
|
||||
tenebronGUID = creature->GetGUID();
|
||||
creature->setActive(true);
|
||||
creature->SetFarVisible(true);
|
||||
break;
|
||||
case NPC_SHADRON:
|
||||
shadronGUID = creature->GetGUID();
|
||||
creature->setActive(true);
|
||||
creature->SetFarVisible(true);
|
||||
break;
|
||||
case NPC_VESPERON:
|
||||
vesperonGUID = creature->GetGUID();
|
||||
creature->setActive(true);
|
||||
creature->SetFarVisible(true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -980,7 +980,6 @@ public:
|
||||
{
|
||||
npc_twilight_whelpAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Reset();
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
|
||||
+3
-2
@@ -90,6 +90,7 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
{
|
||||
case ACTION_INTRO_BALTHARUS:
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
events.ScheduleEvent(EVENT_INTRO_TALK, Seconds(7), 0, PHASE_INTRO);
|
||||
break;
|
||||
case ACTION_CLONE:
|
||||
@@ -182,11 +183,11 @@ class boss_baltharus_the_warborn : public CreatureScript
|
||||
if (!events.IsInPhase(PHASE_INTRO))
|
||||
me->SetHealth(instance->GetData(DATA_BALTHARUS_SHARED_HEALTH));
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (!events.IsInPhase(PHASE_INTRO) && me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
+2
-2
@@ -123,11 +123,11 @@ class boss_general_zarithrian : public CreatureScript
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -311,11 +311,14 @@ class boss_halion : public CreatureScript
|
||||
if (events.IsInPhase(PHASE_TWO))
|
||||
return;
|
||||
|
||||
if (!UpdateVictim() || me->HasUnitState(UNIT_STATE_CASTING))
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
@@ -1080,6 +1083,7 @@ class npc_meteor_strike : public CreatureScript
|
||||
{
|
||||
DoCastSelf(SPELL_METEOR_STRIKE_FIRE_AURA_2, true);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
_events.ScheduleEvent(EVENT_SPAWN_METEOR_FLAME, Milliseconds(500));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,6 +77,7 @@ class npc_xerestrasza : public CreatureScript
|
||||
if (action == ACTION_BALTHARUS_DEATH)
|
||||
{
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
_isIntro = false;
|
||||
|
||||
Talk(SAY_XERESTRASZA_EVENT);
|
||||
@@ -131,6 +132,7 @@ class npc_xerestrasza : public CreatureScript
|
||||
me->SetFlag(UNIT_NPC_FLAGS, GOSSIP_OPTION_QUESTGIVER);
|
||||
Talk(SAY_XERESTRASZA_EVENT_7);
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
+2
-1
@@ -476,7 +476,8 @@ class npc_swarm_scarab : public CreatureScript
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
DoCast(killer, SPELL_TRAITOR_KING);
|
||||
if (killer)
|
||||
DoCast(killer, SPELL_TRAITOR_KING);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
+1
-1
@@ -276,7 +276,7 @@ struct boss_twin_baseAI : public BossAI
|
||||
DoCast(me, SurgeSpellId);
|
||||
|
||||
events.ScheduleEvent(EVENT_TWIN_SPIKE, 20 * IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 10 * MINUTE*IN_MILLISECONDS);
|
||||
events.ScheduleEvent(EVENT_BERSERK, IsHeroic() ? 6 * MINUTE*IN_MILLISECONDS : 8 * MINUTE*IN_MILLISECONDS);
|
||||
if (IsHeroic())
|
||||
events.ScheduleEvent(EVENT_TOUCH, urand(10 * IN_MILLISECONDS, 15 * IN_MILLISECONDS));
|
||||
}
|
||||
|
||||
@@ -198,6 +198,10 @@ class boss_blood_queen_lana_thel : public CreatureScript
|
||||
DoCastAOE(SPELL_BLOOD_INFUSION_CREDIT, true);
|
||||
|
||||
CleanAuras();
|
||||
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
// Blah, credit the quest
|
||||
if (_creditBloodQuickening)
|
||||
{
|
||||
|
||||
@@ -286,10 +286,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
_phase = PHASE_ONE;
|
||||
me->SetCombatPulseDelay(5);
|
||||
me->setActive(true);
|
||||
DoZoneInCombat();
|
||||
_phase = PHASE_ONE;
|
||||
scheduler.CancelGroup(GROUP_INTRO);
|
||||
// phase-independent events
|
||||
scheduler
|
||||
@@ -363,6 +363,10 @@ class boss_lady_deathwhisper : public CreatureScript
|
||||
darnavan->SetReactState(REACT_PASSIVE);
|
||||
darnavan->m_Events.AddEvent(new DaranavanMoveEvent(*darnavan), darnavan->m_Events.CalculateTime(10000));
|
||||
darnavan->AI()->Talk(SAY_DARNAVAN_RESCUED);
|
||||
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
if (Group* group = owner->GetGroup())
|
||||
@@ -883,6 +887,10 @@ class npc_darnavan : public CreatureScript
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
_events.Reset();
|
||||
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
if (Player* owner = killer->GetCharmerOrOwnerPlayerOrPlayerItself())
|
||||
{
|
||||
if (Group* group = owner->GetGroup())
|
||||
|
||||
@@ -276,6 +276,7 @@ class boss_sindragosa : public CreatureScript
|
||||
instance->SetBossState(DATA_SINDRAGOSA, IN_PROGRESS);
|
||||
me->SetCombatPulseDelay(5);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
DoZoneInCombat();
|
||||
}
|
||||
|
||||
@@ -313,6 +314,7 @@ class boss_sindragosa : public CreatureScript
|
||||
return;
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
@@ -347,6 +349,7 @@ class boss_sindragosa : public CreatureScript
|
||||
{
|
||||
case POINT_FROSTWYRM_LAND:
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(true);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
@@ -701,6 +704,7 @@ class npc_spinestalker : public CreatureScript
|
||||
return;
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetSpeedRate(MOVE_FLIGHT, 2.0f);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
float moveTime = me->GetExactDist(&SpinestalkerFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f);
|
||||
@@ -719,6 +723,7 @@ class npc_spinestalker : public CreatureScript
|
||||
return;
|
||||
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(true);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
@@ -838,6 +843,7 @@ class npc_rimefang : public CreatureScript
|
||||
return;
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetSpeedRate(MOVE_FLIGHT, 2.0f);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
|
||||
float moveTime = me->GetExactDist(&RimefangFlyPos) / (me->GetSpeed(MOVE_FLIGHT) * 0.001f);
|
||||
@@ -856,6 +862,7 @@ class npc_rimefang : public CreatureScript
|
||||
return;
|
||||
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(true);
|
||||
me->SetCanFly(false);
|
||||
me->SetDisableGravity(false);
|
||||
me->RemoveByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
@@ -1621,12 +1628,12 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class at_sindragosa_lair : public OnlyOnceAreaTriggerScript
|
||||
class at_sindragosa_lair : public AreaTriggerScript
|
||||
{
|
||||
public:
|
||||
at_sindragosa_lair() : OnlyOnceAreaTriggerScript("at_sindragosa_lair") { }
|
||||
at_sindragosa_lair() : AreaTriggerScript("at_sindragosa_lair") { }
|
||||
|
||||
bool _OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
|
||||
bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) override
|
||||
{
|
||||
if (InstanceScript* instance = player->GetInstanceScript())
|
||||
{
|
||||
|
||||
@@ -1053,6 +1053,7 @@ class boss_the_lich_king : public CreatureScript
|
||||
triggers.sort(Trinity::ObjectDistanceOrderPred(terenas, true));
|
||||
Creature* spawner = triggers.front();
|
||||
spawner->setActive(true);
|
||||
spawner->SetFarVisible(true);
|
||||
spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_1, true); // summons bombs randomly
|
||||
spawner->CastSpell(spawner, SPELL_SUMMON_SPIRIT_BOMB_2, true); // summons bombs on players
|
||||
spawner->m_Events.AddEvent(new TriggerWickedSpirit(spawner), spawner->m_Events.CalculateTime(3000));
|
||||
@@ -1739,6 +1740,7 @@ class npc_terenas_menethil : public CreatureScript
|
||||
{
|
||||
case ACTION_FROSTMOURNE_INTRO:
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(false);
|
||||
if (!IsHeroic())
|
||||
me->SetHealth(me->GetMaxHealth() / 2);
|
||||
DoCast(me, SPELL_LIGHTS_FAVOR);
|
||||
|
||||
@@ -418,12 +418,16 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
|
||||
if (Creature* factionNPC = me->FindNearestCreature(_instance->GetData(DATA_TEAM_IN_INSTANCE) == HORDE ? NPC_SE_HIGH_OVERLORD_SAURFANG : NPC_SE_MURADIN_BRONZEBEARD, 50.0f))
|
||||
{
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
_theLichKing = theLichKing->GetGUID();
|
||||
theLichKing->setActive(true);
|
||||
theLichKing->SetFarVisible(true);
|
||||
_bolvarFordragon = bolvarFordragon->GetGUID();
|
||||
bolvarFordragon->setActive(true);
|
||||
bolvarFordragon->SetFarVisible(true);
|
||||
_factionNPC = factionNPC->GetGUID();
|
||||
factionNPC->setActive(true);
|
||||
factionNPC->SetFarVisible(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -515,6 +519,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
|
||||
{
|
||||
bolvarFordragon->AI()->Talk(SAY_BOLVAR_INTRO_1);
|
||||
bolvarFordragon->setActive(false);
|
||||
bolvarFordragon->SetFarVisible(false);
|
||||
}
|
||||
break;
|
||||
case EVENT_LK_INTRO_5:
|
||||
@@ -522,6 +527,7 @@ class npc_highlord_tirion_fordring_lh : public CreatureScript
|
||||
{
|
||||
theLichKing->AI()->Talk(SAY_LK_INTRO_5);
|
||||
theLichKing->setActive(false);
|
||||
theLichKing->SetFarVisible(false);
|
||||
}
|
||||
break;
|
||||
case EVENT_SAURFANG_INTRO_1:
|
||||
@@ -835,6 +841,7 @@ class boss_sister_svalna : public CreatureScript
|
||||
break;
|
||||
case ACTION_START_GAUNTLET:
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
_isEventInProgress = true;
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
events.ScheduleEvent(EVENT_SVALNA_START, 25000);
|
||||
@@ -847,6 +854,7 @@ class boss_sister_svalna : public CreatureScript
|
||||
break;
|
||||
case ACTION_RESET_EVENT:
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
Reset();
|
||||
break;
|
||||
default:
|
||||
@@ -870,6 +878,7 @@ class boss_sister_svalna : public CreatureScript
|
||||
|
||||
_isEventInProgress = false;
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC | UNIT_FLAG_IMMUNE_TO_NPC);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHover(false);
|
||||
@@ -1001,6 +1010,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_CROK_INTRO_3, 14000);
|
||||
_events.ScheduleEvent(EVENT_START_PATHING, 37000);
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
for (uint32 i = 0; i < 4; ++i)
|
||||
if (Creature* crusader = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_CAPTAIN_ARNATH + i)))
|
||||
crusader->AI()->DoAction(ACTION_START_GAUNTLET);
|
||||
@@ -1010,6 +1020,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
_isEventActive = false;
|
||||
_isEventDone = _instance->GetBossState(DATA_SISTER_SVALNA) == DONE;
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
_aliveTrash.clear();
|
||||
_currentWPid = 0;
|
||||
}
|
||||
@@ -1027,6 +1038,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
{
|
||||
_isEventActive = false;
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
Talk(SAY_CROK_FINAL_WP);
|
||||
if (Creature* svalna = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SISTER_SVALNA)))
|
||||
svalna->AI()->DoAction(ACTION_RESURRECT_CAPTAINS);
|
||||
@@ -1056,6 +1068,7 @@ class npc_crok_scourgebane : public CreatureScript
|
||||
{
|
||||
_isEventActive = false;
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
Talk(SAY_CROK_FINAL_WP);
|
||||
if (Creature* svalna = ObjectAccessor::GetCreature(*me, _instance->GetGuidData(DATA_SISTER_SVALNA)))
|
||||
svalna->AI()->DoAction(ACTION_RESURRECT_CAPTAINS);
|
||||
@@ -1280,6 +1293,7 @@ struct npc_argent_captainAI : public ScriptedAI
|
||||
}
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
}
|
||||
else if (action == ACTION_RESET_EVENT)
|
||||
{
|
||||
|
||||
@@ -990,9 +990,10 @@ class instance_icecrown_citadel : public InstanceMapScript
|
||||
// set the platform as active object to dramatically increase visibility range
|
||||
// note: "active" gameobjects do not block grid unloading
|
||||
if (GameObject* precipice = instance->GetGameObject(ArthasPrecipiceGUID))
|
||||
precipice->setActive(state == IN_PROGRESS);
|
||||
precipice->SetFarVisible(state == IN_PROGRESS);
|
||||
|
||||
if (GameObject* platform = instance->GetGameObject(ArthasPlatformGUID))
|
||||
platform->setActive(state == IN_PROGRESS);
|
||||
platform->SetFarVisible(state == IN_PROGRESS);
|
||||
|
||||
if (instance->IsHeroic())
|
||||
{
|
||||
|
||||
@@ -79,11 +79,11 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
_events.Update(diff);
|
||||
|
||||
while (uint32 eventId = _events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -226,6 +226,7 @@ struct boss_four_horsemen_baseAI : public BossAI
|
||||
cBoss->SetReactState(REACT_PASSIVE);
|
||||
cBoss->AttackStop(); // clear initial target that was set on enter combat
|
||||
cBoss->setActive(true);
|
||||
cBoss->SetFarVisible(true);
|
||||
|
||||
for (Map::PlayerList::const_iterator it = players.begin(); it != players.end(); ++it)
|
||||
{
|
||||
|
||||
@@ -163,6 +163,7 @@ public:
|
||||
{
|
||||
summons.Summon(summon);
|
||||
summon->setActive(true);
|
||||
summon->SetFarVisible(true);
|
||||
summon->AI()->DoZoneInCombat(nullptr, 250.0f); // specify range to cover entire room - default 50yd is not enough
|
||||
}
|
||||
|
||||
|
||||
@@ -221,10 +221,17 @@ public:
|
||||
{
|
||||
_JustDied();
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
if (Creature* stalagg = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_STALAGG)))
|
||||
{
|
||||
stalagg->setActive(false);
|
||||
stalagg->SetFarVisible(false);
|
||||
}
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FEUGEN)))
|
||||
{
|
||||
feugen->setActive(false);
|
||||
feugen->SetFarVisible(false);
|
||||
}
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
@@ -262,11 +269,18 @@ public:
|
||||
instance->SetBossState(BOSS_THADDIUS, IN_PROGRESS);
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
DoZoneInCombat();
|
||||
if (Creature* stalagg = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_STALAGG)))
|
||||
{
|
||||
stalagg->setActive(true);
|
||||
stalagg->SetFarVisible(true);
|
||||
}
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FEUGEN)))
|
||||
{
|
||||
feugen->setActive(true);
|
||||
feugen->SetFarVisible(true);
|
||||
}
|
||||
break;
|
||||
case ACTION_FEUGEN_DIED:
|
||||
if (Creature* feugen = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_FEUGEN)))
|
||||
@@ -335,6 +349,7 @@ public:
|
||||
stalagg->AI()->DoAction(ACTION_BEGIN_RESET_ENCOUNTER);
|
||||
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
}
|
||||
|
||||
void ResetEncounter()
|
||||
@@ -525,6 +540,7 @@ public:
|
||||
coil->SetGoState(GO_STATE_READY);
|
||||
me->DespawnOrUnsummon();
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
}
|
||||
|
||||
void ResetEncounter()
|
||||
@@ -794,6 +810,7 @@ public:
|
||||
coil->SetGoState(GO_STATE_READY);
|
||||
me->DespawnOrUnsummon();
|
||||
me->setActive(false);
|
||||
me->SetFarVisible(false);
|
||||
}
|
||||
|
||||
void ResetEncounter()
|
||||
|
||||
@@ -150,7 +150,7 @@ public:
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
|
||||
me->SetVisible(true);
|
||||
instance->SetBossState(DATA_MAGUS_TELESTRA, DONE);
|
||||
}
|
||||
|
||||
|
||||
@@ -408,6 +408,7 @@ class boss_algalon_the_observer : public CreatureScript
|
||||
brann->AI()->DoAction(ACTION_FINISH_INTRO);
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
DoZoneInCombat();
|
||||
introDelay = 26000;
|
||||
summons.DespawnEntry(NPC_AZEROTH);
|
||||
@@ -970,7 +971,7 @@ class go_celestial_planetarium_access : public GameObjectScript
|
||||
{
|
||||
}
|
||||
|
||||
bool GossipHello(Player* player) override
|
||||
bool OnReportUse(Player* player) override
|
||||
{
|
||||
if (me->HasFlag(GAMEOBJECT_FLAGS, GO_FLAG_IN_USE))
|
||||
return true;
|
||||
|
||||
@@ -435,7 +435,7 @@ class boss_mimiron : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_INTRO_1, 1500);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*who*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
instance->SetBossState(BOSS_MIMIRON, DONE);
|
||||
events.Reset();
|
||||
|
||||
@@ -1131,6 +1131,7 @@ class npc_thorim_pre_phase : public CreatureScript
|
||||
npc_thorim_pre_phaseAI(Creature* creature) : npc_thorim_trashAI(creature)
|
||||
{
|
||||
me->setActive(true); // prevent grid unload
|
||||
me->SetFarVisible(true);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
@@ -1146,7 +1147,7 @@ class npc_thorim_pre_phase : public CreatureScript
|
||||
SetCombatMovement(false);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
if (Creature* thorim = _instance->GetCreature(BOSS_THORIM))
|
||||
thorim->AI()->DoAction(ACTION_INCREASE_PREADDS_COUNT);
|
||||
@@ -1405,7 +1406,7 @@ class npc_runic_colossus : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
// open the Runic Door
|
||||
_instance->HandleGameObject(_instance->GetGuidData(DATA_RUNIC_DOOR), true);
|
||||
@@ -1516,7 +1517,7 @@ class npc_ancient_rune_giant : public CreatureScript
|
||||
_events.ScheduleEvent(EVENT_RUNE_DETONATION, 25000);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
// opem the Stone Door
|
||||
_instance->HandleGameObject(_instance->GetGuidData(DATA_STONE_DOOR), true);
|
||||
|
||||
@@ -528,13 +528,13 @@ class boss_voice_of_yogg_saron : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_EXTINGUISH_ALL_LIFE, 900000); // 15 minutes
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
// don't despawn Yogg-Saron's corpse, remove him from SummonList!
|
||||
if (Creature* yogg = instance->GetCreature(BOSS_YOGG_SARON))
|
||||
summons.Despawn(yogg);
|
||||
|
||||
BossAI::JustDied(killer);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -361,6 +361,7 @@ public:
|
||||
init.Launch();
|
||||
|
||||
me->setActive(true);
|
||||
me->SetFarVisible(true);
|
||||
me->SetCanFly(true);
|
||||
me->SetDisableGravity(true);
|
||||
me->SetByteFlag(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_HOVER);
|
||||
|
||||
@@ -63,10 +63,10 @@ class boss_cyanigosa : public CreatureScript
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* /*who*/) override { }
|
||||
|
||||
@@ -90,10 +90,10 @@ class boss_erekem : public CreatureScript
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
bool CheckGuardAuras(Creature* guard) const
|
||||
|
||||
@@ -162,10 +162,10 @@ class boss_ichoron : public CreatureScript
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
|
||||
@@ -52,11 +52,6 @@ class boss_lavanthor : public CreatureScript
|
||||
instance->SetData(DATA_HANDLE_CELLS, DATA_LAVANTHOR);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -59,11 +59,6 @@ class boss_moragg : public CreatureScript
|
||||
instance->SetData(DATA_HANDLE_CELLS, DATA_MORAGG);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
|
||||
@@ -113,10 +113,10 @@ class boss_xevozz : public CreatureScript
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void SpellHit(Unit* /*who*/, SpellInfo const* spell) override
|
||||
|
||||
@@ -103,10 +103,10 @@ class boss_zuramat : public CreatureScript
|
||||
return 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
BossAI::JustDied(killer);
|
||||
Talk(SAY_DEATH);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
|
||||
@@ -366,9 +366,10 @@ public:
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (!killer || killer->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player* player = killer->ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (player->GetQuestStatus(QUEST_TAKEN_BY_THE_SCOURGE) == QUEST_STATUS_INCOMPLETE)
|
||||
{
|
||||
@@ -1270,9 +1271,9 @@ public:
|
||||
leryssa->ClearUnitState(UNIT_STATE_STUNNED);
|
||||
leryssa->SetWalk(false);
|
||||
leryssa->GetMotionMaster()->MovePoint(0, 3722.114502f, 3564.201660f, 477.441437f);
|
||||
|
||||
if (Player* player = killer->ToPlayer())
|
||||
player->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0);
|
||||
|
||||
if (killer && killer->GetTypeId() == TYPEID_PLAYER)
|
||||
killer->ToPlayer()->RewardPlayerAndGroupAtEvent(NPC_PRINCE_VALANAR, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1941,9 +1942,10 @@ public:
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (!killer || killer->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player* player = killer->ToPlayer();
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
if (player->GetQuestStatus(QUEST_YOU_RE_NOT_SO_BIG_NOW) == QUEST_STATUS_INCOMPLETE &&
|
||||
(me->HasAura(SPELL_AURA_NOTSOBIG_1) || me->HasAura(SPELL_AURA_NOTSOBIG_2) ||
|
||||
|
||||
@@ -636,11 +636,11 @@ public:
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
Player* player = killer->ToPlayer();
|
||||
|
||||
if (!player)
|
||||
if (!killer || killer->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
Player* player = killer->ToPlayer();
|
||||
|
||||
if (roll_chance_i(20))
|
||||
{
|
||||
player->CastSpell(me, SPELL_SUMMON_FREED_MIST_WHISPER_SCOUT, true);
|
||||
|
||||
@@ -405,7 +405,7 @@ class npc_wg_give_promotion_credit : public CreatureScript
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (killer->GetTypeId() != TYPEID_PLAYER)
|
||||
if (!killer || killer->GetTypeId() != TYPEID_PLAYER)
|
||||
return;
|
||||
|
||||
BattlefieldWG* wintergrasp = static_cast<BattlefieldWG*>(sBattlefieldMgr->GetBattlefieldByBattleId(BATTLEFIELD_BATTLEID_WG));
|
||||
|
||||
@@ -180,11 +180,11 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -206,11 +206,11 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -262,11 +262,11 @@ public:
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -172,11 +172,11 @@ public:
|
||||
if (!events.IsInPhase(PHASE_INTRO) && !UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
|
||||
@@ -191,18 +191,22 @@ class instance_serpent_shrine : public InstanceMapScript
|
||||
case 184568:
|
||||
ControlConsole = go->GetGUID();
|
||||
go->setActive(true);
|
||||
go->SetFarVisible(true);
|
||||
break;
|
||||
case 184203:
|
||||
BridgePart[0] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
go->SetFarVisible(true);
|
||||
break;
|
||||
case 184204:
|
||||
BridgePart[1] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
go->SetFarVisible(true);
|
||||
break;
|
||||
case 184205:
|
||||
BridgePart[2] = go->GetGUID();
|
||||
go->setActive(true);
|
||||
go->SetFarVisible(true);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
+5
-2
@@ -308,8 +308,11 @@ class npc_shadowmoon_channeler : public CreatureScript
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer);
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
if (Creature* Kelidan = me->FindNearestCreature(ENTRY_KELIDAN, 100))
|
||||
ENSURE_AI(boss_kelidan_the_breaker::boss_kelidan_the_breakerAI, Kelidan->AI())->ChannelerDied(killer);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
+3
@@ -484,6 +484,9 @@ class npc_hellfire_sentry : public CreatureScript
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
if (Creature* herald = me->FindNearestCreature(NPC_VAZRUDEN_HERALD, 150))
|
||||
ENSURE_AI(boss_vazruden_the_herald::boss_vazruden_the_heraldAI, herald->AI())->SentryDownBy(killer);
|
||||
}
|
||||
|
||||
@@ -218,11 +218,14 @@ class boss_magtheridon : public CreatureScript
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
if (!events.IsInPhase(PHASE_BANISH) && !UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
while (uint32 eventId = events.ExecuteEvent())
|
||||
{
|
||||
switch (eventId)
|
||||
@@ -291,9 +294,6 @@ class boss_magtheridon : public CreatureScript
|
||||
return;
|
||||
}
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ class boss_shattered_executioner : public CreatureScript
|
||||
|
||||
void JustSummoned(Creature*) override { } // avoid despawn of prisoners on death/reset
|
||||
|
||||
void JustDied(Unit*) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
|
||||
|
||||
@@ -647,10 +647,10 @@ class boss_kaelthas : public CreatureScript
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
Talk(SAY_DEATH);
|
||||
BossAI::JustDied(killer);
|
||||
_JustDied();
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -93,7 +93,7 @@ class boss_mechano_lord_capacitus : public CreatureScript
|
||||
Talk(YELL_KILL);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*victim*/) override
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(YELL_DEATH);
|
||||
|
||||
@@ -971,6 +971,9 @@ public:
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
{
|
||||
if (!killer)
|
||||
return;
|
||||
|
||||
switch (killer->GetTypeId())
|
||||
{
|
||||
case TYPEID_UNIT:
|
||||
|
||||
@@ -922,6 +922,24 @@ enum Clone
|
||||
SPELL_NIGHTMARE_FIGMENT_MIRROR_IMAGE = 57528
|
||||
};
|
||||
|
||||
// 5138 - Drain Mana
|
||||
// 8129 - Mana Burn
|
||||
class spell_gen_clear_fear_poly : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_clear_fear_poly);
|
||||
|
||||
void HandleAfterHit()
|
||||
{
|
||||
if (Unit* unitTarget = GetHitUnit())
|
||||
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_gen_clear_fear_poly::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_clone : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
@@ -1324,6 +1342,118 @@ class spell_gen_dalaran_disguise : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_decay_over_time : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_decay_over_time(char const* name) : SpellScriptLoader(name) { }
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_gen_decay_over_time_SpellScript();
|
||||
}
|
||||
|
||||
private:
|
||||
class spell_gen_decay_over_time_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_decay_over_time_SpellScript);
|
||||
|
||||
void ModAuraStack()
|
||||
{
|
||||
if (Aura* aur = GetHitAura())
|
||||
aur->SetStackAmount(static_cast<uint8>(GetSpellInfo()->StackAmount));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_gen_decay_over_time_SpellScript::ModAuraStack);
|
||||
}
|
||||
};
|
||||
|
||||
protected:
|
||||
class spell_gen_decay_over_time_AuraScript : public AuraScript
|
||||
{
|
||||
protected:
|
||||
PrepareAuraScript(spell_gen_decay_over_time_AuraScript);
|
||||
|
||||
bool CheckProc(ProcEventInfo& eventInfo)
|
||||
{
|
||||
return (eventInfo.GetSpellInfo() == GetSpellInfo());
|
||||
}
|
||||
|
||||
void Decay(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
ModStackAmount(-1);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_gen_decay_over_time_AuraScript::CheckProc);
|
||||
OnProc += AuraProcFn(spell_gen_decay_over_time_AuraScript::Decay);
|
||||
}
|
||||
|
||||
~spell_gen_decay_over_time_AuraScript() = default;
|
||||
};
|
||||
|
||||
~spell_gen_decay_over_time() = default;
|
||||
};
|
||||
|
||||
enum FungalDecay
|
||||
{
|
||||
// found in sniffs, there is no duration entry we can possibly use
|
||||
AURA_DURATION = 12600
|
||||
};
|
||||
|
||||
// 32065 - Fungal Decay
|
||||
class spell_gen_decay_over_time_fungal_decay : public spell_gen_decay_over_time
|
||||
{
|
||||
public:
|
||||
spell_gen_decay_over_time_fungal_decay() : spell_gen_decay_over_time("spell_gen_decay_over_time_fungal_decay") { }
|
||||
|
||||
class spell_gen_decay_over_time_fungal_decay_AuraScript : public spell_gen_decay_over_time_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_decay_over_time_fungal_decay_AuraScript);
|
||||
|
||||
void ModDuration(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
// only on actual reapply, not on stack decay
|
||||
if (GetDuration() == GetMaxDuration())
|
||||
{
|
||||
SetMaxDuration(AURA_DURATION);
|
||||
SetDuration(AURA_DURATION);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
spell_gen_decay_over_time_AuraScript::Register();
|
||||
OnEffectApply += AuraEffectApplyFn(spell_gen_decay_over_time_fungal_decay_AuraScript::ModDuration, EFFECT_0, SPELL_AURA_MOD_DECREASE_SPEED, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_gen_decay_over_time_fungal_decay_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
// 36659 - Tail Sting
|
||||
class spell_gen_decay_over_time_tail_sting : public spell_gen_decay_over_time
|
||||
{
|
||||
public:
|
||||
spell_gen_decay_over_time_tail_sting() : spell_gen_decay_over_time("spell_gen_decay_over_time_tail_sting") { }
|
||||
|
||||
class spell_gen_decay_over_time_tail_sting_AuraScript : public spell_gen_decay_over_time_AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_decay_over_time_tail_sting_AuraScript);
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_gen_decay_over_time_tail_sting_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
enum DefendVisuals
|
||||
{
|
||||
SPELL_VISUAL_SHIELD_1 = 63130,
|
||||
@@ -4733,6 +4863,7 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_burning_depths_necrolyte_image();
|
||||
new spell_gen_cannibalize();
|
||||
new spell_gen_chaos_blast();
|
||||
RegisterSpellScript(spell_gen_clear_fear_poly);
|
||||
new spell_gen_clone();
|
||||
new spell_gen_clone_weapon();
|
||||
new spell_gen_clone_weapon_aura();
|
||||
@@ -4742,6 +4873,8 @@ void AddSC_generic_spell_scripts()
|
||||
new spell_gen_creature_permanent_feign_death();
|
||||
new spell_gen_dalaran_disguise("spell_gen_sunreaver_disguise");
|
||||
new spell_gen_dalaran_disguise("spell_gen_silver_covenant_disguise");
|
||||
new spell_gen_decay_over_time_fungal_decay();
|
||||
new spell_gen_decay_over_time_tail_sting();
|
||||
new spell_gen_defend();
|
||||
new spell_gen_despawn_self();
|
||||
new spell_gen_divine_storm_cd_reset();
|
||||
|
||||
@@ -628,34 +628,6 @@ class spell_pri_lightwell_renew : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 8129 - Mana Burn
|
||||
class spell_pri_mana_burn : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_pri_mana_burn() : SpellScriptLoader("spell_pri_mana_burn") { }
|
||||
|
||||
class spell_pri_mana_burn_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_pri_mana_burn_SpellScript);
|
||||
|
||||
void HandleAfterHit()
|
||||
{
|
||||
if (Unit* unitTarget = GetHitUnit())
|
||||
unitTarget->RemoveAurasWithMechanic((1 << MECHANIC_FEAR) | (1 << MECHANIC_POLYMORPH));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_pri_mana_burn_SpellScript::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_pri_mana_burn_SpellScript;
|
||||
}
|
||||
};
|
||||
|
||||
// 28305 - Mana Leech (Passive) (Priest Pet Aura)
|
||||
class spell_pri_mana_leech : public SpellScriptLoader
|
||||
{
|
||||
@@ -1303,7 +1275,6 @@ void AddSC_priest_spell_scripts()
|
||||
new spell_pri_guardian_spirit();
|
||||
new spell_pri_leap_of_faith_effect_trigger();
|
||||
new spell_pri_lightwell_renew();
|
||||
new spell_pri_mana_burn();
|
||||
new spell_pri_mana_leech();
|
||||
new spell_pri_mind_sear();
|
||||
new spell_pri_pain_and_suffering_proc();
|
||||
|
||||
Reference in new issue
Block a user