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 "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");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user