Scripts/Arenas: Implement Ashamane's Fall (#31410)

This commit is contained in:
Jeremy
2025-10-31 09:55:02 +01:00
committed by GitHub
parent 29254bc9bb
commit 39d8f96fdf
3 changed files with 617 additions and 0 deletions

View File

@@ -0,0 +1,74 @@
/*
* 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 "Battleground.h"
#include "BattlegroundScript.h"
#include "GameObject.h"
#include "Map.h"
#include "ScriptMgr.h"
namespace AshamanesFall
{
namespace MapIds
{
static constexpr uint32 AshamanesFall = 1552;
}
namespace GameObjects
{
static constexpr uint32 Roots01 = 250430;
static constexpr uint32 Roots02 = 250431;
}
}
struct arena_ashamanes_fall : ArenaScript
{
explicit arena_ashamanes_fall(BattlegroundMap* map) : ArenaScript(map) { }
void OnStart() override
{
for (ObjectGuid const& guid : _doorGUIDs)
{
if (GameObject* door = battlegroundMap->GetGameObject(guid))
{
door->UseDoorOrButton();
door->DespawnOrUnsummon(5s);
}
}
}
void OnGameObjectCreate(GameObject* gameobject) override
{
switch (gameobject->GetEntry())
{
case AshamanesFall::GameObjects::Roots01:
case AshamanesFall::GameObjects::Roots02:
_doorGUIDs.emplace_back(gameobject->GetGUID());
break;
default:
break;
}
}
private:
GuidVector _doorGUIDs;
};
void AddSC_arena_ashamanes_fall()
{
RegisterBattlegroundMapScript(arena_ashamanes_fall, AshamanesFall::MapIds::AshamanesFall);
}

View File

@@ -65,6 +65,7 @@ void AddSC_battleground_deephaul_ravine();
void AddSC_arena_blades_edge_legion();
void AddSC_arena_nagrand_arena_legion();
void AddSC_arena_ashamanes_fall();
void AddSC_arena_mugambala();
void AddSC_arena_hook_point();
@@ -127,6 +128,7 @@ void AddBattlegroundsScripts()
AddSC_arena_blades_edge_legion();
AddSC_arena_nagrand_arena_legion();
AddSC_arena_ashamanes_fall();
AddSC_arena_mugambala();
AddSC_arena_hook_point();