mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Scripts/BlackTemple: minor cleanup and corrections after recent PRs
plus a ninja tabs to spaces cleanup
This commit is contained in:
@@ -646,7 +646,7 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
player->CastSpell(me, rivenWidowCocoonVictims[urand(0, 10)], true);
|
player->CastSpell(me, rivenWidowCocoonVictims[urand(0, 10)], true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
|
|||||||
@@ -15,12 +15,12 @@
|
|||||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "black_temple.h"
|
||||||
#include "ScriptMgr.h"
|
#include "ScriptMgr.h"
|
||||||
#include "ScriptedCreature.h"
|
#include "ScriptedCreature.h"
|
||||||
#include "SpellScript.h"
|
#include "SpellScript.h"
|
||||||
#include "black_temple.h"
|
|
||||||
#include "GridNotifiersImpl.h"
|
|
||||||
#include "PassiveAI.h"
|
#include "PassiveAI.h"
|
||||||
|
#include "GridNotifiers.h"
|
||||||
|
|
||||||
enum Says
|
enum Says
|
||||||
{
|
{
|
||||||
@@ -184,7 +184,7 @@ public:
|
|||||||
|
|
||||||
events.Update(diff);
|
events.Update(diff);
|
||||||
|
|
||||||
while (uint32 eventId = events.ExecuteEvent())
|
while (uint32 eventId = events.ExecuteEvent())
|
||||||
{
|
{
|
||||||
switch (eventId)
|
switch (eventId)
|
||||||
{
|
{
|
||||||
@@ -235,8 +235,7 @@ public:
|
|||||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
|
||||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
|
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, true);
|
||||||
}
|
}
|
||||||
//Solo attempts dont change phase (he reset first phase spells)
|
else // If no other targets are found, reset phase 1
|
||||||
else
|
|
||||||
{
|
{
|
||||||
events.SetPhase(PHASE_1);
|
events.SetPhase(PHASE_1);
|
||||||
events.CancelEventGroup(GROUP_PHASE_2);
|
events.CancelEventGroup(GROUP_PHASE_2);
|
||||||
@@ -289,26 +288,28 @@ public:
|
|||||||
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, false);
|
||||||
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, false);
|
me->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_ATTACK_ME, false);
|
||||||
ScheduleEvents();
|
ScheduleEvents();
|
||||||
//When phase 2 ends, he need attack back the tanker of the first phase
|
|
||||||
if (Unit* target = ObjectAccessor::GetUnit(*me, _oldTargetGUID))
|
// Attack the stored target
|
||||||
if (Unit* phase2tanker = ObjectAccessor::GetUnit(*me, _targetGUID))
|
if (Unit* oldTarget = ObjectAccessor::GetUnit(*me, _oldTargetGUID))
|
||||||
|
if (Unit* currentTarget = ObjectAccessor::GetUnit(*me, _targetGUID))
|
||||||
{
|
{
|
||||||
DoModifyThreatPercent(phase2tanker, -100);
|
DoModifyThreatPercent(currentTarget, -100);
|
||||||
AttackStart(target);
|
AttackStart(oldTarget);
|
||||||
me->AddThreat(target, _oldThreat);
|
me->AddThreat(oldTarget, _oldThreat);
|
||||||
Initialize();
|
Initialize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
ObjectGuid _targetGUID;
|
private:
|
||||||
ObjectGuid _oldTargetGUID;
|
ObjectGuid _targetGUID;
|
||||||
float _oldThreat;
|
ObjectGuid _oldTargetGUID;
|
||||||
|
float _oldThreat;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<boss_gurtogg_bloodboilAI>(creature);
|
return GetBlackTempleAI<boss_gurtogg_bloodboilAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -330,7 +331,7 @@ public:
|
|||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return new npc_fel_geyserAI(creature);
|
return GetBlackTempleAI<npc_fel_geyserAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ public:
|
|||||||
events.Reset();
|
events.Reset();
|
||||||
summons.DespawnAll();
|
summons.DespawnAll();
|
||||||
|
|
||||||
for (ObjectGuid const& spawnerGuid : _spawners)
|
for (ObjectGuid const spawnerGuid : _spawners)
|
||||||
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
||||||
spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS);
|
spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS);
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ public:
|
|||||||
me->SetWalk(false);
|
me->SetWalk(false);
|
||||||
events.ScheduleEvent(EVENT_ADD_THREAT, Milliseconds(100));
|
events.ScheduleEvent(EVENT_ADD_THREAT, Milliseconds(100));
|
||||||
|
|
||||||
for (ObjectGuid const& spawnerGuid : _spawners)
|
for (ObjectGuid const spawnerGuid : _spawners)
|
||||||
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
||||||
spawner->AI()->DoAction(ACTION_STOP_SPAWNING);
|
spawner->AI()->DoAction(ACTION_STOP_SPAWNING);
|
||||||
}
|
}
|
||||||
@@ -281,7 +281,7 @@ public:
|
|||||||
if (Creature* akama = instance->GetCreature(DATA_AKAMA_SHADE))
|
if (Creature* akama = instance->GetCreature(DATA_AKAMA_SHADE))
|
||||||
akama->AI()->DoAction(ACTION_SHADE_OF_AKAMA_DEAD);
|
akama->AI()->DoAction(ACTION_SHADE_OF_AKAMA_DEAD);
|
||||||
|
|
||||||
for (ObjectGuid const& spawnerGuid : _spawners)
|
for (ObjectGuid const spawnerGuid : _spawners)
|
||||||
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
||||||
spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS);
|
spawner->AI()->DoAction(ACTION_DESPAWN_ALL_SPAWNS);
|
||||||
|
|
||||||
@@ -323,11 +323,11 @@ public:
|
|||||||
}
|
}
|
||||||
case EVENT_START_CHANNELERS_AND_SPAWNERS:
|
case EVENT_START_CHANNELERS_AND_SPAWNERS:
|
||||||
{
|
{
|
||||||
for (ObjectGuid const& summonGuid : summons)
|
for (ObjectGuid const summonGuid : summons)
|
||||||
if (Creature* channeler = ObjectAccessor::GetCreature(*me, summonGuid))
|
if (Creature* channeler = ObjectAccessor::GetCreature(*me, summonGuid))
|
||||||
channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
channeler->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||||
|
|
||||||
for (ObjectGuid const& spawnerGuid : _spawners)
|
for (ObjectGuid const spawnerGuid : _spawners)
|
||||||
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
if (Creature* spawner = ObjectAccessor::GetCreature(*me, spawnerGuid))
|
||||||
spawner->AI()->DoAction(ACTION_START_SPAWNING);
|
spawner->AI()->DoAction(ACTION_START_SPAWNING);
|
||||||
|
|
||||||
@@ -349,14 +349,14 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GuidVector _spawners;
|
GuidVector _spawners;
|
||||||
bool _isInPhaseOne;
|
bool _isInPhaseOne;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<boss_shade_of_akamaAI>(creature);
|
return GetBlackTempleAI<boss_shade_of_akamaAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -560,19 +560,19 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
SummonList _summons;
|
SummonList _summons;
|
||||||
DummyEntryCheckPredicate _pred;
|
DummyEntryCheckPredicate _pred;
|
||||||
ObjectGuid _chosen; //Creature that should yell the speech special.
|
ObjectGuid _chosen; //Creature that should yell the speech special.
|
||||||
bool _isInCombat;
|
bool _isInCombat;
|
||||||
bool _hasYelledOnce;
|
bool _hasYelledOnce;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_akamaAI>(creature);
|
return GetBlackTempleAI<npc_akamaAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -611,14 +611,14 @@ public:
|
|||||||
_scheduler.Update(diff);
|
_scheduler.Update(diff);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
TaskScheduler _scheduler;
|
TaskScheduler _scheduler;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_channelerAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_channelerAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -708,15 +708,15 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
SummonList _summons;
|
SummonList _summons;
|
||||||
bool _leftSide;
|
bool _leftSide;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_creature_generator_akamaAI>(creature);
|
return GetBlackTempleAI<npc_creature_generator_akamaAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -812,16 +812,16 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
TaskScheduler _scheduler;
|
TaskScheduler _scheduler;
|
||||||
bool _switchToCombat;
|
bool _switchToCombat;
|
||||||
bool _inBanish;
|
bool _inBanish;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_sorcererAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_sorcererAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -892,14 +892,14 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_defenderAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_defenderAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -961,14 +961,14 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_rogueAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_rogueAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1030,14 +1030,14 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_elementalistAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_elementalistAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1129,16 +1129,16 @@ public:
|
|||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
EventMap _events;
|
EventMap _events;
|
||||||
bool _spiritMend;
|
bool _spiritMend;
|
||||||
bool _chainHeal;
|
bool _chainHeal;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_spiritbinderAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_spiritbinderAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1189,7 +1189,7 @@ public:
|
|||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_ashtongue_brokenAI>(creature);
|
return GetBlackTempleAI<npc_ashtongue_brokenAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ public:
|
|||||||
void InitializeAI() override
|
void InitializeAI() override
|
||||||
{
|
{
|
||||||
float x, y, z;
|
float x, y, z;
|
||||||
me->GetNearPoint(me, x, y, z, 1, 100.0f, float(M_PI * 2 * rand_norm()));
|
me->GetNearPoint(me, x, y, z, 1, 100.0f, frand(0.f, 2.f * float(M_PI)));
|
||||||
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
me->GetMotionMaster()->MovePoint(0, x, y, z);
|
||||||
DoCastSelf(SPELL_MOLTEN_FLAME, true);
|
DoCastSelf(SPELL_MOLTEN_FLAME, true);
|
||||||
}
|
}
|
||||||
@@ -208,7 +208,7 @@ public:
|
|||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return new npc_molten_flameAI(creature);
|
return GetBlackTempleAI<npc_molten_flameAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ public:
|
|||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return new npc_volcanoAI(creature);
|
return GetBlackTempleAI<npc_volcanoAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -86,6 +86,12 @@ enum Events
|
|||||||
EVENT_FINISH_INTRO
|
EVENT_FINISH_INTRO
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum Phases
|
||||||
|
{
|
||||||
|
PHASE_INTRO = 1,
|
||||||
|
PHASE_COMBAT
|
||||||
|
};
|
||||||
|
|
||||||
enum Actions
|
enum Actions
|
||||||
{
|
{
|
||||||
ACTION_START_INTRO = 1
|
ACTION_START_INTRO = 1
|
||||||
@@ -108,15 +114,22 @@ public:
|
|||||||
{
|
{
|
||||||
boss_teron_gorefiendAI(Creature* creature) : BossAI(creature, DATA_TERON_GOREFIEND), _intro(false)
|
boss_teron_gorefiendAI(Creature* creature) : BossAI(creature, DATA_TERON_GOREFIEND), _intro(false)
|
||||||
{
|
{
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
creature->SetReactState(REACT_PASSIVE);
|
||||||
me->SetReactState(REACT_PASSIVE);
|
}
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
|
{
|
||||||
|
_Reset();
|
||||||
|
_intro = false;
|
||||||
|
events.SetPhase(PHASE_INTRO);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnterCombat(Unit* /*who*/) override
|
void EnterCombat(Unit* /*who*/) override
|
||||||
{
|
{
|
||||||
_EnterCombat();
|
_EnterCombat();
|
||||||
Talk(SAY_AGGRO);
|
Talk(SAY_AGGRO);
|
||||||
|
events.SetPhase(PHASE_COMBAT);
|
||||||
events.ScheduleEvent(EVENT_ENRAGE, Minutes(10));
|
events.ScheduleEvent(EVENT_ENRAGE, Minutes(10));
|
||||||
events.ScheduleEvent(EVENT_INCINERATE, Seconds(12));
|
events.ScheduleEvent(EVENT_INCINERATE, Seconds(12));
|
||||||
events.ScheduleEvent(EVENT_SUMMON_DOOM_BLOSSOM, Seconds(8));
|
events.ScheduleEvent(EVENT_SUMMON_DOOM_BLOSSOM, Seconds(8));
|
||||||
@@ -156,6 +169,9 @@ public:
|
|||||||
|
|
||||||
void UpdateAI(uint32 diff) override
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
|
if (!events.IsInPhase(PHASE_INTRO) && !UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -202,18 +218,16 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!UpdateVictim())
|
|
||||||
return;
|
|
||||||
|
|
||||||
DoMeleeAttackIfReady();
|
DoMeleeAttackIfReady();
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
bool _intro;
|
private:
|
||||||
|
bool _intro;
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<boss_teron_gorefiendAI>(creature);
|
return GetBlackTempleAI<boss_teron_gorefiendAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -223,18 +237,16 @@ public:
|
|||||||
npc_doom_blossom() : CreatureScript("npc_doom_blossom") { }
|
npc_doom_blossom() : CreatureScript("npc_doom_blossom") { }
|
||||||
struct npc_doom_blossomAI : public NullCreatureAI
|
struct npc_doom_blossomAI : public NullCreatureAI
|
||||||
{
|
{
|
||||||
npc_doom_blossomAI(Creature* creature) : NullCreatureAI(creature), _instance(me->GetInstanceScript())
|
npc_doom_blossomAI(Creature* creature) : NullCreatureAI(creature), _instance(me->GetInstanceScript()) { }
|
||||||
|
|
||||||
|
void Reset() override
|
||||||
{
|
{
|
||||||
/* Workaround - Until SMSG_SET_PLAY_HOVER_ANIM be implemented */
|
/* Workaround - Until SMSG_SET_PLAY_HOVER_ANIM be implemented */
|
||||||
me->SetDisableGravity(true);
|
|
||||||
Position pos;
|
Position pos;
|
||||||
pos.Relocate(me);
|
pos.Relocate(me);
|
||||||
pos.m_positionZ += 8.0f;
|
pos.m_positionZ += 8.0f;
|
||||||
me->GetMotionMaster()->MoveTakeoff(0, pos);
|
me->GetMotionMaster()->MoveTakeoff(0, pos);
|
||||||
}
|
|
||||||
|
|
||||||
void Reset() override
|
|
||||||
{
|
|
||||||
DoCast(SPELL_SUMMON_BLOSSOM_MOVE_TARGET);
|
DoCast(SPELL_SUMMON_BLOSSOM_MOVE_TARGET);
|
||||||
_scheduler.CancelAll();
|
_scheduler.CancelAll();
|
||||||
me->SetInCombatWithZone();
|
me->SetInCombatWithZone();
|
||||||
@@ -262,7 +274,7 @@ public:
|
|||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_doom_blossomAI>(creature);
|
return GetBlackTempleAI<npc_doom_blossomAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -270,13 +282,14 @@ class npc_shadowy_construct : public CreatureScript
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
npc_shadowy_construct() : CreatureScript("npc_shadowy_construct") { }
|
npc_shadowy_construct() : CreatureScript("npc_shadowy_construct") { }
|
||||||
|
|
||||||
struct npc_shadowy_constructAI : public ScriptedAI
|
struct npc_shadowy_constructAI : public ScriptedAI
|
||||||
{
|
{
|
||||||
npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature), _instance(me->GetInstanceScript())
|
npc_shadowy_constructAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
|
||||||
{
|
{
|
||||||
//This creature must be immune everything, except spells of Vengeful Spirit.
|
//This creature must be immune everything, except spells of Vengeful Spirit.
|
||||||
me->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
|
creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true);
|
||||||
me->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_MAGIC, true);
|
creature->ApplySpellImmune(0, IMMUNITY_SCHOOL, SPELL_SCHOOL_MASK_MAGIC, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset() override
|
void Reset() override
|
||||||
@@ -335,7 +348,6 @@ public:
|
|||||||
me->AddThreat(target, 1000000.0f);
|
me->AddThreat(target, 1000000.0f);
|
||||||
targetGUID = target->GetGUID();
|
targetGUID = target->GetGUID();
|
||||||
}
|
}
|
||||||
//He only should target Vengeful Spirits if has no other player available
|
|
||||||
else if (Unit* target = teron->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0))
|
else if (Unit* target = teron->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||||
{
|
{
|
||||||
DoResetThreat();
|
DoResetThreat();
|
||||||
@@ -350,12 +362,11 @@ public:
|
|||||||
TaskScheduler _scheduler;
|
TaskScheduler _scheduler;
|
||||||
InstanceScript* _instance;
|
InstanceScript* _instance;
|
||||||
ObjectGuid targetGUID;
|
ObjectGuid targetGUID;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
CreatureAI* GetAI(Creature* creature) const override
|
CreatureAI* GetAI(Creature* creature) const override
|
||||||
{
|
{
|
||||||
return GetInstanceAI<npc_shadowy_constructAI>(creature);
|
return GetBlackTempleAI<npc_shadowy_constructAI>(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -445,8 +456,8 @@ class spell_teron_gorefiend_spiritual_vengeance : public SpellScriptLoader
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
AfterEffectRemove += AuraEffectRemoveFn(spell_teron_gorefiend_spiritual_vengeance_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_POSSESS, AURA_EFFECT_HANDLE_REAL);
|
AfterEffectRemove += AuraEffectRemoveFn(spell_teron_gorefiend_spiritual_vengeance_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_MOD_POSSESS, AURA_EFFECT_HANDLE_REAL);
|
||||||
AfterEffectRemove += AuraEffectRemoveFn(spell_teron_gorefiend_spiritual_vengeance_AuraScript::OnRemove, EFFECT_2, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL);
|
AfterEffectRemove += AuraEffectRemoveFn(spell_teron_gorefiend_spiritual_vengeance_AuraScript::OnRemove, EFFECT_2, SPELL_AURA_MOD_PACIFY_SILENCE, AURA_EFFECT_HANDLE_REAL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -38,16 +38,16 @@ DoorData const doorData[] =
|
|||||||
|
|
||||||
BossBoundaryData const boundaries =
|
BossBoundaryData const boundaries =
|
||||||
{
|
{
|
||||||
{ DATA_HIGH_WARLORD_NAJENTUS, new RectangleBoundary(394.0f, 479.4f, 707.8f, 859.1f) },
|
{ DATA_HIGH_WARLORD_NAJENTUS, new RectangleBoundary(394.0f, 479.4f, 707.8f, 859.1f) },
|
||||||
{ DATA_SUPREMUS, new RectangleBoundary(556.1f, 850.2f, 542.0f, 1001.0f) },
|
{ DATA_SUPREMUS, new RectangleBoundary(556.1f, 850.2f, 542.0f, 1001.0f) },
|
||||||
{ DATA_SHADE_OF_AKAMA, new RectangleBoundary(406.8f, 564.0f, 327.9f, 473.5f) },
|
{ DATA_SHADE_OF_AKAMA, new RectangleBoundary(406.8f, 564.0f, 327.9f, 473.5f) },
|
||||||
{ DATA_TERON_GOREFIEND, new RectangleBoundary(512.5f, 613.3f, 373.2f, 432.0f) },
|
{ DATA_TERON_GOREFIEND, new RectangleBoundary(512.5f, 613.3f, 373.2f, 432.0f) },
|
||||||
{ DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) },
|
{ DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) },
|
||||||
{ DATA_GURTOGG_BLOODBOIL, new RectangleBoundary(720.5f, 864.5f, 159.3f, 316.0f) },
|
{ DATA_GURTOGG_BLOODBOIL, new RectangleBoundary(720.5f, 864.5f, 159.3f, 316.0f) },
|
||||||
{ DATA_RELIQUARY_OF_SOULS, new RectangleBoundary(435.9f, 558.8f, 113.3f, 229.6f) },
|
{ DATA_RELIQUARY_OF_SOULS, new RectangleBoundary(435.9f, 558.8f, 113.3f, 229.6f) },
|
||||||
{ DATA_MOTHER_SHAHRAZ, new RectangleBoundary(903.4f, 982.1f, 92.4f, 476.7f) },
|
{ DATA_MOTHER_SHAHRAZ, new RectangleBoundary(903.4f, 982.1f, 92.4f, 476.7f) },
|
||||||
{ DATA_ILLIDARI_COUNCIL, new EllipseBoundary(Position(696.6f, 305.0f), 70.0 , 85.0) },
|
{ DATA_ILLIDARI_COUNCIL, new EllipseBoundary(Position(696.6f, 305.0f), 70.0 , 85.0) },
|
||||||
{ DATA_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 70.0 , 85.0) }
|
{ DATA_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 70.0 , 85.0) }
|
||||||
};
|
};
|
||||||
|
|
||||||
ObjectData const creatureData[] =
|
ObjectData const creatureData[] =
|
||||||
@@ -74,9 +74,9 @@ ObjectData const creatureData[] =
|
|||||||
|
|
||||||
ObjectData const gameObjectData[] =
|
ObjectData const gameObjectData[] =
|
||||||
{
|
{
|
||||||
{ GO_ILLIDAN_GATE, DATA_GO_ILLIDAN_GATE },
|
{ GO_ILLIDAN_GATE, DATA_GO_ILLIDAN_GATE },
|
||||||
{ GO_DEN_OF_MORTAL_DOOR, DATA_GO_DEN_OF_MORTAL_DOOR },
|
{ GO_DEN_OF_MORTAL_DOOR, DATA_GO_DEN_OF_MORTAL_DOOR },
|
||||||
{ 0, 0 } //END
|
{ 0, 0 } //END
|
||||||
};
|
};
|
||||||
|
|
||||||
class instance_black_temple : public InstanceMapScript
|
class instance_black_temple : public InstanceMapScript
|
||||||
@@ -98,15 +98,17 @@ class instance_black_temple : public InstanceMapScript
|
|||||||
void OnGameObjectCreate(GameObject* go) override
|
void OnGameObjectCreate(GameObject* go) override
|
||||||
{
|
{
|
||||||
InstanceScript::OnGameObjectCreate(go);
|
InstanceScript::OnGameObjectCreate(go);
|
||||||
|
|
||||||
if (go->GetEntry() == GO_DEN_OF_MORTAL_DOOR)
|
if (go->GetEntry() == GO_DEN_OF_MORTAL_DOOR)
|
||||||
if(CheckDenOfMortalDoor())
|
if (CheckDenOfMortalDoor())
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
HandleGameObject(ObjectGuid::Empty, true, go);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SetBossState(uint32 type, EncounterState state) override
|
bool SetBossState(uint32 type, EncounterState state) override
|
||||||
{
|
{
|
||||||
if (!InstanceScript::SetBossState(type, state))
|
if (!InstanceScript::SetBossState(type, state))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case DATA_HIGH_WARLORD_NAJENTUS:
|
case DATA_HIGH_WARLORD_NAJENTUS:
|
||||||
@@ -123,13 +125,14 @@ class instance_black_temple : public InstanceMapScript
|
|||||||
if (Creature* trigger = GetCreature(DATA_BLACK_TEMPLE_TRIGGER))
|
if (Creature* trigger = GetCreature(DATA_BLACK_TEMPLE_TRIGGER))
|
||||||
trigger->AI()->Talk(EMOTE_DEN_OF_MORTAL_DOOR_OPEN);
|
trigger->AI()->Talk(EMOTE_DEN_OF_MORTAL_DOOR_OPEN);
|
||||||
|
|
||||||
if(GameObject* go = GetGameObject(DATA_GO_DEN_OF_MORTAL_DOOR))
|
if (GameObject* door = GetGameObject(DATA_GO_DEN_OF_MORTAL_DOOR))
|
||||||
go->SetGoState(GO_STATE_ACTIVE);
|
HandleGameObject(ObjectGuid::Empty, true, door);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1318,7 +1318,7 @@ public:
|
|||||||
{
|
{
|
||||||
uint32 rnd = 0;
|
uint32 rnd = 0;
|
||||||
uint32 musicTime = 1000;
|
uint32 musicTime = 1000;
|
||||||
|
|
||||||
go_brewfest_musicAI(GameObject* go) : GameObjectAI(go)
|
go_brewfest_musicAI(GameObject* go) : GameObjectAI(go)
|
||||||
{
|
{
|
||||||
_events.ScheduleEvent(EVENT_BM_SELECT_MUSIC, 1000);
|
_events.ScheduleEvent(EVENT_BM_SELECT_MUSIC, 1000);
|
||||||
|
|||||||
Reference in New Issue
Block a user