mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Scripts: Reliquary of Souls Rewrite
This commit is contained in:
57
sql/updates/world/3.3.5/2016_12_13_00_world.sql
Normal file
57
sql/updates/world/3.3.5/2016_12_13_00_world.sql
Normal file
@@ -0,0 +1,57 @@
|
||||
UPDATE `creature_template` SET `AIName`='' WHERE `entry`=23472;
|
||||
|
||||
-- Condition for spell Fixate
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=41295;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||
(13,1,41295,0,0,31,0,3,23418,0,0,0,0,'','Effect_0 hits Essence of Suffering');
|
||||
|
||||
DELETE FROM `creature_template_addon` WHERE `entry`=23418;
|
||||
INSERT INTO `creature_template_addon` (`entry`, `path_id`, `mount`, `bytes1`, `bytes2`, `emote`, `auras`) VALUES
|
||||
(23418, 0, 0, 0, 1, 0,'41296 41623');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN('spell_reliquary_of_souls_aura_of_desire','spell_reliquary_of_souls_submerge','spell_reliquary_of_souls_spite','spell_soul_fragment_anger','spell_reliquary_of_souls_frenzy');
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(41350,'spell_reliquary_of_souls_aura_of_desire'),
|
||||
(28819,'spell_reliquary_of_souls_submerge'),
|
||||
(41376,'spell_reliquary_of_souls_spite'),
|
||||
(41986,'spell_soul_fragment_anger'),
|
||||
(41305,'spell_reliquary_of_souls_frenzy');
|
||||
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=-41376 AND`spell_effect`=41377 AND`type`=0;
|
||||
|
||||
UPDATE `creature_template` SET `modelid1`=11686, `modelid2`=1126, `flags_extra`=0, `ScriptName`='npc_angered_soul_fragment' WHERE `entry`=23398;
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId`=41350;
|
||||
INSERT INTO `spell_proc` (`SpellId`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `AttributesMask`, `ProcsPerMinute`, `Chance`, `Cooldown`, `Charges`) VALUES
|
||||
(41350, 0, 0, 0x00000000, 0x00000000, 0x00000000, 0, 0x1, 0x2, 0x0, 0x2, 0, 0, 0, 0);
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry`=23418;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
|
||||
(23418,0,0,'Pain and suffering are all that await you!',14,0,100,0,0,11415,21759,0,'SUFF_SAY_AGRO'),
|
||||
(23418,1,0,'Don\'t leave me alone!',14,0,100,0,0,11416,21760,0,'SUFF_SAY_SLAY'),
|
||||
(23418,1,1,'Look at what you made me do!',14,0,100,0,0,11417,21761,0,'SUFF_SAY_SLAY2'),
|
||||
(23418,1,2,'I didn\'t ask for this!',14,0,100,0,0,11418,21762,0,'SUFF_SAY_SLAY3'),
|
||||
(23418,2,0,'The pain is only beginning...',14,0,100,0,0,11419,21763,0,'SUFF_SAY_ENRAGE'),
|
||||
(23418,3,0,'I don\'t want to go back!',14,0,100,0,0,11420,21764,0,'SUFF_SAY_RECAP'),
|
||||
(23418,4,0,'Now what do I do?',14,0,100,0,0,11421,21765,0,'SUFF_SAY_AFTER'),
|
||||
(23418,5,0,'%s becomes enraged!',41,0,100,0,0,0,24144,0,'SUFF_EMOTE_ENRAGE');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry`=23419;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
|
||||
(23419,0,0,'You can have anything you desire... for a price.',14,0,100,0,0,11408,21752,0,'DESI_SAY_FREED'),
|
||||
(23419,1,0,'Fulfillment is at hand.',14,0,100,0,0,11409,21753,0,'DESI_SAY_SLAY1'),
|
||||
(23419,1,1,'Yes, you\'ll stay with us now...',14,0,100,0,0,11410,21754,0,'DESI_SAY_SLAY2'),
|
||||
(23419,1,2,'Your reach exceeds your grasp.',14,0,100,0,0,11412,21756,0,'DESI_SAY_SLAY3'),
|
||||
(23419,2,0,'Be careful what you wish for.',14,0,100,0,0,11411,21755,0,'DESI_SAY_SPEC'),
|
||||
(23419,3,0,'I won\'t be far!',14,0,100,0,0,11414,21758,0,'DESI_SAY_RECAP'),
|
||||
(23419,4,0,'I\'ll be waiting.',14,0,100,0,0,11413,21757,0,'DESI_SAY_AFTER');
|
||||
|
||||
DELETE FROM `creature_text` WHERE `entry`=23420;
|
||||
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`BroadcastTextId`,`TextRange`,`comment`) VALUES
|
||||
(23420,0,0,'Beware: I live!',14,0,100,0,0,11399,21746,0,'ANGER_SAY_FREED'),
|
||||
(23420,1,0,'So... foolish.',14,0,100,0,0,11400,21747,0,'ANGER_SAY_FREED2'),
|
||||
(23420,2,0,'Enough! No more!',14,0,100,0,0,11402,21748,0,'ANGER_SAY_SEETHE'),
|
||||
(23420,3,0,'%s seethes in anger!',14,0,100,0,0,0,21878,0,'ANGER_EMOTE_SEETHE'),
|
||||
(23420,4,0,'On your knees!',14,0,100,0,0,11403,21749,0,'ANGER_SAY_SPEC'),
|
||||
(23420,5,0,'Beware, coward!',14,0,100,0,0,11405,21751,0,'ANGER_SAY_SPITE'),
|
||||
(23420,6,0,'I won\'t... be... ignored!',14,0,100,0,0,11404,21750,0,'ANGER_SAY_DEATH');
|
||||
@@ -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