mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 14:17:28 +01:00
Scripts/Zul'Gurub: Fixed Edge of Madness (#29593)
This commit is contained in:
8
sql/updates/world/3.3.5/2024_02_23_02_world.sql
Normal file
8
sql/updates/world/3.3.5/2024_02_23_02_world.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
DELETE FROM `game_event_gameobject` WHERE `guid`=28704;
|
||||
INSERT INTO `game_event_gameobject` (eventEntry, guid) VALUES
|
||||
(27,28704),
|
||||
(28,28704),
|
||||
(29,28704),
|
||||
(30,28704);
|
||||
|
||||
UPDATE `gameobject_template` SET `ScriptName`='go_brazier_of_madness' WHERE `entry`=180327;
|
||||
80
src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
Normal file
80
src/server/scripts/EasternKingdoms/ZulGurub/zulgurub.cpp
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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 "zulgurub.h"
|
||||
#include "GameEventMgr.h"
|
||||
#include "GameObject.h"
|
||||
#include "GameObjectAI.h"
|
||||
|
||||
/*######
|
||||
## go_brazier_of_madness
|
||||
######*/
|
||||
|
||||
enum EventGameIds
|
||||
{
|
||||
// ids from game_event table
|
||||
EVENT_EDGE_OF_MADNESS_GRILEK = 27,
|
||||
EVENT_EDGE_OF_MADNESS_HAZZARAH = 28,
|
||||
EVENT_EDGE_OF_MADNESS_RENATAKI = 29,
|
||||
EVENT_EDGE_OF_MADNESS_WUSHOOLAY = 30
|
||||
};
|
||||
|
||||
using EventPair = std::pair<EventGameIds, ZGCreatureIds>;
|
||||
constexpr EventPair BrazierOfMadnessEventCreatures[] =
|
||||
{
|
||||
{ EVENT_EDGE_OF_MADNESS_GRILEK, NPC_GRILEK },
|
||||
{ EVENT_EDGE_OF_MADNESS_HAZZARAH, NPC_HAZZARAH },
|
||||
{ EVENT_EDGE_OF_MADNESS_RENATAKI, NPC_RENATAKI },
|
||||
{ EVENT_EDGE_OF_MADNESS_WUSHOOLAY, NPC_WUSHOOLAY }
|
||||
};
|
||||
|
||||
Position const MadnessSpawnPos = { -11901.229f, -1906.366f, 65.358f, 0.942f };
|
||||
|
||||
class go_brazier_of_madness : public GameObjectScript
|
||||
{
|
||||
public:
|
||||
go_brazier_of_madness() : GameObjectScript("go_brazier_of_madness") { }
|
||||
|
||||
struct go_brazier_of_madnessAI : public GameObjectAI
|
||||
{
|
||||
go_brazier_of_madnessAI(GameObject* go) : GameObjectAI(go) { }
|
||||
|
||||
bool OnGossipHello(Player* /*player*/) override
|
||||
{
|
||||
for (auto const& [eventId, npcEntry] : BrazierOfMadnessEventCreatures)
|
||||
{
|
||||
if (sGameEventMgr->IsActiveEvent(eventId))
|
||||
{
|
||||
me->SummonCreature(npcEntry, MadnessSpawnPos, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 2s * HOUR * IN_MILLISECONDS);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
GameObjectAI* GetAI(GameObject* go) const override
|
||||
{
|
||||
return new go_brazier_of_madnessAI(go);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_zulgurub()
|
||||
{
|
||||
new go_brazier_of_madness();
|
||||
}
|
||||
@@ -62,7 +62,11 @@ enum ZGCreatureIds
|
||||
NPC_OHGAN = 14988, // Mandokir Event
|
||||
NPC_VILEBRANCH_SPEAKER = 11391, // Mandokir Event
|
||||
NPC_CHAINED_SPIRT = 15117, // Mandokir Event
|
||||
NPC_HAKKAR = 14834
|
||||
NPC_HAKKAR = 14834,
|
||||
NPC_HAZZARAH = 15083, // Brazier of madness
|
||||
NPC_WUSHOOLAY = 15085, // brazier of madness
|
||||
NPC_RENATAKI = 15084, // brazier of madness
|
||||
NPC_GRILEK = 15082 // brazier of madness
|
||||
};
|
||||
|
||||
enum ZGGameObjectIds
|
||||
|
||||
@@ -173,6 +173,7 @@ void AddSC_boss_hazzarah();
|
||||
void AddSC_boss_renataki();
|
||||
void AddSC_boss_wushoolay();
|
||||
void AddSC_instance_zulgurub();
|
||||
void AddSC_zulgurub();
|
||||
//void AddSC_alterac_mountains();
|
||||
//void AddSC_arathi_highlands();
|
||||
void AddSC_blasted_lands();
|
||||
@@ -352,6 +353,7 @@ void AddEasternKingdomsScripts()
|
||||
AddSC_boss_renataki();
|
||||
AddSC_boss_wushoolay();
|
||||
AddSC_instance_zulgurub();
|
||||
AddSC_zulgurub();
|
||||
//AddSC_alterac_mountains();
|
||||
//AddSC_arathi_highlands();
|
||||
AddSC_blasted_lands();
|
||||
|
||||
Reference in New Issue
Block a user