refactor(Core): Add definition file for area table entries. (#22054)

This commit is contained in:
Benjamin Jackson
2025-05-09 09:48:02 -04:00
committed by GitHub
parent db62fe8310
commit 52799d76f6
146 changed files with 866 additions and 656 deletions

View File

@@ -22,7 +22,7 @@
class instance_blackfathom_deeps : public InstanceMapScript
{
public:
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", 48) { }
instance_blackfathom_deeps() : InstanceMapScript("instance_blackfathom_deeps", MAP_BLACKFATHOM_DEEPS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -139,8 +139,6 @@ enum HyjalMisc
CONTEXT_GROUP_WAVES = 1,
AREA_NORDRASSIL = 3710,
SPELL_ETERNAL_SILENCE = 42201,
GUID_GAIN_SOUL_CHARGE_PLAYER = 1

View File

@@ -15,6 +15,7 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AreaDefines.h"
#include "Chat.h"
#include "InstanceMapScript.h"
#include "InstanceScript.h"
@@ -72,7 +73,7 @@ Milliseconds hyjalNightElfWaveTimers[1][MAX_WAVES_NIGHT_ELF]
class instance_hyjal : public InstanceMapScript
{
public:
instance_hyjal() : InstanceMapScript("instance_hyjal", 534) { }
instance_hyjal() : InstanceMapScript("instance_hyjal", MAP_THE_BATTLE_FOR_MOUNT_HYJAL) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -29,7 +29,7 @@
class instance_culling_of_stratholme : public InstanceMapScript
{
public:
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", 595) { }
instance_culling_of_stratholme() : InstanceMapScript("instance_culling_of_stratholme", MAP_THE_CULLING_OF_STRATHOLME) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{

View File

@@ -41,7 +41,7 @@ const Position thrallPositions[THRALL_POSITIONS_COUNT] =
class instance_old_hillsbrad : public InstanceMapScript
{
public:
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", 560) { }
instance_old_hillsbrad() : InstanceMapScript("instance_old_hillsbrad", MAP_THE_ESCAPE_FROM_DURNHOLDE) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -38,7 +38,7 @@ ObjectData const creatureData[] =
class instance_the_black_morass : public InstanceMapScript
{
public:
instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", 269) { }
instance_the_black_morass() : InstanceMapScript("instance_the_black_morass", MAP_OPENING_OF_THE_DARK_PORTAL) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -23,7 +23,7 @@
class instance_dire_maul : public InstanceMapScript
{
public:
instance_dire_maul() : InstanceMapScript(DMScriptName, 429) { }
instance_dire_maul() : InstanceMapScript(DMScriptName, MAP_DIRE_MAUL) { }
struct instance_dire_maul_InstanceMapScript : public InstanceScript
{

View File

@@ -22,7 +22,7 @@
class instance_maraudon : public InstanceMapScript
{
public:
instance_maraudon() : InstanceMapScript("instance_maraudon", 349) { }
instance_maraudon() : InstanceMapScript("instance_maraudon", MAP_MARAUDON) { }
struct instance_maraudon_InstanceMapScript : public InstanceScript
{

View File

@@ -28,7 +28,7 @@ ObjectData const creatureData[] =
class instance_onyxias_lair : public InstanceMapScript
{
public:
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", 249) { }
instance_onyxias_lair() : InstanceMapScript("instance_onyxias_lair", MAP_ONYXIAS_LAIR) { }
InstanceScript* GetInstanceScript(InstanceMap* pMap) const override
{

View File

@@ -21,7 +21,7 @@
class instance_ragefire_chasm : public InstanceMapScript
{
public:
instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", 389) { }
instance_ragefire_chasm() : InstanceMapScript("instance_ragefire_chasm", MAP_RAGEFIRE_CHASM) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -23,7 +23,7 @@
class instance_razorfen_downs : public InstanceMapScript
{
public:
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", 129) { }
instance_razorfen_downs() : InstanceMapScript("instance_razorfen_downs", MAP_RAZORFEN_DOWNS) { }
struct instance_razorfen_downs_InstanceMapScript : public InstanceScript
{

View File

@@ -21,7 +21,7 @@
class instance_razorfen_kraul : public InstanceMapScript
{
public:
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", 47) { }
instance_razorfen_kraul() : InstanceMapScript("instance_razorfen_kraul", MAP_RAZORFEN_KRAUL) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -67,7 +67,7 @@ std::array<uint32, 8> RajaxxWavesData[] =
class instance_ruins_of_ahnqiraj : public InstanceMapScript
{
public:
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", 509) { }
instance_ruins_of_ahnqiraj() : InstanceMapScript("instance_ruins_of_ahnqiraj", MAP_RUINS_OF_AHN_QIRAJ) { }
struct instance_ruins_of_ahnqiraj_InstanceMapScript : public InstanceScript
{

View File

@@ -50,7 +50,7 @@ DoorData const doorData[] =
class instance_temple_of_ahnqiraj : public InstanceMapScript
{
public:
instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", 531) { }
instance_temple_of_ahnqiraj() : InstanceMapScript("instance_temple_of_ahnqiraj", MAP_AHN_QIRAJ_TEMPLE) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -22,7 +22,7 @@
class instance_wailing_caverns : public InstanceMapScript
{
public:
instance_wailing_caverns() : InstanceMapScript("instance_wailing_caverns", 43) { }
instance_wailing_caverns() : InstanceMapScript("instance_wailing_caverns", MAP_WAILING_CAVERNS) { }
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -106,7 +106,7 @@ static PyramidEventData pyramidSpawns[pyramidSpawnTotal] =
class instance_zulfarrak : public InstanceMapScript
{
public:
instance_zulfarrak() : InstanceMapScript(ZFScriptName, 209) {}
instance_zulfarrak() : InstanceMapScript(ZFScriptName, MAP_ZUL_FARRAK) {}
InstanceScript* GetInstanceScript(InstanceMap* map) const override
{

View File

@@ -27,6 +27,7 @@ npc_shenthul
npc_thrall_warchief
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -148,11 +149,6 @@ enum ThrallWarchief : uint32
SAY_THRALL_ON_QUEST_REWARD_0 = 0,
SAY_THRALL_ON_QUEST_REWARD_1 = 1,
AREA_ORGRIMMAR = 1637,
AREA_RAZOR_HILL = 362,
AREA_CAMP_TAURAJO = 378,
AREA_CROSSROADS = 380,
GO_UNADORNED_SPIKE = 175787,
// What the Wind Carries (ID: 6566)
@@ -279,7 +275,7 @@ public:
{
if (player->IsAlive() && !player->IsGameMaster())
{
if (player->GetAreaId() == AREA_CROSSROADS)
if (player->GetAreaId() == AREA_THE_CROSSROADS)
{
player->CastSpell(player, SPELL_WARCHIEF_BLESSING, true);
}

View File

@@ -31,6 +31,7 @@ npc_twiggy_flathead
npc_wizzlecrank_shredder
EndContentData */
#include "AreaDefines.h"
#include "CreatureScript.h"
#include "Player.h"
#include "ScriptedCreature.h"
@@ -52,8 +53,7 @@ enum Gilthares
SAY_GIL_SWEET = 6,
SAY_GIL_FREED = 7,
QUEST_FREE_FROM_HOLD = 898,
AREA_MERCHANT_COAST = 391
QUEST_FREE_FROM_HOLD = 898
};
class npc_gilthares : public CreatureScript
@@ -124,7 +124,7 @@ public:
return;
//only aggro text if not player and only in this area
if (!who->IsPlayer() && me->GetAreaId() == AREA_MERCHANT_COAST)
if (!who->IsPlayer() && me->GetAreaId() == AREA_THE_MERCHANT_COAST)
{
//appears to be pretty much random (possible only if escorter not in combat with who yet?)
Talk(SAY_GIL_AGGRO, who);