mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 02:04:52 +01:00
Core/Scripts: Reliquary of Souls Rewrite
This commit is contained in:
@@ -18,28 +18,39 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "black_temple.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
|
||||
enum Spells
|
||||
{
|
||||
// Wrathbone Flayer
|
||||
SPELL_CLEAVE = 15496,
|
||||
SPELL_IGNORED = 39544,
|
||||
SPELL_SUMMON_CHANNEL = 40094
|
||||
SPELL_CLEAVE = 15496,
|
||||
SPELL_IGNORED = 39544,
|
||||
SPELL_SUMMON_CHANNEL = 40094,
|
||||
|
||||
// Angered Soul Fragment
|
||||
SPELL_GREATER_INVISIBILITY = 41253,
|
||||
SPELL_ANGER = 41986
|
||||
};
|
||||
|
||||
enum Creatures
|
||||
{
|
||||
NPC_BLOOD_MAGE = 22945,
|
||||
NPC_DEATHSHAPER = 22882
|
||||
NPC_BLOOD_MAGE = 22945,
|
||||
NPC_DEATHSHAPER = 22882
|
||||
};
|
||||
|
||||
enum Events
|
||||
{
|
||||
// Wrathbone Flayer
|
||||
EVENT_GET_CHANNELERS = 1,
|
||||
EVENT_SET_CHANNELERS = 2,
|
||||
EVENT_CLEAVE = 3,
|
||||
EVENT_IGNORED = 4,
|
||||
EVENT_GET_CHANNELERS = 1,
|
||||
EVENT_SET_CHANNELERS,
|
||||
EVENT_CLEAVE,
|
||||
EVENT_IGNORED
|
||||
};
|
||||
|
||||
enum Misc
|
||||
{
|
||||
GROUP_OUT_OF_COMBAT = 1
|
||||
};
|
||||
|
||||
// ########################################################
|
||||
@@ -178,7 +189,102 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class npc_angered_soul_fragment : public CreatureScript
|
||||
{
|
||||
public:
|
||||
npc_angered_soul_fragment() : CreatureScript("npc_angered_soul_fragment") { }
|
||||
|
||||
struct npc_angered_soul_fragmentAI : public ScriptedAI
|
||||
{
|
||||
npc_angered_soul_fragmentAI(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
_scheduler.CancelAll();
|
||||
|
||||
_scheduler.Schedule(Seconds(1), GROUP_OUT_OF_COMBAT, [this](TaskContext invi)
|
||||
{
|
||||
DoCastSelf(SPELL_GREATER_INVISIBILITY);
|
||||
|
||||
/* Workaround - On Retail creature appear and "vanish" again periodically, but i cant find packets
|
||||
with UPDATE_AURA on sniffs about it */
|
||||
_scheduler.Schedule(Seconds(5), Seconds(10), GROUP_OUT_OF_COMBAT, [this](TaskContext /*context*/)
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GREATER_INVISIBILITY);
|
||||
});
|
||||
|
||||
invi.Repeat(Seconds(15), Seconds(25));
|
||||
});
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
{
|
||||
me->RemoveAurasDueToSpell(SPELL_GREATER_INVISIBILITY);
|
||||
|
||||
_scheduler.CancelGroup(GROUP_OUT_OF_COMBAT);
|
||||
_scheduler.Schedule(Seconds(1), [this](TaskContext anger)
|
||||
{
|
||||
Unit* target = me->GetVictim();
|
||||
if (target && me->IsWithinMeleeRange(target))
|
||||
DoCastSelf(SPELL_ANGER);
|
||||
else
|
||||
anger.Repeat(Seconds(1));
|
||||
});
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
_scheduler.Update(diff);
|
||||
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
private:
|
||||
TaskScheduler _scheduler;
|
||||
};
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return GetBlackTempleAI<npc_angered_soul_fragmentAI>(creature);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_soul_fragment_anger : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_soul_fragment_anger() : SpellScriptLoader("spell_soul_fragment_anger") { }
|
||||
|
||||
class spell_soul_fragment_anger_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_soul_fragment_anger_SpellScript);
|
||||
|
||||
void HandleKill()
|
||||
{
|
||||
if (Creature* caster = GetCaster()->ToCreature())
|
||||
caster->DespawnOrUnsummon(Milliseconds(200));
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterCast += SpellCastFn(spell_soul_fragment_anger_SpellScript::HandleKill);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_soul_fragment_anger_SpellScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_black_temple()
|
||||
{
|
||||
new npc_wrathbone_flayer();
|
||||
new npc_angered_soul_fragment();
|
||||
new spell_soul_fragment_anger();
|
||||
}
|
||||
|
||||
@@ -47,8 +47,13 @@ enum DataTypes
|
||||
DATA_BLOOD_ELF_COUNCIL_VOICE = 15,
|
||||
|
||||
DATA_GO_ILLIDAN_GATE = 16,
|
||||
|
||||
DATA_BLACK_TEMPLE_TRIGGER = 17,
|
||||
DATA_GO_DEN_OF_MORTAL_DOOR = 18
|
||||
DATA_GO_DEN_OF_MORTAL_DOOR = 18,
|
||||
|
||||
DATA_ESSENCE_OF_SUFFERING = 19,
|
||||
DATA_ESSENCE_OF_DESIRE = 20,
|
||||
DATA_ESSENCE_OF_ANGER = 21
|
||||
};
|
||||
|
||||
enum TriggerEmotes
|
||||
@@ -79,7 +84,9 @@ enum CreatureIds
|
||||
NPC_AKAMA = 23089, // This is the Akama that starts the Illidan encounter.
|
||||
NPC_AKAMA_SHADE = 23191, // This is the Akama that starts the Shade of Akama encounter.
|
||||
NPC_SUPREMUS_VOLCANO = 23085,
|
||||
NPC_BLACK_TEMPLE_TRIGGER = 22984
|
||||
NPC_BLACK_TEMPLE_TRIGGER = 22984,
|
||||
NPC_RELIQUARY_WORLD_TRIGGER = 23472,
|
||||
NPC_ENSLAVED_SOUL = 23469
|
||||
};
|
||||
|
||||
enum GameObjectIds
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -341,6 +341,7 @@ public:
|
||||
me->AddThreat(target, 1000000.0f);
|
||||
targetGUID = target->GetGUID();
|
||||
}
|
||||
// He should target Vengeful Spirits only if has no other player available
|
||||
else if (Unit* target = teron->AI()->SelectTarget(SELECT_TARGET_RANDOM, 0))
|
||||
{
|
||||
DoResetThreat();
|
||||
|
||||
@@ -45,6 +45,7 @@ BossBoundaryData const boundaries =
|
||||
{ DATA_TERON_GOREFIEND, new ZRangeBoundary(179.5f, 223.6f) },
|
||||
{ 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 ZRangeBoundary(81.8f, 148.0f) },
|
||||
{ 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_ILLIDAN_STORMRAGE, new EllipseBoundary(Position(694.8f, 309.0f), 70.0 , 85.0) }
|
||||
|
||||
Reference in New Issue
Block a user