mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-19 14:39:43 -04:00
Core/Battlegrounds: Move to scripts (#29799)
* Introduce new BattlegroundScript class for map/bg specific scripts * Remove all sub, zone specific, battleground classes except Arena * Move all bg zone scripts to new BattlegroundScripts class in script folder * Remove ZoneScript from Battleground class * Remove some unused hooks from Battleground
This commit is contained in:
@@ -1418,15 +1418,11 @@ public:
|
||||
|
||||
if (linked)
|
||||
{
|
||||
if (Battleground* bg = player->GetBattleground())
|
||||
nearestLoc = bg->GetClosestGraveyard(player);
|
||||
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetMap(), player->GetZoneId()))
|
||||
nearestLoc = bf->GetClosestGraveyard(player);
|
||||
else
|
||||
{
|
||||
if (Battlefield* bf = sBattlefieldMgr->GetBattlefieldToZoneId(player->GetMap(), player->GetZoneId()))
|
||||
nearestLoc = bf->GetClosestGraveyard(player);
|
||||
else
|
||||
nearestLoc = sObjectMgr->GetClosestGraveyard(*player, player->GetTeam(), player);
|
||||
}
|
||||
nearestLoc = sObjectMgr->GetClosestGraveyard(*player, player->GetTeam(), player);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user