refactor(Core): Add definition file for area table entries. (#22054)
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "LFGMgr.h"
|
||||
@@ -41,7 +42,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::s
|
||||
return true;
|
||||
}
|
||||
|
||||
if (player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && player->GetMapId() == 609)
|
||||
if (player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && player->GetMapId() == MAP_EBON_HOLD)
|
||||
{
|
||||
handler->PSendSysMessage("Death Knights can't spectate before finishing questline.");
|
||||
return true;
|
||||
@@ -163,7 +164,7 @@ bool ArenaSpectator::HandleSpectatorSpectateCommand(ChatHandler* handler, std::s
|
||||
if (bgPreparation)
|
||||
return true;
|
||||
|
||||
float z = spectate->GetMapId() == 618 ? std::max(28.27f, spectate->GetPositionZ() + 0.25f) : spectate->GetPositionZ() + 0.25f;
|
||||
float z = spectate->GetMapId() == MAP_THE_RING_OF_VALOR ? std::max(28.27f, spectate->GetPositionZ() + 0.25f) : spectate->GetPositionZ() + 0.25f;
|
||||
|
||||
player->SetPendingSpectatorForBG(spectate->GetBattlegroundId());
|
||||
player->SetBattlegroundId(spectate->GetBattlegroundId(), spectate->GetBattlegroundTypeId(), PLAYER_MAX_BATTLEGROUND_QUEUES, false, false, TEAM_NEUTRAL);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
/// @todo: Use spell victory/defeat in wg instead of RewardMarkOfHonor() && RewardHonor
|
||||
/// @todo: Add proper implement of achievement
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlefieldWG.h"
|
||||
#include "Chat.h"
|
||||
#include "GameTime.h"
|
||||
@@ -46,8 +47,8 @@ bool BattlefieldWG::SetupBattlefield()
|
||||
{
|
||||
m_TypeId = BATTLEFIELD_WG; // See enum BattlefieldTypes
|
||||
m_BattleId = BATTLEFIELD_BATTLEID_WG;
|
||||
m_ZoneId = BATTLEFIELD_WG_ZONEID;
|
||||
m_MapId = BATTLEFIELD_WG_MAPID;
|
||||
m_ZoneId = AREA_WINTERGRASP;
|
||||
m_MapId = MAP_NORTHREND;
|
||||
m_Map = sMapMgr->FindMap(m_MapId, 0);
|
||||
|
||||
// init stalker AFTER setting map id... we spawn it at map=random memory value?...
|
||||
@@ -280,7 +281,7 @@ void BattlefieldWG::OnBattleStart()
|
||||
float x, y, z;
|
||||
player->GetPosition(x, y, z);
|
||||
if (5500 > x && x > 5392 && y < 2880 && y > 2800 && z < 480)
|
||||
player->TeleportTo(571, 5349.8686f, 2838.481f, 409.240f, 0.046328f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5349.8686f, 2838.481f, 409.240f, 0.046328f);
|
||||
SendInitWorldStatesTo(player);
|
||||
}
|
||||
}
|
||||
@@ -523,9 +524,9 @@ uint8 BattlefieldWG::GetSpiritGraveyardId(uint32 areaId) const
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_NE;
|
||||
case AREA_THE_BROKEN_TEMPLE:
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_NW;
|
||||
case AREA_WESTPARK_WORKSHOP:
|
||||
case AREA_WESTSPARK_WORKSHOP:
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_SW;
|
||||
case AREA_EASTPARK_WORKSHOP:
|
||||
case AREA_EASTSPARK_WORKSHOP:
|
||||
return BATTLEFIELD_WG_GY_WORKSHOP_SE;
|
||||
case AREA_WINTERGRASP:
|
||||
return BATTLEFIELD_WG_GY_ALLIANCE;
|
||||
@@ -548,9 +549,9 @@ uint32 BattlefieldWG::GetAreaByGraveyardId(uint8 gId) const
|
||||
case BATTLEFIELD_WG_GY_WORKSHOP_NW:
|
||||
return AREA_THE_BROKEN_TEMPLE;
|
||||
case BATTLEFIELD_WG_GY_WORKSHOP_SW:
|
||||
return AREA_WESTPARK_WORKSHOP;
|
||||
return AREA_WESTSPARK_WORKSHOP;
|
||||
case BATTLEFIELD_WG_GY_WORKSHOP_SE:
|
||||
return AREA_EASTPARK_WORKSHOP;
|
||||
return AREA_EASTSPARK_WORKSHOP;
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -852,13 +853,13 @@ void BattlefieldWG::OnPlayerJoinWar(Player* player)
|
||||
AddUpdateTenacity(player);
|
||||
|
||||
if (player->GetTeamId() == GetDefenderTeam())
|
||||
player->TeleportTo(571, 5345, 2842, 410, 3.14f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5345, 2842, 410, 3.14f);
|
||||
else
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_HORDE)
|
||||
player->TeleportTo(571, 5025.857422f, 3674.628906f, 362.737122f, 4.135169f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5025.857422f, 3674.628906f, 362.737122f, 4.135169f);
|
||||
else
|
||||
player->TeleportTo(571, 5101.284f, 2186.564f, 365.549f, 3.812f);
|
||||
player->TeleportTo(MAP_NORTHREND, 5101.284f, 2186.564f, 365.549f, 3.812f);
|
||||
}
|
||||
|
||||
if (player->GetTeamId() == GetAttackerTeam())
|
||||
@@ -926,8 +927,8 @@ uint32 BattlefieldWG::GetData(uint32 data) const
|
||||
// See: SpellArea::IsFitToRequirements
|
||||
case AREA_THE_SUNKEN_RING:
|
||||
case AREA_THE_BROKEN_TEMPLE:
|
||||
case AREA_WESTPARK_WORKSHOP:
|
||||
case AREA_EASTPARK_WORKSHOP:
|
||||
case AREA_WESTSPARK_WORKSHOP:
|
||||
case AREA_EASTSPARK_WORKSHOP:
|
||||
// Graveyards and Workshops are controlled by the same team.
|
||||
if (BfGraveyard const* graveyard = GetGraveyardById(GetSpiritGraveyardId(data)))
|
||||
return graveyard->GetControlTeamId();
|
||||
|
||||
@@ -101,20 +101,6 @@ enum WintergraspData
|
||||
BATTLEFIELD_WG_DATA_MAX,
|
||||
};
|
||||
|
||||
enum WintergraspAreaIds
|
||||
{
|
||||
BATTLEFIELD_WG_ZONEID = 4197, // Wintergrasp
|
||||
BATTLEFIELD_WG_MAPID = 571, // Northrend
|
||||
|
||||
AREA_WINTERGRASP_FORTRESS = 4575,
|
||||
AREA_THE_SUNKEN_RING = 4538,
|
||||
AREA_THE_BROKEN_TEMPLE = 4539,
|
||||
AREA_WESTPARK_WORKSHOP = 4611,
|
||||
AREA_EASTPARK_WORKSHOP = 4612,
|
||||
AREA_WINTERGRASP = 4197,
|
||||
AREA_THE_CHILLED_QUAGMIRE = 4589,
|
||||
};
|
||||
|
||||
/*#########################
|
||||
*####### Graveyards ######
|
||||
*#########################*/
|
||||
|
||||
@@ -60,16 +60,6 @@ enum BattlegroundDesertionType : uint8
|
||||
ARENA_DESERTION_TYPE_INVITE_LOGOUT = 8, // player is invited to join arena and logs out
|
||||
};
|
||||
|
||||
enum BattlegroundMaps
|
||||
{
|
||||
MAP_BG_ALTERAC_VALLEY = 30,
|
||||
MAP_BG_WARSONG_GULCH = 489,
|
||||
MAP_BG_ARATHI_BASIN = 529,
|
||||
MAP_BG_EYE_OF_THE_STORM = 566,
|
||||
MAP_BG_STRAND_OF_THE_ANCIENTS = 607,
|
||||
MAP_BG_ISLE_OF_CONQUEST = 628
|
||||
};
|
||||
|
||||
enum BattlegroundBroadcastTexts
|
||||
{
|
||||
BG_TEXT_ALLIANCE_WINS = 10633,
|
||||
|
||||
@@ -567,7 +567,7 @@ void BattlegroundSA::TeleportToEntrancePosition(Player* player)
|
||||
{
|
||||
if (player->GetTeamId() != Attackers)
|
||||
{
|
||||
player->TeleportTo(607, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 1209.7f, -65.16f, 70.1f, 0.0f, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -575,12 +575,12 @@ void BattlegroundSA::TeleportToEntrancePosition(Player* player)
|
||||
{
|
||||
player->CastSpell(player, 12438, true);//Without this player falls before boat loads...
|
||||
if (urand(0, 1))
|
||||
player->TeleportTo(607, 2682.936f, -830.368f, 15.0f, 2.895f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 2682.936f, -830.368f, 15.0f, 2.895f, 0);
|
||||
else
|
||||
player->TeleportTo(607, 2577.003f, 980.261f, 15.0f, 0.807f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 2577.003f, 980.261f, 15.0f, 0.807f, 0);
|
||||
}
|
||||
else
|
||||
player->TeleportTo(607, 1600.381f, -106.263f, 8.8745f, 3.78f, 0);
|
||||
player->TeleportTo(MAP_STRAND_OF_THE_ANCIENTS, 1600.381f, -106.263f, 8.8745f, 3.78f, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "WhoListCacheMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "GuildMgr.h"
|
||||
#include "ObjectAccessor.h"
|
||||
#include "World.h"
|
||||
@@ -56,7 +57,7 @@ void WhoListCacheMgr::Update()
|
||||
|
||||
_whoListStorage.emplace_back(player->GetGUID(), player->GetTeamId(), player->GetSession()->GetSecurity(), player->GetLevel(),
|
||||
player->getClass(), player->getRace(),
|
||||
(player->IsSpectator() ? 4395 /*Dalaran*/ : player->GetZoneId()), player->getGender(), player->IsVisible(),
|
||||
(player->IsSpectator() ? AREA_DALARAN : player->GetZoneId()), player->getGender(), player->IsVisible(),
|
||||
widePlayerName, wideGuildName, playerName, guildName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -702,7 +702,7 @@ WMOAreaTableEntry const* GetWMOAreaTableEntryByTripple(int32 rootid, int32 adtid
|
||||
|
||||
uint32 GetVirtualMapForMapAndZone(uint32 mapid, uint32 zoneId)
|
||||
{
|
||||
if (mapid != 530 && mapid != 571) // speed for most cases
|
||||
if (mapid != MAP_OUTLAND && mapid != MAP_NORTHREND) // speed for most cases
|
||||
return mapid;
|
||||
|
||||
if (WorldMapAreaEntry const* wma = sWorldMapAreaStore.LookupEntry(zoneId))
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef _OBJECT_H
|
||||
#define _OBJECT_H
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "Common.h"
|
||||
#include "DataMap.h"
|
||||
#include "EventProcessor.h"
|
||||
@@ -588,7 +589,7 @@ public:
|
||||
|
||||
[[nodiscard]] bool IsInWintergrasp() const
|
||||
{
|
||||
return GetMapId() == 571 && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f;
|
||||
return GetMapId() == MAP_NORTHREND && GetPositionX() > 3733.33331f && GetPositionX() < 5866.66663f && GetPositionY() > 1599.99999f && GetPositionY() < 4799.99997f;
|
||||
}
|
||||
|
||||
uint32 LastUsedScriptID;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Pet.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "CharmInfo.h"
|
||||
#include "Common.h"
|
||||
@@ -81,7 +82,7 @@ void Pet::AddToWorld()
|
||||
}
|
||||
|
||||
// pussywizard: apply ICC buff to pets
|
||||
if (GetOwnerGUID().IsPlayer() && GetMapId() == 631 && FindMap() && FindMap()->ToInstanceMap() && FindMap()->ToInstanceMap()->GetInstanceScript() && FindMap()->ToInstanceMap()->GetInstanceScript()->GetData(251 /*DATA_BUFF_AVAILABLE*/))
|
||||
if (GetOwnerGUID().IsPlayer() && GetMapId() == MAP_ICECROWN_CITADEL && FindMap() && FindMap()->ToInstanceMap() && FindMap()->ToInstanceMap()->GetInstanceScript() && FindMap()->ToInstanceMap()->GetInstanceScript()->GetData(251 /*DATA_BUFF_AVAILABLE*/))
|
||||
if (Unit* owner = GetOwner())
|
||||
if (Player* plr = owner->ToPlayer())
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "Player.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "AchievementMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
@@ -1485,7 +1486,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && GetMapId() == 609 && !IsGameMaster() && !HasSpell(50977))
|
||||
if (IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && GetMapId() == MAP_EBON_HOLD && !IsGameMaster() && !HasSpell(50977))
|
||||
{
|
||||
SendTransferAborted(mapid, TRANSFER_ABORT_UNIQUE_MESSAGE, 1);
|
||||
return false;
|
||||
@@ -1730,7 +1731,7 @@ void Player::RemoveFromWorld()
|
||||
m_session->DoLootRelease(lguid);
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sBattlefieldMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<WorldStateZoneId>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<AreaTableIDs>(m_zoneUpdateId));
|
||||
}
|
||||
|
||||
// Remove items from world before self - player must be found in Item::RemoveFromObjectUpdate
|
||||
@@ -2402,7 +2403,7 @@ void Player::GiveXP(uint32 xp, Unit* victim, float group_rate, bool isLFGReward)
|
||||
// Favored experience increase START
|
||||
uint32 zone = GetZoneId();
|
||||
float favored_exp_mult = 0;
|
||||
if ((zone == 3483 || zone == 3562 || zone == 3836 || zone == 3713 || zone == 3714) && HasAnyAuras(32096 /*Thrallmar's Favor*/, 32098 /*Honor Hold's Favor*/))
|
||||
if ((zone == AREA_HELLFIRE_PENINSULA || zone == AREA_HELLFIRE_RAMPARTS || zone == AREA_MAGTHERIDONS_LAIR || zone == AREA_THE_BLOOD_FURNACE || zone == AREA_THE_SHATTERED_HALLS) && HasAnyAuras(32096 /*Thrallmar's Favor*/, 32098 /*Honor Hold's Favor*/))
|
||||
favored_exp_mult = 0.05f; // Thrallmar's Favor and Honor Hold's Favor
|
||||
|
||||
xp = uint32(xp * (1 + favored_exp_mult));
|
||||
@@ -8236,7 +8237,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
// 8 Arena season id
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ARENA_SEASON_ID, sArenaSeasonMgr->GetCurrentSeason());
|
||||
|
||||
if (mapId == 530) // Outland
|
||||
if (mapId == MAP_OUTLAND)
|
||||
{
|
||||
packet.Worldstates.reserve(3);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_NA_UI_TOWER_SLIDER_DISPLAY, 0);
|
||||
@@ -8253,18 +8254,18 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
// insert <field> <value>
|
||||
switch (zoneId)
|
||||
{
|
||||
case 1: // Dun Morogh
|
||||
case 11: // Wetlands
|
||||
case 12: // Elwynn Forest
|
||||
case 38: // Loch Modan
|
||||
case 40: // Westfall
|
||||
case 51: // Searing Gorge
|
||||
case 1519: // Stormwind City
|
||||
case 1537: // Ironforge
|
||||
case 2257: // Deeprun Tram
|
||||
case 3703: // Shattrath City
|
||||
case AREA_DUN_MOROGH:
|
||||
case AREA_WETLANDS:
|
||||
case AREA_ELWYNN_FOREST:
|
||||
case AREA_LOCH_MODAN:
|
||||
case AREA_WESTFALL:
|
||||
case AREA_SEARING_GORGE:
|
||||
case AREA_STORMWIND_CITY:
|
||||
case AREA_IRONFORGE:
|
||||
case AREA_DEEPRUN_TRAM:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
break;
|
||||
case 139: // Eastern Plaguelands
|
||||
case AREA_EASTERN_PLAGUELANDS:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_EP)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8305,7 +8306,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_EP_PLAGUEWOODTOWER_H, 0);
|
||||
|
||||
break;
|
||||
case 1377: // Silithus
|
||||
case AREA_SILITHUS:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_SI)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8322,7 +8323,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_AHNQIRAJ_SANDWORM_SW, 0);
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_AHNQIRAJ_SANDWORM_E, 0);
|
||||
break;
|
||||
case 2597: // Alterac Valley
|
||||
case AREA_ALTERAC_VALLEY:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_AV)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8405,7 +8406,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_AV_AID_A_C, 1);
|
||||
}
|
||||
break;
|
||||
case 3277: // Warsong Gulch
|
||||
case AREA_WARSONG_GULCH:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_WS)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8421,7 +8422,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_WS_FLAG_STATE_ALLIANCE, 1);
|
||||
}
|
||||
break;
|
||||
case 3358: // Arathi Basin
|
||||
case AREA_ARATHI_BASIN:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_AB)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8461,7 +8462,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_AB_RESOURCES_WARNING, 1400); // warning limit (1400)
|
||||
}
|
||||
break;
|
||||
case 3820: // Eye of the Storm
|
||||
case AREA_EYE_OF_THE_STORM:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_EY)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8504,7 +8505,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
break;
|
||||
// any of these needs change! the client remembers the prev setting!
|
||||
// ON EVERY ZONE LEAVE, RESET THE OLD ZONE'S WORLD STATE, BUT AT LEAST THE UI STUFF!
|
||||
case 3483: // Hellfire Peninsula
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_HP)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8528,7 +8529,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_HP_STADIUM_H, 1);
|
||||
}
|
||||
break;
|
||||
case 3518: // Nagrand
|
||||
case AREA_NAGRAND:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_NA)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8564,7 +8565,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_NA_MAP_HALAA_ALLIANCE, 0);
|
||||
}
|
||||
break;
|
||||
case 3519: // Terokkar Forest
|
||||
case AREA_TEROKKAR_FOREST:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_TF)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8600,7 +8601,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_TF_UI_LOCKED_DISPLAY_ALLIANCE, 1);
|
||||
}
|
||||
break;
|
||||
case 3521: // Zangarmarsh
|
||||
case AREA_ZANGARMARSH:
|
||||
if (outdoorPvP && outdoorPvP->GetTypeId() == OUTDOOR_PVP_ZM)
|
||||
outdoorPvP->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8634,7 +8635,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OPVP_ZM_MAP_ALLIANCE_FLAG_READY, 0);
|
||||
}
|
||||
break;
|
||||
case 3698: // Nagrand Arena
|
||||
case AREA_NAGRAND_ARENA:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_NA)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8645,7 +8646,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_NA_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 3702: // Blade's Edge Arena
|
||||
case AREA_BLADES_EDGE_ARENA:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_BE)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8656,7 +8657,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_BE_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 3968: // Ruins of Lordaeron
|
||||
case AREA_RUINS_OF_LORDAERON:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_RL)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8667,7 +8668,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_RL_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4378: // Dalaran Sewers
|
||||
case AREA_DALARAN_ARENA:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_DS)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8678,7 +8679,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_DS_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4384: // Strand of the Ancients
|
||||
case AREA_STRAND_OF_THE_ANCIENTS:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_SA)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8714,7 +8715,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
// missing unknowns
|
||||
}
|
||||
break;
|
||||
case 4406: // Ring of Valor
|
||||
case ARENA_THE_RING_OF_VALOR:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_RV)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8725,7 +8726,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_RV_ARENA_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4710: // Isle of Conquest
|
||||
case AREA_ISLE_OF_CONQUEST:
|
||||
if (battleground && battleground->GetBgTypeID(true) == BATTLEGROUND_IC)
|
||||
battleground->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8751,7 +8752,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_BATTLEGROUND_IC_HORDE_KEEP_CONTROLLED_H, 1);
|
||||
}
|
||||
break;
|
||||
case 4987: // The Ruby Sanctum
|
||||
case AREA_THE_RUBY_SANCTUM:
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8762,8 +8763,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_RUBY_SANCTUM_CORPOREALITY_TOGGLE, 0);
|
||||
}
|
||||
break;
|
||||
case 4812: // Icecrown Citadel
|
||||
if (instance && mapId == 631)
|
||||
case AREA_ICECROWN_CITADEL:
|
||||
if (instance && mapId == MAP_ICECROWN_CITADEL)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8775,8 +8776,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ICECROWN_CITADEL_ATTEMPTS_MAX, 50);
|
||||
}
|
||||
break;
|
||||
case 4100: // The Culling of Stratholme
|
||||
if (instance && mapId == 595)
|
||||
case AREA_THE_CULLING_OF_STRATHOLME:
|
||||
if (instance && mapId == MAP_THE_CULLING_OF_STRATHOLME)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8788,8 +8789,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_CULLING_OF_STRATHOLME_TIME_GUARDIAN_SHOW, 0);
|
||||
}
|
||||
break;
|
||||
case 4228: // The Oculus
|
||||
if (instance && mapId == 578)
|
||||
case AREA_THE_OCULUS:
|
||||
if (instance && mapId == MAP_THE_OCULUS)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8798,8 +8799,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_OCULUS_CENTRIFUGE_CONSTRUCT_AMOUNT, 0);
|
||||
}
|
||||
break;
|
||||
case 4273: // Ulduar
|
||||
if (instance && mapId == 603)
|
||||
case AREA_ULDUAR:
|
||||
if (instance && mapId == MAP_ULDUAR)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8808,7 +8809,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_ULDUAR_ALGALON_DESPAWN_TIMER, 0);
|
||||
}
|
||||
break;
|
||||
case 4415: // Violet Hold
|
||||
case AREA_THE_VIOLET_HOLD:
|
||||
if (instance)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
@@ -8819,8 +8820,8 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_VIOLET_HOLD_WAVE_COUNT, 0);
|
||||
}
|
||||
break;
|
||||
case 4820: // Halls of Refection
|
||||
if (instance && mapId == 668)
|
||||
case AREA_HALLS_OF_REFLECTION:
|
||||
if (instance && mapId == MAP_HALLS_OF_REFLECTION)
|
||||
instance->FillInitialWorldStates(packet);
|
||||
else
|
||||
{
|
||||
@@ -8829,7 +8830,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
packet.Worldstates.emplace_back(WORLD_STATE_HALLS_OF_REFLECTION_WAVE_COUNT, 0);
|
||||
}
|
||||
break;
|
||||
case 4298: // Scarlet Enclave (DK starting zone)
|
||||
case AREA_PLAGUELANDS_THE_SCARLET_ENCLAVE: // (DK starting zone)
|
||||
// Get Mograine, GUID and ENTRY should NEVER change
|
||||
if (Creature* mograine = ObjectAccessor::GetCreature(*this, ObjectGuid::Create<HighGuid::Unit>(29173, 130956)))
|
||||
{
|
||||
@@ -8845,7 +8846,7 @@ void Player::SendInitWorldStates(uint32 zoneId, uint32 areaId)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 4197: // Wintergrasp
|
||||
case AREA_WINTERGRASP:
|
||||
if (battlefield && battlefield->GetTypeId() == BATTLEFIELD_WG)
|
||||
{
|
||||
battlefield->FillInitialWorldStates(packet);
|
||||
@@ -13594,7 +13595,7 @@ uint32 Player::CalculateTalentsPoints() const
|
||||
uint32 base_talent = GetLevel() < 10 ? 0 : GetLevel() - 9;
|
||||
|
||||
uint32 talentPointsForLevel = 0;
|
||||
if (!IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TALENT_POINT_CALC) || GetMapId() != 609)
|
||||
if (!IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TALENT_POINT_CALC) || GetMapId() != MAP_EBON_HOLD)
|
||||
{
|
||||
talentPointsForLevel = base_talent;
|
||||
}
|
||||
@@ -13623,7 +13624,7 @@ bool Player::canFlyInZone(uint32 mapid, uint32 zone, SpellInfo const* bySpell)
|
||||
|
||||
// continent checked in SpellInfo::CheckLocation at cast and area update
|
||||
uint32 v_map = GetVirtualMapForMapAndZone(mapid, zone);
|
||||
if (v_map == 571 && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))
|
||||
if (v_map == MAP_NORTHREND && !bySpell->HasAttribute(SPELL_ATTR7_IGNORES_COLD_WEATHER_FLYING_REQUIREMENT))
|
||||
{
|
||||
if (!HasSpell(54197)) // 54197 = Cold Weather Flying
|
||||
{
|
||||
|
||||
@@ -1258,8 +1258,8 @@ void Player::UpdateZone(uint32 newZone, uint32 newArea, bool force)
|
||||
{
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(this, m_zoneUpdateId);
|
||||
sOutdoorPvPMgr->HandlePlayerEnterZone(this, newZone);
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<WorldStateZoneId>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerEnterZone(this, static_cast<WorldStateZoneId>(newZone));
|
||||
sWorldState->HandlePlayerLeaveZone(this, static_cast<AreaTableIDs>(m_zoneUpdateId));
|
||||
sWorldState->HandlePlayerEnterZone(this, static_cast<AreaTableIDs>(newZone));
|
||||
}
|
||||
if (m_zoneUpdateId != newZone)
|
||||
{
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "Unit.h"
|
||||
#include "AccountMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaSpectator.h"
|
||||
#include "Battlefield.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
@@ -4224,7 +4225,7 @@ bool Unit::isInBackInMap(Unit const* target, float distance, float arc) const
|
||||
|
||||
bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
{
|
||||
if (c->GetMapId() == 618) // Ring of Valor
|
||||
if (c->GetMapId() == MAP_THE_RING_OF_VALOR)
|
||||
{
|
||||
// skip transport check, check for being below floor level
|
||||
if (this->GetPositionZ() < 28.0f)
|
||||
@@ -4234,7 +4235,7 @@ bool Unit::isInAccessiblePlaceFor(Creature const* c) const
|
||||
if (bg->GetStartTime() < 80133) // 60000ms preparation time + 20133ms elevator rise time
|
||||
return false;
|
||||
}
|
||||
else if (c->GetMapId() == 631) // Icecrown Citadel
|
||||
else if (c->GetMapId() == MAP_ICECROWN_CITADEL)
|
||||
{
|
||||
// if static transport doesn't match - return false
|
||||
if (c->GetTransport() != this->GetTransport() && ((c->GetTransport() && c->GetTransport()->IsStaticTransport()) || (this->GetTransport() && this->GetTransport()->IsStaticTransport())))
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Vehicle.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlefieldWG.h"
|
||||
#include "Log.h"
|
||||
#include "MoveSplineInit.h"
|
||||
@@ -159,7 +160,7 @@ void Vehicle::ApplyAllImmunities()
|
||||
//_me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_UNATTACKABLE, true);
|
||||
_me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_SHIELD, true);
|
||||
_me->ApplySpellImmune(0, IMMUNITY_MECHANIC, MECHANIC_IMMUNE_SHIELD, true);
|
||||
if (_me->GetZoneId() == BATTLEFIELD_WG_ZONEID || _me->ToCreature()->GetSpawnId() || (_me->FindMap() && _me->FindMap()->Instanceable()))
|
||||
if (_me->GetZoneId() == AREA_WINTERGRASP || _me->ToCreature()->GetSpawnId() || (_me->FindMap() && _me->FindMap()->Instanceable()))
|
||||
_me->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_SCHOOL_ABSORB, true);
|
||||
|
||||
// ... Resistance, Split damage, Change stats ...
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Group.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "Config.h"
|
||||
@@ -2013,7 +2014,7 @@ GroupJoinBattlegroundResult Group::CanJoinBattlegroundQueue(Battleground const*
|
||||
return ERR_IN_NON_RANDOM_BG;
|
||||
|
||||
// don't let Death Knights join BG queues when they are not allowed to be teleported yet
|
||||
if (member->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && member->GetMapId() == 609 && !member->IsGameMaster() && !member->HasSpell(50977))
|
||||
if (member->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && member->GetMapId() == MAP_EBON_HOLD && !member->IsGameMaster() && !member->HasSpell(50977))
|
||||
return ERR_GROUP_JOIN_BATTLEGROUND_FAIL;
|
||||
|
||||
if (!member->GetBGAccessByLevel(bgTemplate->GetBgTypeID()))
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
* with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaTeam.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "ArenaSeasonMgr.h"
|
||||
@@ -185,7 +186,7 @@ void WorldSession::HandleBattlemasterJoinOpcode(WorldPacket& recvData)
|
||||
err = ERR_BATTLEGROUND_QUEUED_FOR_RATED;
|
||||
}
|
||||
// don't let Death Knights join BG queues when they are not allowed to be teleported yet
|
||||
else if (_player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && _player->GetMapId() == 609 && !_player->IsGameMaster() && !_player->HasSpell(50977))
|
||||
else if (_player->IsClass(CLASS_DEATH_KNIGHT, CLASS_CONTEXT_TELEPORT) && _player->GetMapId() == MAP_EBON_HOLD && !_player->IsGameMaster() && !_player->HasSpell(50977))
|
||||
{
|
||||
err = ERR_BATTLEGROUND_NONE;
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "AccountMgr.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "ArenaTeamMgr.h"
|
||||
#include "AuctionHouseMgr.h"
|
||||
#include "Battleground.h"
|
||||
@@ -2324,13 +2325,13 @@ void WorldSession::HandleCharFactionOrRaceChangeCallback(std::shared_ptr<Charact
|
||||
|
||||
if (newTeam == TEAM_ALLIANCE)
|
||||
{
|
||||
loc.WorldRelocate(0, -8867.68f, 673.373f, 97.9034f, 0.0f);
|
||||
zoneId = 1519;
|
||||
loc.WorldRelocate(MAP_EASTERN_KINGDOMS, -8867.68f, 673.373f, 97.9034f, 0.0f);
|
||||
zoneId = AREA_STORMWIND_CITY;
|
||||
}
|
||||
else
|
||||
{
|
||||
loc.WorldRelocate(1, 1633.33f, -4439.11f, 15.7588f, 0.0f);
|
||||
zoneId = 1637;
|
||||
loc.WorldRelocate(MAP_KALIMDOR, 1633.33f, -4439.11f, 15.7588f, 0.0f);
|
||||
zoneId = AREA_ORGRIMMAR;
|
||||
}
|
||||
|
||||
stmt->SetData(1, loc.GetMapId());
|
||||
|
||||
@@ -1416,8 +1416,8 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
|
||||
}
|
||||
}
|
||||
|
||||
Map* homeMap571 = sMapMgr->CreateMap(571, nullptr);
|
||||
Map* homeMap0 = sMapMgr->CreateMap(0, nullptr);
|
||||
Map* homeMap571 = sMapMgr->CreateMap(MAP_NORTHREND, nullptr);
|
||||
Map* homeMap0 = sMapMgr->CreateMap(MAP_EASTERN_KINGDOMS, nullptr);
|
||||
ASSERT(homeMap0 && homeMap571);
|
||||
|
||||
std::map<Player*, Position> playerTeleport;
|
||||
@@ -1444,7 +1444,7 @@ void WorldSession::HandleSetRaidDifficultyOpcode(WorldPacket& recv_data)
|
||||
oldMap->AfterPlayerUnlinkFromMap();
|
||||
p->SetMap(homeMap0);
|
||||
p->Relocate(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
if (!p->TeleportTo(571, 5790.20f, 2071.36f, 636.07f, 3.60f))
|
||||
if (!p->TeleportTo(MAP_NORTHREND, 5790.20f, 2071.36f, 636.07f, 3.60f))
|
||||
p->GetSession()->KickPlayer("HandleSetRaidDifficultyOpcode 1");
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,273 @@
|
||||
/*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef ACORE_AREA_DEFINES_H
|
||||
#define ACORE_AREA_DEFINES_H
|
||||
|
||||
#include "Define.h"
|
||||
|
||||
enum AreaTableIDs : uint32
|
||||
{
|
||||
AREA_DUN_MOROGH = 1,
|
||||
AREA_BADLANDS = 3,
|
||||
AREA_BLASTED_LANDS = 4,
|
||||
AREA_SWAMP_OF_SORROWS = 8,
|
||||
AREA_DUSKWOOD = 10,
|
||||
AREA_WETLANDS = 11,
|
||||
AREA_ELWYNN_FOREST = 12,
|
||||
AREA_DUROTAR = 14,
|
||||
AREA_DUSTWALLOW_MARSH = 15,
|
||||
AREA_THE_BARRENS = 17,
|
||||
AREA_WESTERN_PLAGUELANDS = 28,
|
||||
AREA_STRANGLETHORN_VALE = 33,
|
||||
AREA_LOCH_MODAN = 38,
|
||||
AREA_WESTFALL = 40,
|
||||
AREA_REDRIDGE_MOUNTAINS = 44,
|
||||
AREA_ARATHI_HIGHLANDS = 45,
|
||||
AREA_BURNING_STEPPES = 46,
|
||||
AREA_THE_HINTERLANDS = 47,
|
||||
AREA_SEARING_GORGE = 51,
|
||||
AREA_DRAGONBLIGHT = 65,
|
||||
AREA_ZUL_DRAK = 66,
|
||||
AREA_THE_STORM_PEAKS = 67,
|
||||
AREA_TIRISFAL_GLADES = 85,
|
||||
AREA_GOLDSHIRE = 87,
|
||||
AREA_WESTFALL_LIGHTHOUSE = 115,
|
||||
AREA_SILVERPINE_FOREST = 130,
|
||||
AREA_KHARANOS = 131,
|
||||
AREA_EASTERN_PLAGUELANDS = 139,
|
||||
AREA_TELDRASSIL = 141,
|
||||
AREA_DARKSHORE = 148,
|
||||
AREA_BRILL = 159,
|
||||
AREA_FELSTONE_FIELD = 199,
|
||||
AREA_DALSONS_TEARS = 200,
|
||||
AREA_GAHRRONS_WITHERING = 201,
|
||||
AREA_THE_WRITHING_HAUNT = 202,
|
||||
AREA_MULGORE = 215,
|
||||
AREA_HILLSBRAD_FOOTHILLS = 267,
|
||||
AREA_ASHENVALE = 331,
|
||||
AREA_FERALAS = 357,
|
||||
AREA_RAZOR_HILL = 362,
|
||||
AREA_CAMP_TAURAJO = 378,
|
||||
AREA_THE_CROSSROADS = 380,
|
||||
AREA_THE_MERCHANT_COAST = 391,
|
||||
AREA_GRIZZLY_HILLS = 394,
|
||||
AREA_THOUSAND_NEEDLES = 400,
|
||||
AREA_DESOLACE = 405,
|
||||
AREA_STONETALON_MOUNTAINS = 406,
|
||||
AREA_TANARIS = 440,
|
||||
AREA_MOONGLADE = 493,
|
||||
AREA_HOWLING_FJORD = 495,
|
||||
AREA_WINTERSPRING = 618,
|
||||
AREA_GATES_OF_IRONFORGE = 809,
|
||||
AREA_ROCKTUSK_FARM = 1296,
|
||||
AREA_SILITHUS = 1377,
|
||||
AREA_UNDERCITY = 1497,
|
||||
AREA_STORMWIND_CITY = 1519,
|
||||
AREA_IRONFORGE = 1537,
|
||||
AREA_ORGRIMMAR = 1637,
|
||||
AREA_THUNDER_BLUFF = 1638,
|
||||
AREA_DARNASSUS = 1657,
|
||||
AREA_STRATHOLME = 2017,
|
||||
AREA_SCHOLOMANCE = 2057,
|
||||
AREA_ALCAZ_ISLAND = 2079,
|
||||
AREA_DEEPRUN_TRAM = 2257,
|
||||
AREA_ALTERAC_VALLEY = 2597,
|
||||
AREA_CRYSTALSONG_FOREST = 2817,
|
||||
AREA_WARSONG_GULCH = 3277,
|
||||
AREA_ARATHI_BASIN = 3358,
|
||||
AREA_AHN_QIRAJ = 3428,
|
||||
AREA_RUINS_OF_AHN_QIRAJ = 3429,
|
||||
AREA_EVERSONG_WOODS = 3430,
|
||||
AREA_GHOSTLANDS = 3433,
|
||||
AREA_HELLFIRE_PENINSULA = 3483,
|
||||
AREA_NAGRAND = 3518,
|
||||
AREA_TEROKKAR_FOREST = 3519,
|
||||
AREA_SHADOWMOON_VALLEY = 3520,
|
||||
AREA_ZANGARMARSH = 3521,
|
||||
AREA_BLADES_EDGE_MOUNTAINS = 3522,
|
||||
AREA_NETHERSTORM = 3523,
|
||||
AREA_AZUREMYST_ISLE = 3524,
|
||||
AREA_BLOODMYST_ISLE = 3525,
|
||||
AREA_BOREAN_TUNDRA = 3537,
|
||||
AREA_THE_EXODAR = 3557,
|
||||
AREA_HELLFIRE_RAMPARTS = 3562,
|
||||
AREA_HELLFIRE_CITADEL = 3563,
|
||||
AREA_AZURE_WATCH = 3576,
|
||||
AREA_SERPENTSHRINE_CAVERN = 3607,
|
||||
AREA_HALAA = 3628,
|
||||
AREA_FALCONWING_SQUARE = 3665,
|
||||
AREA_NAGRAND_ARENA = 3698,
|
||||
AREA_BLADES_EDGE_ARENA = 3702,
|
||||
AREA_SHATTRATH_CITY = 3703,
|
||||
AREA_NORDRASSIL = 3710,
|
||||
AREA_SHOLAZAR_BASIN = 3711,
|
||||
AREA_THE_BLOOD_FURNACE = 3713,
|
||||
AREA_THE_SHATTERED_HALLS = 3714,
|
||||
AREA_THE_STEAMVAULT = 3715,
|
||||
AREA_THE_UNDERBOG = 3716,
|
||||
AREA_THE_SLAVE_PENS = 3717,
|
||||
AREA_SOCRETHARS_SEAT = 3742,
|
||||
AREA_SHADOW_LABYRINTH = 3789,
|
||||
AREA_AUCHENAI_CRYPTS = 3790,
|
||||
AREA_SETHEKK_HALLS = 3791,
|
||||
AREA_MANA_TOMBS = 3792,
|
||||
AREA_EYE_OF_THE_STORM = 3820,
|
||||
AREA_MAGTHERIDONS_LAIR = 3836,
|
||||
AREA_THE_BOTANICA = 3847,
|
||||
AREA_THE_ARCATRAZ = 3848,
|
||||
AREA_THE_MECHANAR = 3849,
|
||||
AREA_INVASION_POINT_OVERLORD = 3900,
|
||||
AREA_RUINS_OF_LORDAERON = 3968,
|
||||
AREA_SHATTERED_STRAITS = 4064,
|
||||
AREA_SUNWELL_PLATEAU = 4075,
|
||||
AREA_ISLE_OF_QUEL_DANAS = 4080,
|
||||
AREA_THE_CULLING_OF_STRATHOLME = 4100,
|
||||
AREA_NAXXANAR = 4128,
|
||||
AREA_MAGISTERS_TERRACE = 4131,
|
||||
AREA_WINTERGARDE_KEEP = 4177,
|
||||
AREA_WINTERGRASP = 4197,
|
||||
AREA_THE_OCULUS = 4228,
|
||||
AREA_ULDUAR = 4273,
|
||||
AREA_PLAGUELANDS_THE_SCARLET_ENCLAVE = 4298,
|
||||
AREA_DALARAN_ARENA = 4378,
|
||||
AREA_STRAND_OF_THE_ANCIENTS = 4384,
|
||||
AREA_DALARAN = 4395,
|
||||
ARENA_THE_RING_OF_VALOR = 4406,
|
||||
AREA_THE_VIOLET_HOLD = 4415,
|
||||
AREA_VALLEY_OF_ANCIENT_WINTERS = 4437,
|
||||
AREA_THE_SUNKEN_RING = 4538,
|
||||
AREA_THE_BROKEN_TEMPLE = 4539,
|
||||
AREA_SEWER_EXIT_PIPE = 4569,
|
||||
AREA_WINTERGRASP_FORTRESS = 4575,
|
||||
AREA_THE_CHILLED_QUAGMIRE = 4589,
|
||||
AREA_WESTSPARK_WORKSHOP = 4611,
|
||||
AREA_EASTSPARK_WORKSHOP = 4612,
|
||||
AREA_VARGOTHS_RETREAT = 4637,
|
||||
AREA_FORMATION_GROUNDS = 4652,
|
||||
AREA_THE_CONSERVATORY_OF_LIFE = 4656,
|
||||
AREA_ARGENT_TOURNAMENT_GROUNDS = 4658,
|
||||
AREA_THE_RING_OF_CHAMPIONS = 4669,
|
||||
AREA_THE_ASPIRANTS_RING = 4670,
|
||||
AREA_THE_ARGENT_VALIANTS_RING = 4671,
|
||||
AREA_THE_ALLIANCE_VALIANTS_RING = 4672,
|
||||
AREA_THE_HORDE_VALIANTS_RING = 4673,
|
||||
AREA_SUNREAVER_PAVILION = 4676,
|
||||
AREA_SILVER_COVENANT_PAVILION = 4677,
|
||||
AREA_ISLE_OF_CONQUEST = 4710,
|
||||
AREA_ICECROWN_CITADEL = 4812,
|
||||
AREA_HALLS_OF_REFLECTION = 4820,
|
||||
AREA_THE_FROZEN_THRONE = 4859,
|
||||
AREA_THE_FROST_QUEENS_LAIR = 4889,
|
||||
AREA_PUTRICIDES_LABORATORY_OF_ALCHEMICAL_HORRORS_AND_FUN = 4890,
|
||||
AREA_THE_SANCTUM_OF_BLOOD = 4891,
|
||||
AREA_FROSTMOURNE = 4910,
|
||||
AREA_THE_RUBY_SANCTUM = 4987
|
||||
};
|
||||
|
||||
enum MapIDs : uint32
|
||||
{
|
||||
MAP_EASTERN_KINGDOMS = 0,
|
||||
MAP_KALIMDOR = 1,
|
||||
MAP_SCOTT_TEST = 25,
|
||||
MAP_ALTERAC_VALLEY = 30,
|
||||
MAP_SHADOWFANG_KEEP = 33,
|
||||
MAP_STORMWIND_STOCKADE = 34,
|
||||
MAP_DEADMINES = 36,
|
||||
MAP_WAILING_CAVERNS = 43,
|
||||
MAP_RAZORFEN_KRAUL = 47,
|
||||
MAP_BLACKFATHOM_DEEPS = 48,
|
||||
MAP_ULDAMAN = 70,
|
||||
MAP_GNOMEREGAN = 90,
|
||||
MAP_SUNKEN_TEMPLE = 109,
|
||||
MAP_RAZORFEN_DOWNS = 129,
|
||||
MAP_SCARLET_MONASTERY = 189,
|
||||
MAP_ZUL_FARRAK = 209,
|
||||
MAP_BLACKROCK_SPIRE = 229,
|
||||
MAP_BLACKROCK_DEPTHS = 230,
|
||||
MAP_ONYXIAS_LAIR = 249,
|
||||
MAP_OPENING_OF_THE_DARK_PORTAL = 269,
|
||||
MAP_SCHOLOMANCE = 289,
|
||||
MAP_ZUL_GURUB = 309,
|
||||
MAP_STRATHOLME = 329,
|
||||
MAP_MARAUDON = 349,
|
||||
MAP_RAGEFIRE_CHASM = 389,
|
||||
MAP_MOLTEN_CORE = 409,
|
||||
MAP_DIRE_MAUL = 429,
|
||||
MAP_BLACKWING_LAIR = 469,
|
||||
MAP_WARSONG_GULCH = 489,
|
||||
MAP_RUINS_OF_AHN_QIRAJ = 509,
|
||||
MAP_ARATHI_BASIN = 529,
|
||||
MAP_OUTLAND = 530,
|
||||
MAP_AHN_QIRAJ_TEMPLE = 531,
|
||||
MAP_KARAZHAN = 532,
|
||||
MAP_NAXXRAMAS = 533,
|
||||
MAP_THE_BATTLE_FOR_MOUNT_HYJAL = 534,
|
||||
MAP_HELLFIRE_CITADEL_THE_SHATTERED_HALLS = 540,
|
||||
MAP_HELLFIRE_CITADEL_THE_BLOOD_FURNACE = 542,
|
||||
MAP_HELLFIRE_CITADEL_RAMPARTS = 543,
|
||||
MAP_MAGTHERIDONS_LAIR = 544,
|
||||
MAP_COILFANG_THE_STEAMVAULT = 545,
|
||||
MAP_COILFANG_THE_UNDERBOG = 546,
|
||||
MAP_COILFANG_THE_SLAVE_PENS = 547,
|
||||
MAP_COILFANG_SERPENTSHRINE_CAVERN = 548,
|
||||
MAP_TEMPEST_KEEP = 550,
|
||||
MAP_TEMPEST_KEEP_THE_ARCATRAZ = 552,
|
||||
MAP_TEMPEST_KEEP_THE_BOTANICA = 553,
|
||||
MAP_TEMPEST_KEEP_THE_MECHANAR = 554,
|
||||
MAP_AUCHINDOUN_SHADOW_LABYRINTH = 555,
|
||||
MAP_AUCHINDOUN_SETHEKK_HALLS = 556,
|
||||
MAP_AUCHINDOUN_MANA_TOMBS = 557,
|
||||
MAP_AUCHINDOUN_AUCHENAI_CRYPTS = 558,
|
||||
MAP_THE_ESCAPE_FROM_DURNHOLDE = 560,
|
||||
MAP_BLACK_TEMPLE = 564,
|
||||
MAP_GRUULS_LAIR = 565,
|
||||
MAP_EYE_OF_THE_STORM = 566,
|
||||
MAP_ZUL_AMAN = 568,
|
||||
MAP_NORTHREND = 571,
|
||||
MAP_UTGARDE_KEEP = 574,
|
||||
MAP_UTGARDE_PINNACLE = 575,
|
||||
MAP_THE_NEXUS = 576,
|
||||
MAP_THE_OCULUS = 578,
|
||||
MAP_THE_SUNWELL = 580,
|
||||
MAP_MAGISTERS_TERRACE = 585,
|
||||
MAP_THE_CULLING_OF_STRATHOLME = 595,
|
||||
MAP_HALLS_OF_STONE = 599,
|
||||
MAP_DRAK_THARON_KEEP = 600,
|
||||
MAP_AZJOL_NERUB = 601,
|
||||
MAP_HALLS_OF_LIGHTNING = 602,
|
||||
MAP_ULDUAR = 603,
|
||||
MAP_GUNDRAK = 604,
|
||||
MAP_STRAND_OF_THE_ANCIENTS = 607,
|
||||
MAP_VIOLET_HOLD = 608,
|
||||
MAP_EBON_HOLD = 609,
|
||||
MAP_THE_OBSIDIAN_SANCTUM = 615,
|
||||
MAP_THE_EYE_OF_ETERNITY = 616,
|
||||
MAP_THE_RING_OF_VALOR = 618,
|
||||
MAP_AHN_KAHET_THE_OLD_KINGDOM = 619,
|
||||
MAP_VAULT_OF_ARCHAVON = 624,
|
||||
MAP_ISLE_OF_CONQUEST = 628,
|
||||
MAP_ICECROWN_CITADEL = 631,
|
||||
MAP_THE_FORGE_OF_SOULS = 632,
|
||||
MAP_TRIAL_OF_THE_CRUSADER = 649,
|
||||
MAP_TRIAL_OF_THE_CHAMPION = 650,
|
||||
MAP_PIT_OF_SARON = 658,
|
||||
MAP_HALLS_OF_REFLECTION = 668,
|
||||
MAP_THE_RUBY_SANCTUM = 724
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -102,10 +102,10 @@ void Map::InitVisibilityDistance()
|
||||
|
||||
switch (GetId())
|
||||
{
|
||||
case 609: // Scarlet Enclave (DK starting zone)
|
||||
case MAP_EBON_HOLD: // Scarlet Enclave (DK starting zone)
|
||||
m_VisibleDistance = 125.0f;
|
||||
break;
|
||||
case 25: // Scott Test (box map)
|
||||
case MAP_SCOTT_TEST: // (box map)
|
||||
m_VisibleDistance = 200.0f;
|
||||
break;
|
||||
}
|
||||
@@ -1370,7 +1370,7 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
|
||||
if (liquid_level > ground_level && G3D::fuzzyGe(z, ground_level - GROUND_HEIGHT_TOLERANCE))
|
||||
{
|
||||
// hardcoded in client like this
|
||||
if (GetId() == 530 && liquid_type == 2)
|
||||
if (GetId() == MAP_OUTLAND && liquid_type == 2)
|
||||
liquid_type = 15;
|
||||
|
||||
uint32 liquidFlagType = 0;
|
||||
@@ -1426,7 +1426,7 @@ LiquidData const Map::GetLiquidData(uint32 phaseMask, float x, float y, float z,
|
||||
{
|
||||
// hardcoded in client like this
|
||||
uint32 liquidEntry = map_data.Entry;
|
||||
if (GetId() == 530 && liquidEntry == 2)
|
||||
if (GetId() == MAP_OUTLAND && liquidEntry == 2)
|
||||
liquidEntry = 15;
|
||||
|
||||
liquidData = map_data;
|
||||
@@ -1523,7 +1523,7 @@ void Map::GetFullTerrainStatusForPosition(uint32 /*phaseMask*/, float x, float y
|
||||
if (wmoData && wmoData->liquidInfo && wmoData->liquidInfo->level > wmoData->floorZ)
|
||||
{
|
||||
uint32 liquidType = wmoData->liquidInfo->type;
|
||||
if (GetId() == 530 && liquidType == 2) // gotta love blizzard hacks
|
||||
if (GetId() == MAP_OUTLAND && liquidType == 2) // gotta love blizzard hacks
|
||||
liquidType = 15;
|
||||
|
||||
uint32 liquidFlagType = 0;
|
||||
@@ -1572,7 +1572,7 @@ void Map::GetFullTerrainStatusForPosition(uint32 /*phaseMask*/, float x, float y
|
||||
if (gridLiquidData.Status != LIQUID_MAP_NO_WATER && (!wmoData || gridLiquidData.Level > wmoData->floorZ))
|
||||
{
|
||||
uint32 liquidEntry = gridLiquidData.Entry;
|
||||
if (GetId() == 530 && liquidEntry == 2)
|
||||
if (GetId() == MAP_OUTLAND && liquidEntry == 2)
|
||||
liquidEntry = 15;
|
||||
|
||||
data.liquidInfo = gridLiquidData;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "Formulas.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "Battleground.h"
|
||||
#include "Creature.h"
|
||||
#include "Log.h"
|
||||
@@ -98,22 +99,22 @@ uint32 Acore::XP::Gain(Player* player, Unit* unit, bool isBattleGround /*= false
|
||||
{
|
||||
switch (player->GetMapId())
|
||||
{
|
||||
case MAP_BG_ALTERAC_VALLEY:
|
||||
case MAP_ALTERAC_VALLEY:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_AV);
|
||||
break;
|
||||
case MAP_BG_WARSONG_GULCH:
|
||||
case MAP_WARSONG_GULCH:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_WSG);
|
||||
break;
|
||||
case MAP_BG_ARATHI_BASIN:
|
||||
case MAP_ARATHI_BASIN:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_AB);
|
||||
break;
|
||||
case MAP_BG_EYE_OF_THE_STORM:
|
||||
case MAP_EYE_OF_THE_STORM:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_EOTS);
|
||||
break;
|
||||
case MAP_BG_STRAND_OF_THE_ANCIENTS:
|
||||
case MAP_STRAND_OF_THE_ANCIENTS:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_SOTA);
|
||||
break;
|
||||
case MAP_BG_ISLE_OF_CONQUEST:
|
||||
case MAP_ISLE_OF_CONQUEST:
|
||||
xpMod *= sWorld->getRate(RATE_XP_BG_KILL_IC);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -630,7 +630,7 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
_player->RepopAtGraveyard();
|
||||
|
||||
sOutdoorPvPMgr->HandlePlayerLeaveZone(_player, _player->GetZoneId());
|
||||
sWorldState->HandlePlayerLeaveZone(_player, static_cast<WorldStateZoneId>(_player->GetZoneId()));
|
||||
sWorldState->HandlePlayerLeaveZone(_player, static_cast<AreaTableIDs>(_player->GetZoneId()));
|
||||
|
||||
// pussywizard: remove from battleground queues on logout
|
||||
for (int i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
#include "SpellAuraEffects.h"
|
||||
#include "AreaDefines.h"
|
||||
#include "BattlefieldMgr.h"
|
||||
#include "Battleground.h"
|
||||
#include "CellImpl.h"
|
||||
@@ -2018,7 +2019,7 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
|
||||
if (modelid > 0)
|
||||
{
|
||||
bool allow = true;
|
||||
if (target->getTransForm() && !(target->GetMapId() == 560 /*The Escape From Durnholde*/))
|
||||
if (target->getTransForm() && !(target->GetMapId() == MAP_THE_ESCAPE_FROM_DURNHOLDE))
|
||||
if (SpellInfo const* transformSpellInfo = sSpellMgr->GetSpellInfo(target->getTransForm()))
|
||||
if (transformSpellInfo->HasAttribute(SPELL_ATTR0_NO_IMMUNITIES) || !transformSpellInfo->IsPositive())
|
||||
allow = false;
|
||||
|
||||
@@ -1548,9 +1548,9 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
{
|
||||
case 23333: // Warsong Flag
|
||||
case 23335: // Silverwing Flag
|
||||
return map_id == 489 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
return map_id == MAP_WARSONG_GULCH && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
case 34976: // Netherstorm Flag
|
||||
return map_id == 566 && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
return map_id == MAP_EYE_OF_THE_STORM && player && player->InBattleground() ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
case 2584: // Waiting to Resurrect
|
||||
case 22011: // Spirit Heal Channel
|
||||
case 22012: // Spirit Heal
|
||||
@@ -1562,7 +1562,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
|
||||
if (!mapEntry)
|
||||
return SPELL_FAILED_INCORRECT_AREA;
|
||||
|
||||
return zone_id == 4197 || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
return zone_id == AREA_WINTERGRASP || (mapEntry->IsBattleground() && player && player->InBattleground()) ? SPELL_CAST_OK : SPELL_FAILED_REQUIRES_AREA;
|
||||
}
|
||||
case 32724: // Gold Team (Alliance)
|
||||
case 32725: // Green Team (Alliance)
|
||||
|
||||
@@ -1300,15 +1300,15 @@ void World::SetInitialWorldSettings()
|
||||
if (!sConfigMgr->isDryRun())
|
||||
{
|
||||
///- Check the existence of the map files for all starting areas.
|
||||
if (!MapMgr::ExistMapAndVMap(0, -6240.32f, 331.033f)
|
||||
|| !MapMgr::ExistMapAndVMap(0, -8949.95f, -132.493f)
|
||||
|| !MapMgr::ExistMapAndVMap(1, -618.518f, -4251.67f)
|
||||
|| !MapMgr::ExistMapAndVMap(0, 1676.35f, 1677.45f)
|
||||
|| !MapMgr::ExistMapAndVMap(1, 10311.3f, 832.463f)
|
||||
|| !MapMgr::ExistMapAndVMap(1, -2917.58f, -257.98f)
|
||||
if (!MapMgr::ExistMapAndVMap(MAP_EASTERN_KINGDOMS, -6240.32f, 331.033f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_EASTERN_KINGDOMS, -8949.95f, -132.493f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_KALIMDOR, -618.518f, -4251.67f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_EASTERN_KINGDOMS, 1676.35f, 1677.45f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_KALIMDOR, 10311.3f, 832.463f)
|
||||
|| !MapMgr::ExistMapAndVMap(MAP_KALIMDOR, -2917.58f, -257.98f)
|
||||
|| (_int_configs[CONFIG_EXPANSION] && (
|
||||
!MapMgr::ExistMapAndVMap(530, 10349.6f, -6357.29f) ||
|
||||
!MapMgr::ExistMapAndVMap(530, -3961.64f, -13931.2f))))
|
||||
!MapMgr::ExistMapAndVMap(MAP_OUTLAND, 10349.6f, -6357.29f) ||
|
||||
!MapMgr::ExistMapAndVMap(MAP_OUTLAND, -3961.64f, -13931.2f))))
|
||||
{
|
||||
LOG_ERROR("server.loading", "Failed to find map files for starting areas");
|
||||
exit(1);
|
||||
|
||||
@@ -247,32 +247,32 @@ void WorldState::Update(uint32 diff)
|
||||
}
|
||||
}
|
||||
|
||||
void WorldState::HandlePlayerEnterZone(Player* player, WorldStateZoneId zoneId)
|
||||
void WorldState::HandlePlayerEnterZone(Player* player, AreaTableIDs zoneId)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(_mutex);
|
||||
switch (zoneId)
|
||||
{
|
||||
case ZONEID_SHATTRATH:
|
||||
case ZONEID_BOTANICA:
|
||||
case ZONEID_MECHANAR:
|
||||
case ZONEID_ARCATRAZ:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
case AREA_THE_BOTANICA:
|
||||
case AREA_THE_MECHANAR:
|
||||
case AREA_THE_ARCATRAZ:
|
||||
if (_adalSongOfBattleTimer)
|
||||
player->CastSpell(player, SPELL_ADAL_SONG_OF_BATTLE, true);
|
||||
break;
|
||||
case ZONEID_HELLFIRE_PENINSULA:
|
||||
case ZONEID_HELLFIRE_RAMPARTS:
|
||||
case ZONEID_HELLFIRE_CITADEL:
|
||||
case ZONEID_BLOOD_FURNACE:
|
||||
case ZONEID_SHATTERED_HALLS:
|
||||
case ZONEID_MAGTHERIDON_LAIR:
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
case AREA_HELLFIRE_RAMPARTS:
|
||||
case AREA_HELLFIRE_CITADEL:
|
||||
case AREA_THE_BLOOD_FURNACE:
|
||||
case AREA_THE_SHATTERED_HALLS:
|
||||
case AREA_MAGTHERIDONS_LAIR:
|
||||
if (_isMagtheridonHeadSpawnedAlliance && player->GetTeamId() == TEAM_ALLIANCE)
|
||||
player->CastSpell(player, SPELL_TROLLBANES_COMMAND, true);
|
||||
else if (_isMagtheridonHeadSpawnedHorde && player->GetTeamId() == TEAM_HORDE)
|
||||
player->CastSpell(player, SPELL_NAZGRELS_FAVOR, true);
|
||||
break;
|
||||
case ZONEID_ISLE_OF_QUEL_DANAS:
|
||||
case ZONEID_MAGISTERS_TERRACE:
|
||||
case ZONEID_SUNWELL_PLATEAU:
|
||||
case AREA_ISLE_OF_QUEL_DANAS:
|
||||
case AREA_MAGISTERS_TERRACE:
|
||||
case AREA_SUNWELL_PLATEAU:
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(m_sunsReachData.m_sunsReachReclamationMutex);
|
||||
m_sunsReachData.m_sunsReachReclamationPlayers.push_back(player->GetGUID());
|
||||
@@ -284,33 +284,32 @@ void WorldState::HandlePlayerEnterZone(Player* player, WorldStateZoneId zoneId)
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
void WorldState::HandlePlayerLeaveZone(Player* player, WorldStateZoneId zoneId)
|
||||
void WorldState::HandlePlayerLeaveZone(Player* player, AreaTableIDs zoneId)
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(_mutex);
|
||||
switch (zoneId)
|
||||
{
|
||||
case ZONEID_SHATTRATH:
|
||||
case ZONEID_BOTANICA:
|
||||
case ZONEID_MECHANAR:
|
||||
case ZONEID_ARCATRAZ:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
case AREA_THE_BOTANICA:
|
||||
case AREA_THE_MECHANAR:
|
||||
case AREA_THE_ARCATRAZ:
|
||||
if (!_adalSongOfBattleTimer)
|
||||
player->RemoveAurasDueToSpell(SPELL_ADAL_SONG_OF_BATTLE);
|
||||
break;
|
||||
case ZONEID_HELLFIRE_PENINSULA:
|
||||
case ZONEID_HELLFIRE_RAMPARTS:
|
||||
case ZONEID_HELLFIRE_CITADEL:
|
||||
case ZONEID_BLOOD_FURNACE:
|
||||
case ZONEID_SHATTERED_HALLS:
|
||||
case ZONEID_MAGTHERIDON_LAIR:
|
||||
case AREA_HELLFIRE_PENINSULA:
|
||||
case AREA_HELLFIRE_RAMPARTS:
|
||||
case AREA_HELLFIRE_CITADEL:
|
||||
case AREA_THE_BLOOD_FURNACE:
|
||||
case AREA_THE_SHATTERED_HALLS:
|
||||
case AREA_MAGTHERIDONS_LAIR:
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE)
|
||||
player->RemoveAurasDueToSpell(SPELL_TROLLBANES_COMMAND);
|
||||
else if (player->GetTeamId() == TEAM_HORDE)
|
||||
player->RemoveAurasDueToSpell(SPELL_NAZGRELS_FAVOR);
|
||||
break;
|
||||
case ZONEID_ISLE_OF_QUEL_DANAS:
|
||||
case ZONEID_MAGISTERS_TERRACE:
|
||||
case ZONEID_SUNWELL_PLATEAU:
|
||||
case AREA_ISLE_OF_QUEL_DANAS:
|
||||
case AREA_MAGISTERS_TERRACE:
|
||||
case AREA_SUNWELL_PLATEAU:
|
||||
{
|
||||
std::lock_guard<std::mutex> guard(m_sunsReachData.m_sunsReachReclamationMutex);
|
||||
player->RemoveAurasDueToSpell(SPELL_KIRU_SONG_OF_VICTORY);
|
||||
@@ -330,19 +329,19 @@ void WorldState::BuffMagtheridonTeam(TeamId team)
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
player->CastSpell(player, SPELL_TROLLBANES_COMMAND, true);
|
||||
else if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
else if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
player->CastSpell(player, SPELL_NAZGRELS_FAVOR, true);
|
||||
});
|
||||
break;
|
||||
case 540: // The Shattered Halls
|
||||
case 542: // The Blood Furnace
|
||||
case 543: // Ramparts
|
||||
case 544: // Magtheridon's Lair
|
||||
case MAP_HELLFIRE_CITADEL_THE_SHATTERED_HALLS:
|
||||
case MAP_HELLFIRE_CITADEL_THE_BLOOD_FURNACE:
|
||||
case MAP_HELLFIRE_CITADEL_RAMPARTS:
|
||||
case MAP_MAGTHERIDONS_LAIR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
@@ -363,19 +362,19 @@ void WorldState::DispelMagtheridonTeam(TeamId team)
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
player->RemoveAurasDueToSpell(SPELL_TROLLBANES_COMMAND);
|
||||
else if (player->GetZoneId() == ZONEID_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
else if (player->GetZoneId() == AREA_HELLFIRE_PENINSULA && player->GetTeamId() == TEAM_HORDE && team == TEAM_HORDE)
|
||||
player->RemoveAurasDueToSpell(SPELL_NAZGRELS_FAVOR);
|
||||
});
|
||||
break;
|
||||
case 540: // The Shattered Halls
|
||||
case 542: // The Blood Furnace
|
||||
case 543: // Ramparts
|
||||
case 544: // Magtheridon's Lair
|
||||
case MAP_HELLFIRE_CITADEL_THE_SHATTERED_HALLS:
|
||||
case MAP_HELLFIRE_CITADEL_THE_BLOOD_FURNACE:
|
||||
case MAP_HELLFIRE_CITADEL_RAMPARTS:
|
||||
case MAP_MAGTHERIDONS_LAIR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetTeamId() == TEAM_ALLIANCE && team == TEAM_ALLIANCE)
|
||||
@@ -396,16 +395,16 @@ void WorldState::BuffAdalsSongOfBattle()
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_SHATTRATH)
|
||||
if (player->GetZoneId() == AREA_SHATTRATH_CITY)
|
||||
player->CastSpell(player, SPELL_ADAL_SONG_OF_BATTLE, true);
|
||||
});
|
||||
break;
|
||||
case 552: // Arcatraz
|
||||
case 553: // Botanica
|
||||
case 554: // Mechanar
|
||||
case MAP_TEMPEST_KEEP_THE_ARCATRAZ:
|
||||
case MAP_TEMPEST_KEEP_THE_BOTANICA:
|
||||
case MAP_TEMPEST_KEEP_THE_MECHANAR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
player->CastSpell(player, SPELL_ADAL_SONG_OF_BATTLE, true);
|
||||
@@ -423,16 +422,16 @@ void WorldState::DispelAdalsSongOfBattle()
|
||||
{
|
||||
switch (map->GetId())
|
||||
{
|
||||
case 530: // Outland
|
||||
case MAP_OUTLAND:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (player->GetZoneId() == ZONEID_SHATTRATH)
|
||||
if (player->GetZoneId() == AREA_SHATTRATH_CITY)
|
||||
player->RemoveAurasDueToSpell(SPELL_ADAL_SONG_OF_BATTLE);
|
||||
});
|
||||
break;
|
||||
case 552: // Arcatraz
|
||||
case 553: // Botanica
|
||||
case 554: // Mechanar
|
||||
case MAP_TEMPEST_KEEP_THE_ARCATRAZ:
|
||||
case MAP_TEMPEST_KEEP_THE_BOTANICA:
|
||||
case MAP_TEMPEST_KEEP_THE_MECHANAR:
|
||||
map->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
player->RemoveAurasDueToSpell(SPELL_ADAL_SONG_OF_BATTLE);
|
||||
@@ -823,22 +822,22 @@ void WorldState::StartSunsReachPhase(bool initial)
|
||||
{
|
||||
case SUNS_REACH_PHASE_1_STAGING_AREA:
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_1);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_MEDIUM_RAIN, 0.75f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_MEDIUM_RAIN, 0.75f);
|
||||
break;
|
||||
case SUNS_REACH_PHASE_2_SANCTUM:
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_2_ONLY);
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_2_PERMANENT);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.5f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.5f);
|
||||
break;
|
||||
case SUNS_REACH_PHASE_3_ARMORY:
|
||||
if (initial)
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_2_PERMANENT);
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_3_ONLY); sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_3_PERMANENT);
|
||||
// TODO: Should be id 2 0.25f?
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.25f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_LIGHT_RAIN, 0.25f);
|
||||
break;
|
||||
case SUNS_REACH_PHASE_4_HARBOR:
|
||||
if (initial)
|
||||
@@ -847,8 +846,8 @@ void WorldState::StartSunsReachPhase(bool initial)
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_3_PERMANENT);
|
||||
}
|
||||
sGameEventMgr->StartEvent(GAME_EVENT_QUEL_DANAS_PHASE_4);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(530))
|
||||
map->SetZoneWeather(ZONEID_ISLE_OF_QUEL_DANAS, WEATHER_STATE_FINE, 0.0f);
|
||||
if (Map* map = sMapMgr->FindBaseNonInstanceMap(MAP_OUTLAND))
|
||||
map->SetZoneWeather(AREA_ISLE_OF_QUEL_DANAS, WEATHER_STATE_FINE, 0.0f);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
@@ -1092,10 +1091,10 @@ void WorldState::FillInitialWorldStates(WorldPackets::WorldState::InitWorldState
|
||||
{
|
||||
switch (zoneId)
|
||||
{
|
||||
case ZONEID_ISLE_OF_QUEL_DANAS:
|
||||
case ZONEID_MAGISTERS_TERRACE:
|
||||
case ZONEID_SUNWELL_PLATEAU:
|
||||
case ZONEID_SHATTRATH:
|
||||
case AREA_ISLE_OF_QUEL_DANAS:
|
||||
case AREA_MAGISTERS_TERRACE:
|
||||
case AREA_SUNWELL_PLATEAU:
|
||||
case AREA_SHATTRATH_CITY:
|
||||
{
|
||||
// Sunwell Reclamation
|
||||
switch (m_sunsReachData.m_phase)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#ifndef WORLD_STATE_H
|
||||
#define WORLD_STATE_H
|
||||
|
||||
#include "AreaDefines.h"
|
||||
#include "Player.h"
|
||||
#include <atomic>
|
||||
|
||||
@@ -43,25 +44,6 @@ enum WorldStateEvent
|
||||
WORLD_STATE_CUSTOM_EVENT_ON_MAGTHERIDON_HEAD_DESPAWN = 184641,
|
||||
};
|
||||
|
||||
enum WorldStateZoneId
|
||||
{
|
||||
ZONEID_SHATTRATH = 3703,
|
||||
ZONEID_BOTANICA = 3847,
|
||||
ZONEID_ARCATRAZ = 3848,
|
||||
ZONEID_MECHANAR = 3849,
|
||||
|
||||
ZONEID_HELLFIRE_PENINSULA = 3483,
|
||||
ZONEID_HELLFIRE_RAMPARTS = 3562,
|
||||
ZONEID_HELLFIRE_CITADEL = 3563,
|
||||
ZONEID_BLOOD_FURNACE = 3713,
|
||||
ZONEID_SHATTERED_HALLS = 3714,
|
||||
ZONEID_MAGTHERIDON_LAIR = 3836,
|
||||
|
||||
ZONEID_ISLE_OF_QUEL_DANAS = 4080,
|
||||
ZONEID_MAGISTERS_TERRACE = 4131,
|
||||
ZONEID_SUNWELL_PLATEAU = 4075,
|
||||
};
|
||||
|
||||
enum WorldStateSpells
|
||||
{
|
||||
SPELL_ADAL_SONG_OF_BATTLE = 39953,
|
||||
@@ -182,8 +164,8 @@ class WorldState
|
||||
[[nodiscard]] uint64 getWorldState(uint32 index) const;
|
||||
void Save(WorldStateSaveIds saveId);
|
||||
void SaveHelper(std::string& stringToSave, WorldStateSaveIds saveId);
|
||||
void HandlePlayerEnterZone(Player* player, WorldStateZoneId zoneId);
|
||||
void HandlePlayerLeaveZone(Player* player, WorldStateZoneId zoneId);
|
||||
void HandlePlayerEnterZone(Player* player, AreaTableIDs zoneId);
|
||||
void HandlePlayerLeaveZone(Player* player, AreaTableIDs zoneId);
|
||||
bool IsConditionFulfilled(WorldStateCondition conditionId, WorldStateConditionState state = WORLD_STATE_CONDITION_STATE_NONE) const;
|
||||
void HandleConditionStateChange(WorldStateCondition conditionId, WorldStateConditionState state);
|
||||
void HandleExternalEvent(WorldStateEvent eventId, uint32 param);
|
||||
|
||||
Reference in New Issue
Block a user