feat(Core/WorldState): implement Battle for Sun's Reach Event (#21219)

Co-authored-by: killerwife <killerwife@gmail.com>
Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
Co-authored-by: MantisLord <sabinprosper@gmail.com>
This commit is contained in:
Jelle Meeus
2025-01-31 13:19:12 +01:00
committed by GitHub
parent ca51e7fc22
commit 00b8a3f419
12 changed files with 2353 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
/*
* This file is part of the AzerothCore 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 Affero General Public License as published by the
* Free Software Foundation; either version 3 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 Affero 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 "CreatureScript.h"
#include "WorldState.h"
class npc_suns_reach_reclamation : public CreatureScript
{
public:
npc_suns_reach_reclamation() : CreatureScript("npc_suns_reach_reclamation") { }
bool OnQuestReward(Player* /*player*/, Creature* /*creature*/, const Quest* quest, uint32 /*slot*/) override
{
sWorldState->AddSunsReachProgress(quest->GetQuestId());
return true;
}
};
class npc_sunwell_gate : public CreatureScript
{
public:
npc_sunwell_gate() : CreatureScript("npc_sunwell_gate") { }
bool OnQuestReward(Player* /*player*/, Creature* /*creature*/, const Quest* quest, uint32 /*slot*/) override
{
sWorldState->AddSunwellGateProgress(quest->GetQuestId());
return true;
}
};
void AddSC_suns_reach_reclamation()
{
new npc_suns_reach_reclamation();
new npc_sunwell_gate();
}

View File

@@ -33,6 +33,7 @@ void AddSC_player_scripts();
void AddSC_npc_stave_of_ancients();
void AddSC_server_mail();
void AddSC_transport_zeppelins();
void AddSC_suns_reach_reclamation();
// The name of this function should match:
// void Add${NameOfDirectory}Scripts()
@@ -55,4 +56,5 @@ void AddWorldScripts()
AddSC_npc_stave_of_ancients();
AddSC_server_mail();
AddSC_transport_zeppelins();
AddSC_suns_reach_reclamation();
}