diff --git a/data/sql/updates/pending_db_world/rev_1784088692116509100.sql b/data/sql/updates/pending_db_world/rev_1784088692116509100.sql new file mode 100644 index 000000000..dd3c9caa9 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1784088692116509100.sql @@ -0,0 +1,7 @@ +-- Aerial Command Unit: hover height and flags to match TDB (hover-based chase) +-- 256 = UNIT_FLAG_IMMUNE_TO_PC (cleared by script at phase start), 512 = CREATURE_FLAG_EXTRA_NO_MOVE_FLAGS_UPDATE +UPDATE `creature_template` SET `HoverHeight` = 15, `unit_flags` = `unit_flags`|256, `flags_extra` = `flags_extra`|512 WHERE `entry` IN (33670, 34109); + +-- Values ported from TrinityCore (TrinityCore/TrinityCore@7c13b383); zeroed combat reach +-- made the hovering ACU unreachable for Magnetic Core's 15y check +UPDATE `creature_model_info` SET `BoundingRadius` = 0.31, `CombatReach` = 5 WHERE `DisplayID` = 28979; diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp index 95644214b..54102ba97 100644 --- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp +++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_mimiron.cpp @@ -264,7 +264,8 @@ enum Texts #define GetVX001() instance->GetCreature(DATA_MIMIRON_VX001) #define GetACU() instance->GetCreature(DATA_MIMIRON_ACU) -Position const ACUSummonPos = { 2742.6265f, 2568.0571f, 377.22076f, 0.0f }; /// @todo: replace with sniffed position +// Z is above hover height (15y) so that activating hover does not relocate the ACU upwards +Position const ACUSummonPos = { 2744.650f, 2569.460f, 380.0f, 3.141593f }; struct boss_mimiron : public BossAI { @@ -1513,7 +1514,8 @@ struct npc_ulduar_aerial_command_unit : public ScriptedAI _isDefeated = false; _events.Reset(); _summons.DespawnAll(); - me->SetCombatMovement(false); /// @todo: research ACU behaviour + me->SetHover(false); + me->SetDisableGravity(true); } void SetData(uint32 id, uint32 value) override @@ -1528,7 +1530,12 @@ struct npc_ulduar_aerial_command_unit : public ScriptedAI break; case 3: _phase = 3; + // Hover instead of disabled gravity: chase then keeps the ACU at + // HoverHeight above ground instead of dragging it to ground level. + me->SetDisableGravity(false); + me->SetHover(true); me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + me->SetImmuneToPC(false); DoZoneInCombat(); _events.Reset(); _events.ScheduleEvent(EVENT_SUMMON_BOMB_BOT, 15s); @@ -1560,14 +1567,24 @@ struct npc_ulduar_aerial_command_unit : public ScriptedAI me->CastStop(); me->AttackStop(); me->SetReactState(REACT_PASSIVE); - me->SetDisableGravity(false); + // Raw flag removal first: MoveFall lands at ground + hover height, which would + // keep the ACU airborne, and SetHover(false) would relocate it without a spline. + // SetHover(false) afterwards is relocation-free and tells the client to stop + // hovering, else it keeps floating the grounded unit back up + me->RemoveUnitMovementFlag(MOVEMENTFLAG_HOVER); me->GetMotionMaster()->MoveFall(); + me->SetHover(false); _events.DelayEvents(25s); break; case DO_ENABLE_AERIAL: + if (_isDefeated) + break; me->SetDisableGravity(true); - me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 10.0f); + // 16y: above hover height (15y) so SetHover does not relocate it further up + me->GetMotionMaster()->MovePoint(0, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 16.0f); me->m_Events.AddEventAtOffset([&] { + me->SetDisableGravity(false); + me->SetHover(true); me->SetReactState(REACT_AGGRESSIVE); }, 2s); break; @@ -1599,6 +1616,7 @@ struct npc_ulduar_aerial_command_unit : public ScriptedAI me->InterruptNonMeleeSpells(false); me->RemoveAllAurasExceptType(SPELL_AURA_CONTROL_VEHICLE); + me->SetDisableGravity(true); me->GetMotionMaster()->MovePoint(0, 2744.65f, 2569.46f, 381.34f); if (Creature* c = GetMimiron())