mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 01:08:35 +00:00
chore(DB/SAI): Move Halls of Stone Tribunal Event Trash to Smart Scripts (#24228)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE (`entry` IN (27983, 27984, 27985));
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27983);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(27983, 0, 0, 0, 9, 0, 100, 0, 1200, 8000, 15000, 20000, 7, 40, 11, 22120, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Protector - Within 7-40 Range - Cast \'Charge\''),
|
||||
(27983, 0, 1, 0, 0, 0, 100, 0, 6000, 12000, 8000, 16000, 0, 0, 11, 42724, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Protector - In Combat - Cast \'Cleave\'');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27984);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(27984, 0, 0, 0, 0, 0, 100, 2, 3000, 7000, 13000, 20000, 0, 0, 11, 15654, 64, 0, 0, 0, 0, 5, 30, 1, 0, 15654, 0, 0, 0, 0, 'Dark Rune Stormcaller - In Combat - Cast \'Shadow Word: Pain\' (Normal Dungeon)'),
|
||||
(27984, 0, 1, 0, 0, 0, 100, 4, 3000, 7000, 13000, 20000, 0, 0, 11, 59864, 64, 0, 0, 0, 0, 5, 30, 1, 0, 59864, 0, 0, 0, 0, 'Dark Rune Stormcaller - In Combat - Cast \'Shadow Word: Pain\' (Heroic Dungeon)'),
|
||||
(27984, 0, 2, 0, 0, 0, 100, 2, 2000, 4000, 3000, 6000, 0, 0, 11, 12167, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Stormcaller - In Combat - Cast \'Lightning Bolt\' (Normal Dungeon)'),
|
||||
(27984, 0, 3, 0, 0, 0, 100, 4, 2000, 4000, 3000, 6000, 0, 0, 11, 59863, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Dark Rune Stormcaller - In Combat - Cast \'Lightning Bolt\' (Heroic Dungeon)');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 27985);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(27985, 0, 0, 0, 0, 0, 100, 0, 8000, 14000, 13000, 22000, 0, 0, 11, 33661, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Golem Custodian - In Combat - Cast \'Crush Armor\''),
|
||||
(27985, 0, 1, 0, 0, 0, 100, 2, 4000, 7000, 8000, 13000, 0, 0, 11, 12734, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Golem Custodian - In Combat - Cast \'Ground Smash\' (Normal Dungeon)'),
|
||||
(27985, 0, 2, 0, 0, 0, 100, 4, 4000, 7000, 8000, 13000, 0, 0, 11, 59865, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Iron Golem Custodian - In Combat - Cast \'Ground Smash\' (Heroic Dungeon)');
|
||||
@@ -53,17 +53,8 @@ enum Misc
|
||||
SPELL_DARK_MATTER = 51012,
|
||||
SPELL_SEARING_GAZE = 51136,
|
||||
|
||||
// DARK RUNE PROTECTOR
|
||||
SPELL_DRP_CHARGE = 22120,
|
||||
SPELL_DRP_CLEAVE = 42724,
|
||||
|
||||
// DARK RUNE STORMCALLER
|
||||
SPELL_DRS_LIGHTING_BOLT = 12167,
|
||||
SPELL_DRS_SHADOW_WORD_PAIN = 15654,
|
||||
|
||||
// IRON GOLEM CUSTODIAN
|
||||
SPELL_IGC_CRUSH_ARMOR = 33661,
|
||||
SPELL_IGC_GROUND_SMASH = 12734,
|
||||
// Serverside
|
||||
SPELL_TRIBUNAL_CREDIT_MARKER = 59046,
|
||||
|
||||
// QUESTS
|
||||
QUEST_HALLS_OF_STONE = 13207,
|
||||
@@ -85,29 +76,17 @@ enum events
|
||||
EVENT_DARK_MATTER_START = 11,
|
||||
EVENT_DARK_MATTER_END = 12,
|
||||
|
||||
// DARK RUNE PROTECTOR
|
||||
EVENT_DRP_CHARGE = 13,
|
||||
EVENT_DRP_CLEAVE = 14,
|
||||
|
||||
// DARK RUNE STORMCALLER
|
||||
EVENT_DRS_LIGHTNING_BOLD = 15,
|
||||
EVENT_DRS_SHADOW_WORD_PAIN = 16,
|
||||
|
||||
// IRON GOLEM CUSTODIAN
|
||||
EVENT_IGC_CRUSH = 17,
|
||||
EVENT_IGC_GROUND_SMASH = 18,
|
||||
|
||||
EVENT_TRIBUNAL_END = 19,
|
||||
EVENT_BREEN_WAITING = 20,
|
||||
EVENT_TALK_FACE_CHANGE = 21,
|
||||
EVENT_SKY_ROOM_FLOOR_CHANGE = 22,
|
||||
EVENT_TRIBUNAL_END = 13,
|
||||
EVENT_BREEN_WAITING = 14,
|
||||
EVENT_TALK_FACE_CHANGE = 15,
|
||||
EVENT_SKY_ROOM_FLOOR_CHANGE = 16,
|
||||
|
||||
//BRANN AND SJONNIR
|
||||
EVENT_GO_TO_SJONNIR = 23,
|
||||
EVENT_DOOR_OPEN = 24,
|
||||
EVENT_RESUME_ESCORT = 25,
|
||||
EVENT_SJONNIR_END_BRANN_YELL = 26,
|
||||
EVENT_SJONNIR_END_BRANN_LAST_YELL = 27,
|
||||
EVENT_GO_TO_SJONNIR = 17,
|
||||
EVENT_DOOR_OPEN = 18,
|
||||
EVENT_RESUME_ESCORT = 19,
|
||||
EVENT_SJONNIR_END_BRANN_YELL = 20,
|
||||
EVENT_SJONNIR_END_BRANN_LAST_YELL = 21,
|
||||
};
|
||||
|
||||
struct Yells
|
||||
@@ -661,7 +640,7 @@ public:
|
||||
{
|
||||
pInstance->SetData(BOSS_TRIBUNAL_OF_AGES, DONE);
|
||||
pInstance->SetData(BRANN_BRONZEBEARD, 3);
|
||||
me->CastSpell(me, 59046, true); // credit
|
||||
me->CastSpell(me, SPELL_TRIBUNAL_CREDIT_MARKER, true); // credit
|
||||
}
|
||||
|
||||
me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STAND);
|
||||
@@ -774,7 +753,7 @@ public:
|
||||
if (cr)
|
||||
{
|
||||
cr->AI()->AttackStart(me);
|
||||
cr->AddThreat(me, 100.0f);
|
||||
cr->AddThreat(me, 0.0f);
|
||||
cr->SetInCombatWithZone();
|
||||
}
|
||||
}
|
||||
@@ -932,173 +911,6 @@ void brann_bronzebeard::brann_bronzebeardAI::WaypointReached(uint32 id)
|
||||
}
|
||||
}
|
||||
|
||||
class dark_rune_protectors : public CreatureScript
|
||||
{
|
||||
public:
|
||||
dark_rune_protectors() : CreatureScript("dark_rune_protectors") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new dark_rune_protectorsAI (creature);
|
||||
}
|
||||
|
||||
struct dark_rune_protectorsAI : public ScriptedAI
|
||||
{
|
||||
dark_rune_protectorsAI(Creature* c) : ScriptedAI(c) { }
|
||||
|
||||
EventMap events;
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit*) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_DRP_CLEAVE, 7s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_DRP_CLEAVE:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_DRP_CLEAVE, false);
|
||||
events.Repeat(7s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (Unit* victim = me->GetVictim())
|
||||
{
|
||||
if (!me->IsWithinMeleeRange(victim) && !me->HasUnitState(UNIT_STATE_CHARGING))
|
||||
{
|
||||
me->CastSpell(victim, SPELL_DRP_CHARGE, false);
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class dark_rune_stormcaller : public CreatureScript
|
||||
{
|
||||
public:
|
||||
dark_rune_stormcaller() : CreatureScript("dark_rune_stormcaller") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new dark_rune_stormcallerAI (creature);
|
||||
}
|
||||
|
||||
struct dark_rune_stormcallerAI : public ScriptedAI
|
||||
{
|
||||
dark_rune_stormcallerAI(Creature* c) : ScriptedAI(c) { }
|
||||
|
||||
EventMap events;
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit*) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_DRS_LIGHTNING_BOLD, 5s);
|
||||
events.ScheduleEvent(EVENT_DRS_SHADOW_WORD_PAIN, 12s);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_DRS_LIGHTNING_BOLD:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_DRS_LIGHTING_BOLT, false);
|
||||
events.Repeat(5s);
|
||||
break;
|
||||
}
|
||||
case EVENT_DRS_SHADOW_WORD_PAIN:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_DRS_SHADOW_WORD_PAIN, false);
|
||||
events.Repeat(12s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class iron_golem_custodian : public CreatureScript
|
||||
{
|
||||
public:
|
||||
iron_golem_custodian() : CreatureScript("iron_golem_custodian") { }
|
||||
|
||||
CreatureAI* GetAI(Creature* creature) const override
|
||||
{
|
||||
return new iron_golem_custodianAI (creature);
|
||||
}
|
||||
|
||||
struct iron_golem_custodianAI : public ScriptedAI
|
||||
{
|
||||
iron_golem_custodianAI(Creature* c) : ScriptedAI(c) { }
|
||||
EventMap events;
|
||||
void Reset() override
|
||||
{
|
||||
events.Reset();
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit*) override
|
||||
{
|
||||
events.ScheduleEvent(EVENT_IGC_CRUSH, 6s);
|
||||
events.ScheduleEvent(EVENT_IGC_GROUND_SMASH, 20s);
|
||||
}
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
events.Update(diff);
|
||||
if (me->HasUnitState(UNIT_STATE_CASTING))
|
||||
return;
|
||||
|
||||
switch (events.ExecuteEvent())
|
||||
{
|
||||
case EVENT_IGC_CRUSH:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_IGC_CRUSH_ARMOR, false);
|
||||
events.Repeat(6s);
|
||||
break;
|
||||
}
|
||||
case EVENT_IGC_GROUND_SMASH:
|
||||
{
|
||||
me->CastSpell(me->GetVictim(), SPELL_IGC_GROUND_SMASH, false);
|
||||
events.Repeat(20s, 40s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
class spell_hos_dark_matter : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_hos_dark_matter);
|
||||
@@ -1139,9 +951,6 @@ class spell_hos_dark_matter_size : public SpellScript
|
||||
void AddSC_brann_bronzebeard()
|
||||
{
|
||||
new brann_bronzebeard();
|
||||
new dark_rune_protectors();
|
||||
new dark_rune_stormcaller();
|
||||
new iron_golem_custodian();
|
||||
RegisterSpellScript(spell_hos_dark_matter);
|
||||
RegisterSpellScript(spell_hos_dark_matter_size);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user