diff options
| author | Naddley <64811442+Naddley@users.noreply.github.com> | 2025-07-12 22:14:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-12 22:14:56 +0200 |
| commit | cd3dd59b530111898d443453426673ff98feca99 (patch) | |
| tree | 3681e1bf2ac6b3ddb61b170dd3c99a09d2832061 /src/server/scripts/BrokenIsles/Orderhalls | |
| parent | 52add56a7ffdb4e8152a46869ab48d946b27f417 (diff) | |
Scripts/DalaranLegion: Implement Quest "Call of the Uncrowned" (#31126)
Diffstat (limited to 'src/server/scripts/BrokenIsles/Orderhalls')
| -rw-r--r-- | src/server/scripts/BrokenIsles/Orderhalls/zone_orderhall_rogue.cpp | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/server/scripts/BrokenIsles/Orderhalls/zone_orderhall_rogue.cpp b/src/server/scripts/BrokenIsles/Orderhalls/zone_orderhall_rogue.cpp new file mode 100644 index 00000000000..f748e32dac1 --- /dev/null +++ b/src/server/scripts/BrokenIsles/Orderhalls/zone_orderhall_rogue.cpp @@ -0,0 +1,57 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptMgr.h" +#include "AreaTrigger.h" +#include "AreaTriggerAI.h" +#include "ObjectAccessor.h" +#include "ScriptedCreature.h" +#include "Player.h" + +enum CallOfTheUncrownedATData +{ + QUEST_CALL_OF_THE_UNCROWNED = 40832, + + NPC_MILTON_BEATS_ORDERHALL = 105908 +}; + +// XXX - Areatrigger +struct at_hall_of_shadows_call_of_the_uncrowned_clone_milton : AreaTriggerAI +{ + at_hall_of_shadows_call_of_the_uncrowned_clone_milton(AreaTrigger* areatrigger) : AreaTriggerAI(areatrigger) {} + + void OnUnitEnter(Unit* unit) override + { + Player* player = unit->ToPlayer(); + if (!player || player->GetQuestStatus(QUEST_CALL_OF_THE_UNCROWNED) != QUEST_STATUS_INCOMPLETE) + return; + + Creature* miltonObject = GetClosestCreatureWithOptions(player, 30.0f, { .CreatureId = NPC_MILTON_BEATS_ORDERHALL, .IgnorePhases = true }); + if (!miltonObject) + return; + + TempSummon* miltonClone = miltonObject->SummonPersonalClone(miltonObject->GetPosition(), TEMPSUMMON_MANUAL_DESPAWN, 0s, 0, 0, player); + if (!miltonClone) + return; + } +}; + +void AddSC_orderhall_rogue() +{ + // Areatrigger + RegisterAreaTriggerAI(at_hall_of_shadows_call_of_the_uncrowned_clone_milton); +} |
