mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-02-15 00:06:11 +00:00
refactor(Core): Add definition file for area table entries. (#22054)
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "AchievementCriteriaScript.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlegroundAB.h"
|
||||
#include "BattlegroundAV.h"
|
||||
#include "BattlegroundIC.h"
|
||||
@@ -192,16 +193,6 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
enum ArgentTournamentAreas
|
||||
{
|
||||
AREA_ARGENT_TOURNAMENT_FIELDS = 4658,
|
||||
AREA_RING_OF_ASPIRANTS = 4670,
|
||||
AREA_RING_OF_ARGENT_VALIANTS = 4671,
|
||||
AREA_RING_OF_ALLIANCE_VALIANTS = 4672,
|
||||
AREA_RING_OF_HORDE_VALIANTS = 4673,
|
||||
AREA_RING_OF_CHAMPIONS = 4669,
|
||||
};
|
||||
|
||||
class achievement_tilted : public AchievementCriteriaScript
|
||||
{
|
||||
public:
|
||||
@@ -213,12 +204,12 @@ public:
|
||||
return false;
|
||||
|
||||
uint32 areaid = player->GetAreaId();
|
||||
bool checkArea = areaid == AREA_ARGENT_TOURNAMENT_FIELDS ||
|
||||
areaid == AREA_RING_OF_ASPIRANTS ||
|
||||
areaid == AREA_RING_OF_ARGENT_VALIANTS ||
|
||||
areaid == AREA_RING_OF_ALLIANCE_VALIANTS ||
|
||||
areaid == AREA_RING_OF_HORDE_VALIANTS ||
|
||||
areaid == AREA_RING_OF_CHAMPIONS;
|
||||
bool checkArea = areaid == AREA_ARGENT_TOURNAMENT_GROUNDS ||
|
||||
areaid == AREA_THE_ASPIRANTS_RING ||
|
||||
areaid == AREA_THE_ARGENT_VALIANTS_RING ||
|
||||
areaid == AREA_THE_ALLIANCE_VALIANTS_RING ||
|
||||
areaid == AREA_THE_HORDE_VALIANTS_RING ||
|
||||
areaid == AREA_THE_RING_OF_CHAMPIONS;
|
||||
|
||||
return checkArea && player->duel && player->duel->IsMounted;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
if (player->IsAlive() && !player->IsInCombat())
|
||||
if (player->HasItemCount(39319)) // Scepter of Domination
|
||||
{
|
||||
player->TeleportTo(571, 6242.67f, -1972.10f, 484.783f, 0.6f);
|
||||
player->TeleportTo(MAP_NORTHREND, 6242.67f, -1972.10f, 484.783f, 0.6f);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Chat.h"
|
||||
#include "CreatureScript.h"
|
||||
@@ -529,21 +530,6 @@ enum BrewfestMusicTime
|
||||
EVENT_BREWFESTGOBLIN03_TIME = 28000
|
||||
};
|
||||
|
||||
enum BrewfestMusicAreas
|
||||
{
|
||||
SILVERMOON = 3430, // Horde
|
||||
UNDERCITY = 1497,
|
||||
ORGRIMMAR_1 = 1296,
|
||||
ORGRIMMAR_2 = 14,
|
||||
THUNDERBLUFF = 1638,
|
||||
IRONFORGE_1 = 809, // Alliance
|
||||
IRONFORGE_2 = 1,
|
||||
STORMWIND = 12,
|
||||
EXODAR = 3557,
|
||||
DARNASSUS = 1657,
|
||||
SHATTRATH = 3703 // General
|
||||
};
|
||||
|
||||
enum BrewfestMusicEvents
|
||||
{
|
||||
EVENT_BM_SELECT_MUSIC = 1,
|
||||
@@ -581,7 +567,7 @@ public:
|
||||
//Restart the current selected music
|
||||
_currentMusicEvent = 0;
|
||||
//Check zone to play correct music
|
||||
if (me->GetAreaId() == SILVERMOON || me->GetAreaId() == UNDERCITY || me->GetAreaId() == ORGRIMMAR_1 || me->GetAreaId() == ORGRIMMAR_2 || me->GetAreaId() == THUNDERBLUFF)
|
||||
if (me->GetAreaId() == AREA_EVERSONG_WOODS || me->GetAreaId() == AREA_UNDERCITY || me->GetAreaId() == AREA_ROCKTUSK_FARM || me->GetAreaId() == AREA_DUROTAR || me->GetAreaId() == AREA_THUNDER_BLUFF)
|
||||
{
|
||||
switch (rnd)
|
||||
{
|
||||
@@ -601,7 +587,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (me->GetAreaId() == IRONFORGE_1 || me->GetAreaId() == IRONFORGE_2 || me->GetAreaId() == STORMWIND || me->GetAreaId() == EXODAR || me->GetAreaId() == DARNASSUS)
|
||||
else if (me->GetAreaId() == AREA_GATES_OF_IRONFORGE || me->GetAreaId() == AREA_DUN_MOROGH || me->GetAreaId() == AREA_ELWYNN_FOREST || me->GetAreaId() == AREA_THE_EXODAR || me->GetAreaId() == AREA_DARNASSUS)
|
||||
{
|
||||
switch (rnd)
|
||||
{
|
||||
@@ -621,7 +607,7 @@ public:
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (me->GetAreaId() == SHATTRATH)
|
||||
else if (me->GetAreaId() == AREA_SHATTRATH_CITY)
|
||||
{
|
||||
rnd = urand(0, 5);
|
||||
switch (rnd)
|
||||
@@ -1734,28 +1720,6 @@ enum BellHourlySoundFX
|
||||
LIGHTHOUSEFOGHORN = 7197
|
||||
};
|
||||
|
||||
enum BellHourlySoundZones
|
||||
{
|
||||
TIRISFAL_ZONE = 85,
|
||||
UNDERCITY_ZONE = 1497,
|
||||
DUN_MOROGH_ZONE = 1,
|
||||
IRONFORGE_ZONE = 1537,
|
||||
TELDRASSIL_ZONE = 141,
|
||||
DARNASSUS_ZONE = 1657,
|
||||
ASHENVALE_ZONE = 331,
|
||||
HILLSBRAD_FOOTHILLS_ZONE = 267,
|
||||
DUSKWOOD_ZONE = 10,
|
||||
WESTFALL_ZONE = 40,
|
||||
DUSTWALLOW_MARSH_ZONE = 15,
|
||||
SHATTRATH_ZONE = 3703
|
||||
};
|
||||
|
||||
enum LightHouseAreas
|
||||
{
|
||||
AREA_ALCAZ_ISLAND = 2079,
|
||||
AREA_WESTFALL_LIGHTHOUSE = 115
|
||||
};
|
||||
|
||||
enum BellHourlyObjects
|
||||
{
|
||||
GO_HORDE_BELL = 175885,
|
||||
@@ -1787,10 +1751,10 @@ public:
|
||||
{
|
||||
switch (zoneId)
|
||||
{
|
||||
case TIRISFAL_ZONE:
|
||||
case UNDERCITY_ZONE:
|
||||
case HILLSBRAD_FOOTHILLS_ZONE:
|
||||
case DUSKWOOD_ZONE:
|
||||
case AREA_TIRISFAL_GLADES:
|
||||
case AREA_UNDERCITY:
|
||||
case AREA_HILLSBRAD_FOOTHILLS:
|
||||
case AREA_DUSKWOOD:
|
||||
_soundId = BELLTOLLHORDE;
|
||||
break;
|
||||
default:
|
||||
@@ -1803,17 +1767,17 @@ public:
|
||||
{
|
||||
switch (zoneId)
|
||||
{
|
||||
case IRONFORGE_ZONE:
|
||||
case DUN_MOROGH_ZONE:
|
||||
case AREA_IRONFORGE:
|
||||
case AREA_DUN_MOROGH:
|
||||
_soundId = BELLTOLLDWARFGNOME;
|
||||
break;
|
||||
case DARNASSUS_ZONE:
|
||||
case TELDRASSIL_ZONE:
|
||||
case ASHENVALE_ZONE:
|
||||
case SHATTRATH_ZONE:
|
||||
case AREA_DARNASSUS:
|
||||
case AREA_TELDRASSIL:
|
||||
case AREA_ASHENVALE:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
_soundId = BELLTOLLNIGHTELF;
|
||||
break;
|
||||
case WESTFALL_ZONE:
|
||||
case AREA_WESTFALL:
|
||||
if (go->GetAreaId() == AREA_WESTFALL_LIGHTHOUSE)
|
||||
{
|
||||
_soundId = LIGHTHOUSEFOGHORN;
|
||||
@@ -1823,7 +1787,7 @@ public:
|
||||
_soundId = BELLTOLLALLIANCE;
|
||||
}
|
||||
break;
|
||||
case DUSTWALLOW_MARSH_ZONE:
|
||||
case AREA_DUSTWALLOW_MARSH:
|
||||
if (go->GetAreaId() == AREA_ALCAZ_ISLAND)
|
||||
{
|
||||
_soundId = LIGHTHOUSEFOGHORN;
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CreatureScript.h"
|
||||
#include "ItemScript.h"
|
||||
#include "Player.h"
|
||||
@@ -45,11 +46,11 @@ public:
|
||||
switch (itemId)
|
||||
{
|
||||
case 24538:
|
||||
if (player->GetAreaId() != 3628)
|
||||
if (player->GetAreaId() != AREA_HALAA)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34489:
|
||||
if (player->GetZoneId() != 4080)
|
||||
if (player->GetZoneId() != AREA_ISLE_OF_QUEL_DANAS)
|
||||
disabled = true;
|
||||
break;
|
||||
case 34475:
|
||||
@@ -135,9 +136,7 @@ public:
|
||||
|
||||
enum PetrovClusterBombs
|
||||
{
|
||||
SPELL_PETROV_BOMB = 42406,
|
||||
AREA_ID_SHATTERED_STRAITS = 4064,
|
||||
ZONE_ID_HOWLING = 495
|
||||
SPELL_PETROV_BOMB = 42406
|
||||
};
|
||||
|
||||
class item_petrov_cluster_bombs : public ItemScript
|
||||
@@ -147,10 +146,10 @@ public:
|
||||
|
||||
bool OnUse(Player* player, Item* item, const SpellCastTargets& /*targets*/) override
|
||||
{
|
||||
if (player->GetZoneId() != ZONE_ID_HOWLING)
|
||||
if (player->GetZoneId() != AREA_HOWLING_FJORD)
|
||||
return false;
|
||||
|
||||
if (!player->GetTransport() || player->GetAreaId() != AREA_ID_SHATTERED_STRAITS)
|
||||
if (!player->GetTransport() || player->GetAreaId() != AREA_SHATTERED_STRAITS)
|
||||
{
|
||||
player->SendEquipError(EQUIP_ERR_NONE, item, nullptr);
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "CellImpl.h"
|
||||
#include "Chat.h"
|
||||
#include "CombatAI.h"
|
||||
@@ -2109,7 +2110,6 @@ enum Fireworks
|
||||
SPELL_LUNAR_FORTUNE = 26522,
|
||||
|
||||
ANIM_GO_LAUNCH_FIREWORK = 3,
|
||||
ZONE_MOONGLADE = 493,
|
||||
};
|
||||
|
||||
Position omenSummonPos = {7558.993f, -2839.999f, 450.0214f, 4.46f};
|
||||
@@ -2296,7 +2296,7 @@ public:
|
||||
if (isCluster())
|
||||
{
|
||||
// Check if we are near Elune'ara lake south, if so try to summon Omen or a minion
|
||||
if (me->GetZoneId() == ZONE_MOONGLADE)
|
||||
if (me->GetZoneId() == AREA_MOONGLADE)
|
||||
{
|
||||
if (!me->FindNearestCreature(NPC_OMEN, 100.0f, false) && me->GetDistance2d(omenSummonPos.GetPositionX(), omenSummonPos.GetPositionY()) <= 100.0f)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user