diff --git a/data/sql/updates/pending_db_world/rev_1758977613173748600.sql b/data/sql/updates/pending_db_world/rev_1758977613173748600.sql new file mode 100644 index 000000000..a63f432ef --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1758977613173748600.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `areatrigger_scripts` WHERE `entry` = 4991; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES (4991, 'SmartTrigger'); + +DELETE FROM `smart_scripts` WHERE (`entryorguid` = 4991) AND (`source_type` = 2) AND (`id` IN (0)); +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 +(4991, 2, 0, 0, 46, 0, 100, 0, 4991, 0, 0, 0, 0, 0, 223, 1, 0, 0, 0, 0, 0, 205, 2, 1, 0, 0, 0, 0, 0, 0, 'Areatrigger - On Trigger - Do Action ID 1'); + +UPDATE `creature_template` SET `unit_flags` = `unit_flags`|64|256, `flags_extra` = `flags_extra`|2147483648 WHERE `entry` IN (26693, 30807); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp index c67253561..cf6318747 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/boss_skadi.cpp @@ -143,10 +143,7 @@ public: SecondPhase = false; EventStarted = false; - me->RemoveAllAuras(); - me->SetControlled(false, UNIT_STATE_ROOT); - me->UpdatePosition(343.02f, -507.325f, 104.567f, M_PI, true); - me->StopMovingOnCurrentPos(); + me->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); if (m_pInstance) { @@ -160,29 +157,28 @@ public: Creature* GetGrauf() { return ObjectAccessor::GetCreature(*me, GraufGUID); } - void JustEngagedWith(Unit* /*pWho*/) override - { - if (!EventStarted) - { - EventStarted = true; - Talk(SAY_AGGRO); - if (m_pInstance) - { - if (IsHeroic()) - m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_LODI_DODI); - - m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS); - } - - me->SetControlled(true, UNIT_STATE_ROOT); - me->SetInCombatWithZone(); - events.RescheduleEvent(EVENT_SKADI_START, 2s); - } - } - void DoAction(int32 param) override { - if (param == ACTION_PHASE2) + if (param == ACTION_START_EVENT) + { + if (!EventStarted) + { + EventStarted = true; + Talk(SAY_AGGRO); + if (m_pInstance) + { + if (IsHeroic()) + m_pInstance->DoStartTimedAchievement(ACHIEVEMENT_TIMED_TYPE_EVENT, ACHIEV_TIMED_LODI_DODI); + + m_pInstance->SetData(DATA_SKADI_THE_RUTHLESS, IN_PROGRESS); + } + + me->SetControlled(true, UNIT_STATE_ROOT); + me->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); + events.RescheduleEvent(EVENT_SKADI_START, 2s); + } + } + else if (param == ACTION_PHASE2) { SecondPhase = true; events.ScheduleEvent(EVENT_SKADI_CRUSH, 8s); @@ -190,7 +186,7 @@ public: events.ScheduleEvent(EVENT_SKADI_WHIRLWIND, 15s); if (me->GetVictim()) - me->GetMotionMaster()->MoveChase(me->GetVictim()); + me->ResumeChasingVictim(); else me->SetInCombatWithZone(); } @@ -415,7 +411,7 @@ public: Map::PlayerList const& pList = me->GetMap()->GetPlayers(); for(Map::PlayerList::const_iterator itr = pList.begin(); itr != pList.end(); ++itr) { - if (itr->GetSource()->GetPositionX() < 320.0f || itr->GetSource()->IsGameMaster() || !itr->GetSource()->IsAlive()) + if (itr->GetSource()->GetPositionY() > -490.0f || itr->GetSource()->IsGameMaster() || !itr->GetSource()->IsAlive()) continue; return; @@ -456,7 +452,7 @@ public: SpawnHelpers(0); SpawnHelpers(0); - events.ScheduleEvent(EVENT_GRAUF_MOVE, 15s); + events.ScheduleEvent(EVENT_GRAUF_MOVE, 5s); events.ScheduleEvent(EVENT_GRAUF_SUMMON_HELPERS, 20s); break; } diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp index 5a36f5e84..47588a7bf 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardePinnacle/instance_utgarde_pinnacle.cpp @@ -20,6 +20,12 @@ #include "ScriptedCreature.h" #include "utgarde_pinnacle.h" +ObjectData const creatureData[] = +{ + { NPC_SKADI_THE_RUTHLESS, DATA_SKADI_THE_RUTHLESS }, + { 0, 0 } +}; + class instance_utgarde_pinnacle : public InstanceMapScript { public: @@ -36,7 +42,6 @@ public: ObjectGuid SvalaSorrowgrave; ObjectGuid GortokPalehoof; - ObjectGuid SkadiRuthless; ObjectGuid KingYmiron; ObjectGuid FrenziedWorgen; ObjectGuid RavenousFurbolg; @@ -59,6 +64,7 @@ public: void Initialize() override { SetHeaders(DataHeader); + LoadObjectData(creatureData, nullptr); SkadiHits = 0; SkadiInRange = 0; @@ -88,9 +94,6 @@ public: case NPC_GORTOK_PALEHOOF: GortokPalehoof = pCreature->GetGUID(); break; - case NPC_SKADI_THE_RUTHLESS: - SkadiRuthless = pCreature->GetGUID(); - break; case NPC_KING_YMIRON: KingYmiron = pCreature->GetGUID(); break; @@ -110,6 +113,8 @@ public: Grauf = pCreature->GetGUID(); break; } + + InstanceScript::OnCreatureCreate(pCreature); } void OnGameObjectCreate(GameObject* pGo) override @@ -238,8 +243,6 @@ public: return SvalaSorrowgrave; case DATA_GORTOK_PALEHOOF: return GortokPalehoof; - case DATA_SKADI_THE_RUTHLESS: - return SkadiRuthless; case DATA_KING_YMIRON: return KingYmiron; case DATA_NPC_FRENZIED_WORGEN: