diff --git a/sql/updates/world/4.3.4/2022_12_31_00_world.sql b/sql/updates/world/4.3.4/2022_12_31_00_world.sql new file mode 100644 index 0000000000..6ba456756e --- /dev/null +++ b/sql/updates/world/4.3.4/2022_12_31_00_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `areatrigger_scripts` WHERE `ScriptName`= 'at_sb_razorfen_kraul_entrance'; +INSERT INTO `areatrigger_scripts` (`entry`, `ScriptName`) VALUES +(6348, 'at_sb_razorfen_kraul_entrance'); diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index ea6d62155c..0dc9a77383 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -146,6 +146,7 @@ void AddSC_mulgore(); void AddSC_silithus(); void AddSC_tanaris(); void AddSC_northern_barrens(); +void AddSC_southern_barrens(); void AddSC_thunder_bluff(); void AddSC_ungoro_crater(); void AddSC_winterspring(); @@ -285,6 +286,7 @@ void AddKalimdorScripts() AddSC_silithus(); AddSC_tanaris(); AddSC_northern_barrens(); + AddSC_southern_barrens(); AddSC_thunder_bluff(); AddSC_ungoro_crater(); AddSC_winterspring(); diff --git a/src/server/scripts/Kalimdor/zone_southern_barrens.cpp b/src/server/scripts/Kalimdor/zone_southern_barrens.cpp new file mode 100644 index 0000000000..aa411aa618 --- /dev/null +++ b/src/server/scripts/Kalimdor/zone_southern_barrens.cpp @@ -0,0 +1,50 @@ +/* + * 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 . + */ + +#include "ScriptMgr.h" +#include "DBCStores.h" +#include "Player.h" + +enum RazorfenKraulEntrance +{ + AREA_ID_RAZORFEN_KRAUL = 1717, + AREA_ID_RAZORFEN_KRAUL_ENTRANCE = 5518 +}; + +/* +* Looks like Blizzard realized that they have fucked up because they used an instance WMO object for the open world entrance +* of Razorfen Kraul. So they instead placed an area trigger in front of the instance to trigger the exploration part because +* that instance WMO object does return instance interior data rather than what we need. +*/ +class at_sb_razorfen_kraul_entrance : public AreaTriggerScript +{ +public: + at_sb_razorfen_kraul_entrance() : AreaTriggerScript("at_sb_razorfen_kraul_entrance") { } + + bool OnTrigger(Player* player, AreaTriggerEntry const* /*areaTrigger*/) + { + // Yep, one is for the message and experience, one for the exploration bit for the achievement + player->SetAreaExplored(AREA_ID_RAZORFEN_KRAUL); + player->SetAreaExplored(AREA_ID_RAZORFEN_KRAUL_ENTRANCE); + return true; + } +}; + +void AddSC_southern_barrens() +{ + new at_sb_razorfen_kraul_entrance(); +}