mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 08:55:32 +01:00
Scripts/Ulduar: Mimiron improvements
Closes #23043 Fix Aerial hover Some visual issues
This commit is contained in:
7
sql/updates/world/3.3.5/2019_02_25_00_world.sql
Normal file
7
sql/updates/world/3.3.5/2019_02_25_00_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
UPDATE creature_template SET `flags_extra`=512 WHERE entry IN(33670,34109);
|
||||
UPDATE `creature_template` SET `AIName`='PassiveAI' WHERE `entry`=34071;
|
||||
UPDATE `creature_template` SET `unit_flags`=33555200, `ScriptName`='npc_mimiron_magnetic_core' WHERE `entry`=34068;
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_mimiron_magnetic_core_summon';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(64444,'spell_mimiron_magnetic_core_summon');
|
||||
@@ -325,7 +325,8 @@ enum Waypoints
|
||||
|
||||
enum SeatIds : int8
|
||||
{
|
||||
ROCKET_SEAT_LEFT = 5,
|
||||
MKII_SEAT_CANNON = 3,
|
||||
ROCKET_SEAT_LEFT = 5,
|
||||
ROCKET_SEAT_RIGHT = 6
|
||||
};
|
||||
|
||||
@@ -346,7 +347,7 @@ Position const VehicleRelocation[] =
|
||||
{ 2763.820f, 2568.870f, 364.3136f }, // WP_MKII_P4_POS_3
|
||||
{ 2761.215f, 2568.875f, 364.0636f }, // WP_MKII_P4_POS_4
|
||||
{ 2744.610f, 2569.380f, 364.3136f }, // WP_MKII_P4_POS_5
|
||||
{ 2748.513f, 2569.051f, 364.3136f } // WP_AERIAL_P4_POS
|
||||
{ 2744.62f, 2569.41f, 382.0f, 3.054326f } // WP_AERIAL_P4_POS
|
||||
};
|
||||
|
||||
Position const VX001SummonPos = { 2744.431f, 2569.385f, 364.3968f, 3.141593f };
|
||||
@@ -456,6 +457,9 @@ class boss_mimiron : public CreatureScript
|
||||
if (instance->GetBossState(BOSS_MIMIRON) == DONE) // Mimiron will attempt to reset because he is not dead and will be set to friendly before despawning.
|
||||
return;
|
||||
|
||||
if (Creature* aerial = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AERIAL_COMMAND_UNIT)))
|
||||
aerial->AI()->EnterEvadeMode();
|
||||
|
||||
_Reset();
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
|
||||
@@ -613,7 +617,6 @@ class boss_mimiron : public CreatureScript
|
||||
{
|
||||
if (Creature* aerial = ObjectAccessor::GetCreature(*me, instance->GetGuidData(DATA_AERIAL_COMMAND_UNIT)))
|
||||
{
|
||||
aerial->GetMotionMaster()->MoveLand(0, (aerial->GetPositionX(), aerial->GetPositionY(), aerial->GetPositionZ()));
|
||||
aerial->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, 0);
|
||||
aerial->CastSpell(vx001, SPELL_MOUNT_VX_001);
|
||||
aerial->CastSpell(aerial, SPELL_HALF_HEAL);
|
||||
@@ -706,7 +709,7 @@ class boss_leviathan_mk_ii : public CreatureScript
|
||||
if (events.IsInPhase(PHASE_LEVIATHAN_MK_II))
|
||||
{
|
||||
me->CastStop();
|
||||
if (Unit* turret = me->GetVehicleKit()->GetPassenger(3))
|
||||
if (Unit* turret = me->GetVehicleKit()->GetPassenger(MKII_SEAT_CANNON))
|
||||
turret->KillSelf();
|
||||
|
||||
me->SetSpeedRate(MOVE_RUN, 1.5f);
|
||||
@@ -1117,6 +1120,7 @@ class boss_aerial_command_unit : public CreatureScript
|
||||
boss_aerial_command_unitAI(Creature* creature) : BossAI(creature, BOSS_MIMIRON)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetDisableGravity(true);
|
||||
fireFigther = false;
|
||||
}
|
||||
|
||||
@@ -1125,11 +1129,13 @@ class boss_aerial_command_unit : public CreatureScript
|
||||
if (damage >= me->GetHealth())
|
||||
{
|
||||
damage = me->GetHealth() - 1; // Let creature fall to 1 hp, but do not let it die or damage itself with SetHealth().
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
me->AttackStop();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCast(me, SPELL_VEHICLE_DAMAGED, true);
|
||||
me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE, SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT);
|
||||
me->AttackStop();
|
||||
me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_HOVER | UNIT_BYTE1_FLAG_ALWAYS_STAND);
|
||||
me->SetHover(false);
|
||||
me->SetDisableGravity(true);
|
||||
|
||||
DoCastSelf(SPELL_VEHICLE_DAMAGED, true);
|
||||
|
||||
if (events.IsInPhase(PHASE_AERIAL_COMMAND_UNIT))
|
||||
{
|
||||
@@ -1161,11 +1167,12 @@ class boss_aerial_command_unit : public CreatureScript
|
||||
events.ScheduleEvent(EVENT_SUMMON_FIRE_BOTS, 1s, 0, PHASE_AERIAL_COMMAND_UNIT);
|
||||
// Missing break intended.
|
||||
case DO_START_AERIAL:
|
||||
me->SetByteValue(UNIT_FIELD_BYTES_1, UNIT_BYTES_1_OFFSET_ANIM_TIER, UNIT_BYTE1_FLAG_HOVER);
|
||||
me->SetDisableGravity(false);
|
||||
me->SetHover(true);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetImmuneToPC(false);
|
||||
me->SetReactState(REACT_AGGRESSIVE);
|
||||
me->SetHover(true);
|
||||
me->SetDisableGravity(false);
|
||||
|
||||
events.SetPhase(PHASE_AERIAL_COMMAND_UNIT);
|
||||
events.ScheduleEvent(EVENT_SUMMON_JUNK_BOT, 5s, 0, PHASE_AERIAL_COMMAND_UNIT);
|
||||
@@ -1174,8 +1181,8 @@ class boss_aerial_command_unit : public CreatureScript
|
||||
break;
|
||||
case DO_DISABLE_AERIAL:
|
||||
me->CastStop();
|
||||
me->AttackStop();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->AttackStop();
|
||||
me->GetMotionMaster()->MoveFall();
|
||||
events.DelayEvents(23000);
|
||||
break;
|
||||
@@ -1216,7 +1223,9 @@ class boss_aerial_command_unit : public CreatureScript
|
||||
{
|
||||
if (type == POINT_MOTION_TYPE && point == WP_AERIAL_P4_POS)
|
||||
{
|
||||
me->SetFacingTo(VehicleRelocation[WP_AERIAL_P4_POS].GetOrientation());
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
DoCastSelf(SPELL_CLEAR_ALL_DEBUFFS);
|
||||
|
||||
if (Creature* mimiron = instance->GetCreature(BOSS_MIMIRON))
|
||||
mimiron->AI()->DoAction(DO_ACTIVATE_V0L7R0N_1);
|
||||
@@ -1410,6 +1419,7 @@ class npc_mimiron_computer : public CreatureScript
|
||||
npc_mimiron_computerAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = me->GetInstanceScript();
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
}
|
||||
|
||||
void DoAction(int32 action) override
|
||||
@@ -1650,6 +1660,17 @@ class npc_mimiron_proximity_mine : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_mimiron_magnetic_core : public ScriptedAI
|
||||
{
|
||||
npc_mimiron_magnetic_core(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCastAOE(SPELL_MAGNETIC_CORE, true);
|
||||
}
|
||||
};
|
||||
|
||||
class go_mimiron_hardmode_button : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
@@ -1853,6 +1874,26 @@ class spell_mimiron_fire_search : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
// 64444 - Magnetic Core Summon
|
||||
class spell_mimiron_magnetic_core_summon : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mimiron_magnetic_core_summon);
|
||||
|
||||
void ModDest(SpellDestination& dest)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
Position pos = caster->GetPosition();
|
||||
float z = caster->GetMap()->GetHeight(pos);
|
||||
pos.m_positionZ = z;
|
||||
dest.Relocate(pos);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_mimiron_magnetic_core_summon::ModDest, EFFECT_0, TARGET_DEST_NEARBY_ENTRY);
|
||||
}
|
||||
};
|
||||
|
||||
// 64436 - Magnetic Core
|
||||
class spell_mimiron_magnetic_core : public SpellScriptLoader
|
||||
{
|
||||
@@ -2804,6 +2845,7 @@ void AddSC_boss_mimiron()
|
||||
new npc_mimiron_flames();
|
||||
new npc_mimiron_frost_bomb();
|
||||
new npc_mimiron_proximity_mine();
|
||||
RegisterUlduarCreatureAI(npc_mimiron_magnetic_core);
|
||||
|
||||
new go_mimiron_hardmode_button();
|
||||
|
||||
@@ -2811,6 +2853,7 @@ void AddSC_boss_mimiron()
|
||||
new spell_mimiron_clear_fires();
|
||||
new spell_mimiron_despawn_assault_bots();
|
||||
new spell_mimiron_fire_search();
|
||||
RegisterSpellScript(spell_mimiron_magnetic_core_summon);
|
||||
new spell_mimiron_magnetic_core();
|
||||
new spell_mimiron_napalm_shell();
|
||||
new spell_mimiron_p3wx2_laser_barrage();
|
||||
|
||||
Reference in New Issue
Block a user