mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
Scripts/Mechanar: Update scripts (#31127)
* Gyro-Kill - missing emote, timers, targets * Iron-Hand - missing emote, timers, targets, one missing spell, update the way texts are handled * Sepethrea - unique enum names, comments for scriptnames, update the way one text is handled * Pathaleon - reorder spells, reorder hooks, implement one missing spell, change the way one spell is used * Instance - remove unneeded placeholder
This commit is contained in:
10
sql/updates/world/3.3.5/2025_07_08_00_world.sql
Normal file
10
sql/updates/world/3.3.5/2025_07_08_00_world.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
--
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 19218 AND `GroupID` = 4;
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 19710 AND `GroupID` = 5;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(19218,4,0,"You hear a faint unlocking sound...",16,0,100,0,0,0,19055,0,"Gatewatcher Gyro-Kill - On Death"),
|
||||
(19710,5,0,"You hear a faint unlocking sound...",16,0,100,0,0,0,19055,0,"Gatewatcher Iron-Hand - On Death");
|
||||
|
||||
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` = 13 AND `SourceEntry` = 35301;
|
||||
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorType`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
|
||||
(13,1,35301,0,0,31,0,3,21062,0,0,0,0,"","Group 0: Spell 'Suicide' (Effect 0) targets creature 'Nether Wraith'");
|
||||
@@ -25,7 +25,8 @@ enum GyroKillTexts
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SLAY = 1,
|
||||
SAY_SAW_BLADES = 2,
|
||||
SAY_DEATH = 3
|
||||
SAY_DEATH = 3,
|
||||
EMOTE_DEATH = 4
|
||||
};
|
||||
|
||||
enum GyroKillSpells
|
||||
@@ -50,7 +51,7 @@ struct boss_gatewatcher_gyrokill : public BossAI
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 10s);
|
||||
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 15s, 25s);
|
||||
events.ScheduleEvent(EVENT_SAW_BLADE, 20s);
|
||||
events.ScheduleEvent(EVENT_SHADOW_POWER, 25s);
|
||||
Talk(SAY_AGGRO);
|
||||
@@ -71,6 +72,7 @@ struct boss_gatewatcher_gyrokill : public BossAI
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
Talk(EMOTE_DEATH);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -88,8 +90,8 @@ struct boss_gatewatcher_gyrokill : public BossAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_STREAM_OF_MACHINE_FLUID:
|
||||
DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID);
|
||||
events.Repeat(13s, 17s);
|
||||
DoCastSelf(SPELL_STREAM_OF_MACHINE_FLUID);
|
||||
events.Repeat(35s, 50s);
|
||||
break;
|
||||
case EVENT_SAW_BLADE:
|
||||
DoCastVictim(SPELL_SAW_BLADE);
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
#include "ScriptMgr.h"
|
||||
#include "mechanar.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellMgr.h"
|
||||
|
||||
enum IronHandTexts
|
||||
{
|
||||
@@ -25,20 +27,22 @@ enum IronHandTexts
|
||||
SAY_HAMMER = 1,
|
||||
SAY_SLAY = 2,
|
||||
SAY_DEATH = 3,
|
||||
EMOTE_HAMMER = 4
|
||||
EMOTE_HAMMER = 4,
|
||||
EMOTE_DEATH = 5
|
||||
};
|
||||
|
||||
enum IronHandSpells
|
||||
{
|
||||
SPELL_SHADOW_POWER = 35322,
|
||||
SPELL_STREAM_OF_MACHINE_FLUID = 35311,
|
||||
SPELL_HAMMER_PUNCH = 35326,
|
||||
SPELL_JACKHAMMER = 35327,
|
||||
SPELL_STREAM_OF_MACHINE_FLUID = 35311
|
||||
SPELL_SHADOW_POWER = 35322
|
||||
};
|
||||
|
||||
enum IronHandEvents
|
||||
{
|
||||
EVENT_STREAM_OF_MACHINE_FLUID = 1,
|
||||
EVENT_STREAM_OF_MACHINE_FLUID = 1,
|
||||
EVENT_HAMMER_PUNCH,
|
||||
EVENT_JACKHAMMER,
|
||||
EVENT_SHADOW_POWER
|
||||
};
|
||||
@@ -51,22 +55,36 @@ struct boss_gatewatcher_iron_hand : public BossAI
|
||||
void JustEngagedWith(Unit* who) override
|
||||
{
|
||||
BossAI::JustEngagedWith(who);
|
||||
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 55s);
|
||||
events.ScheduleEvent(EVENT_JACKHAMMER, 45s);
|
||||
events.ScheduleEvent(EVENT_STREAM_OF_MACHINE_FLUID, 15s, 25s);
|
||||
events.ScheduleEvent(EVENT_HAMMER_PUNCH, 15s, 25s);
|
||||
events.ScheduleEvent(EVENT_JACKHAMMER, 10s, 30s);
|
||||
events.ScheduleEvent(EVENT_SHADOW_POWER, 25s);
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void OnSpellStart(SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == sSpellMgr->GetSpellIdForDifficulty(SPELL_JACKHAMMER, me))
|
||||
Talk(EMOTE_HAMMER);
|
||||
}
|
||||
|
||||
void OnSpellCast(SpellInfo const* spell) override
|
||||
{
|
||||
// Only in normal mode
|
||||
if (spell->Id == SPELL_JACKHAMMER)
|
||||
Talk(SAY_HAMMER);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
if (roll_chance_i(50))
|
||||
Talk(SAY_SLAY);
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
Talk(EMOTE_DEATH);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -84,20 +102,20 @@ struct boss_gatewatcher_iron_hand : public BossAI
|
||||
switch (eventId)
|
||||
{
|
||||
case EVENT_STREAM_OF_MACHINE_FLUID:
|
||||
DoCastVictim(SPELL_STREAM_OF_MACHINE_FLUID);
|
||||
DoCastSelf(SPELL_STREAM_OF_MACHINE_FLUID);
|
||||
events.Repeat(35s, 50s);
|
||||
break;
|
||||
case EVENT_HAMMER_PUNCH:
|
||||
DoCastVictim(SPELL_HAMMER_PUNCH);
|
||||
events.Repeat(25s, 35s);
|
||||
break;
|
||||
case EVENT_JACKHAMMER:
|
||||
Talk(EMOTE_HAMMER);
|
||||
/// @todo expect cast this about 5 times in a row (?), announce it by emote only once
|
||||
DoCastVictim(SPELL_JACKHAMMER);
|
||||
if (roll_chance_i(50))
|
||||
Talk(SAY_HAMMER);
|
||||
DoCastSelf(SPELL_JACKHAMMER);
|
||||
events.Repeat(30s);
|
||||
break;
|
||||
case EVENT_SHADOW_POWER:
|
||||
DoCastSelf(SPELL_SHADOW_POWER);
|
||||
events.Repeat(20s, 28s);
|
||||
events.Repeat(25s, 35s);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
#include "mechanar.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "SpellInfo.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
enum Texts
|
||||
enum SepethreaTexts
|
||||
{
|
||||
SAY_AGGRO = 0,
|
||||
SAY_SUMMON = 1, // Was never used or used under unknown conditions
|
||||
@@ -31,7 +32,7 @@ enum Texts
|
||||
SAY_DEATH = 4
|
||||
};
|
||||
|
||||
enum Spells
|
||||
enum SepethreaSpells
|
||||
{
|
||||
SPELL_FROST_ATTACK = 45196, // This is definitely spell added in TBC but did it replaced both 35264 and 39086 or only normal version?
|
||||
SPELL_SUMMON_RAGING_FLAMES = 35275,
|
||||
@@ -47,12 +48,13 @@ enum Spells
|
||||
SPELL_INFERNO_DAMAGE = 35283
|
||||
};
|
||||
|
||||
enum Events
|
||||
enum SepethreaEvents
|
||||
{
|
||||
EVENT_ARCANE_BLAST = 1,
|
||||
EVENT_DRAGONS_BREATH
|
||||
};
|
||||
|
||||
// 19221 - Nethermancer Sepethrea
|
||||
struct boss_nethermancer_sepethrea : public BossAI
|
||||
{
|
||||
boss_nethermancer_sepethrea(Creature* creature) : BossAI(creature, DATA_NETHERMANCER_SEPRETHREA) { }
|
||||
@@ -72,6 +74,13 @@ struct boss_nethermancer_sepethrea : public BossAI
|
||||
DoCastSelf(SPELL_SUMMON_RAGING_FLAMES);
|
||||
}
|
||||
|
||||
void OnSpellCast(SpellInfo const* spell) override
|
||||
{
|
||||
if (spell->Id == SPELL_DRAGONS_BREATH)
|
||||
if (roll_chance_i(50))
|
||||
Talk(SAY_DRAGONS_BREATH);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* victim) override
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER)
|
||||
@@ -124,8 +133,6 @@ struct boss_nethermancer_sepethrea : public BossAI
|
||||
case EVENT_DRAGONS_BREATH:
|
||||
DoCastSelf(SPELL_DRAGONS_BREATH);
|
||||
events.Repeat(25s, 35s);
|
||||
if (roll_chance_i(50))
|
||||
Talk(SAY_DRAGONS_BREATH);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -139,6 +146,7 @@ struct boss_nethermancer_sepethrea : public BossAI
|
||||
}
|
||||
};
|
||||
|
||||
// 20481 - Raging Flames
|
||||
struct npc_raging_flames : public ScriptedAI
|
||||
{
|
||||
npc_raging_flames(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
@@ -34,14 +34,15 @@ enum PathaleonTexts
|
||||
|
||||
enum PathaleonSpells
|
||||
{
|
||||
SPELL_SUMMON_NETHER_WRAITHS = 35284,
|
||||
SPELL_MANA_TAP = 36021,
|
||||
SPELL_ARCANE_TORRENT = 36022,
|
||||
SPELL_DOMINATION = 35280,
|
||||
SPELL_ARCANE_EXPLOSION_H = 15453,
|
||||
SPELL_FRENZY = 36992,
|
||||
SPELL_SUICIDE = 35301, // NYI
|
||||
|
||||
SPELL_SUMMON_NETHER_WRAITHS = 35284,
|
||||
SPELL_SUICIDE = 35301,
|
||||
SPELL_FRENZY = 36992,
|
||||
|
||||
SPELL_SUMMON_NETHER_WRAITH_LEFT = 35285,
|
||||
SPELL_SUMMON_NETHER_WRAITH_RIGHT = 35286, // Unused
|
||||
SPELL_SUMMON_NETHER_WRAITH_FRONT = 35287,
|
||||
@@ -59,6 +60,7 @@ enum PathaleonEvents
|
||||
EVENT_ARCANE_TORRENT,
|
||||
EVENT_DOMINATION,
|
||||
EVENT_ARCANE_EXPLOSION,
|
||||
EVENT_SUICIDE,
|
||||
EVENT_FRENZY
|
||||
};
|
||||
|
||||
@@ -79,17 +81,6 @@ struct boss_pathaleon_the_calculator : public BossAI
|
||||
Talk(SAY_AGGRO);
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void OnSpellCast(SpellInfo const* spell) override
|
||||
{
|
||||
switch (spell->Id)
|
||||
@@ -111,7 +102,21 @@ struct boss_pathaleon_the_calculator : public BossAI
|
||||
void DamageTaken(Unit* /*attacker*/, uint32& damage, DamageEffectType /*damageType*/, SpellInfo const* /*spellInfo = nullptr*/) override
|
||||
{
|
||||
if (me->HealthBelowPctDamaged(20, damage) && !me->HasAura(SPELL_FRENZY))
|
||||
{
|
||||
events.ScheduleEvent(EVENT_SUICIDE, 0s);
|
||||
events.ScheduleEvent(EVENT_FRENZY, 0s);
|
||||
}
|
||||
}
|
||||
|
||||
void KilledUnit(Unit* /*victim*/) override
|
||||
{
|
||||
Talk(SAY_SLAY);
|
||||
}
|
||||
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
_JustDied();
|
||||
Talk(SAY_DEATH);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
@@ -148,6 +153,9 @@ struct boss_pathaleon_the_calculator : public BossAI
|
||||
DoCastSelf(SPELL_ARCANE_EXPLOSION_H);
|
||||
events.Repeat(10s, 14s);
|
||||
break;
|
||||
case EVENT_SUICIDE:
|
||||
DoCastSelf(SPELL_SUICIDE);
|
||||
break;
|
||||
case EVENT_FRENZY:
|
||||
DoCastSelf(SPELL_FRENZY);
|
||||
break;
|
||||
@@ -163,6 +171,7 @@ struct boss_pathaleon_the_calculator : public BossAI
|
||||
}
|
||||
};
|
||||
|
||||
// 21062 - Nether Wraith
|
||||
struct npc_nether_wraith : public ScriptedAI
|
||||
{
|
||||
npc_nether_wraith(Creature* creature) : ScriptedAI(creature) { }
|
||||
@@ -181,12 +190,11 @@ struct npc_nether_wraith : public ScriptedAI
|
||||
DoCast(target, SPELL_ARCANE_BOLT);
|
||||
task.Repeat(5s, 10s);
|
||||
});
|
||||
}
|
||||
|
||||
_scheduler.Schedule(5s, 10s, [this](TaskContext task)
|
||||
{
|
||||
DoCastSelf(SPELL_NETHER_EXPLOSION);
|
||||
task.Repeat(10s, 15s);
|
||||
});
|
||||
void JustDied(Unit* /*killer*/) override
|
||||
{
|
||||
DoCastSelf(SPELL_NETHER_EXPLOSION);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -40,26 +40,6 @@ class instance_mechanar : public InstanceMapScript
|
||||
SetBossNumber(EncounterCount);
|
||||
LoadDoorData(doorData);
|
||||
}
|
||||
|
||||
bool SetBossState(uint32 type, EncounterState state) override
|
||||
{
|
||||
if (!InstanceScript::SetBossState(type, state))
|
||||
return false;
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case DATA_GATEWATCHER_GYROKILL:
|
||||
case DATA_GATEWATCHER_IRON_HAND:
|
||||
case DATA_MECHANOLORD_CAPACITUS:
|
||||
case DATA_NETHERMANCER_SEPRETHREA:
|
||||
case DATA_PATHALEON_THE_CALCULATOR:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
InstanceScript* GetInstanceScript(InstanceMap* map) const override
|
||||
|
||||
Reference in New Issue
Block a user