mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 02:20:27 +00:00
Core/DBC Move WorldSafeLocs.dbc storage to DB (#932)
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
#include "SavingSystem.h"
|
||||
#include "TicketMgr.h"
|
||||
#include "ScriptMgr.h"
|
||||
#include "GameGraveyard.h"
|
||||
|
||||
#ifdef ELUNA
|
||||
#include "LuaEngine.h"
|
||||
@@ -5566,7 +5567,7 @@ void Player::RepopAtGraveyard()
|
||||
SpawnCorpseBones();
|
||||
}
|
||||
|
||||
WorldSafeLocsEntry const* ClosestGrave = NULL;
|
||||
GraveyardStruct const* ClosestGrave = NULL;
|
||||
|
||||
// Special handle for battleground maps
|
||||
if (Battleground* bg = GetBattleground())
|
||||
@@ -5576,7 +5577,7 @@ void Player::RepopAtGraveyard()
|
||||
if (sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId()))
|
||||
ClosestGrave = sBattlefieldMgr->GetBattlefieldToZoneId(GetZoneId())->GetClosestGraveyard(this);
|
||||
else
|
||||
ClosestGrave = sObjectMgr->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeamId());
|
||||
ClosestGrave = sGraveyard->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeamId());
|
||||
}
|
||||
|
||||
// stop countdown until repop
|
||||
@@ -5586,11 +5587,11 @@ void Player::RepopAtGraveyard()
|
||||
// and don't show spirit healer location
|
||||
if (ClosestGrave)
|
||||
{
|
||||
TeleportTo(ClosestGrave->map_id, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, GetOrientation());
|
||||
TeleportTo(ClosestGrave->Map, ClosestGrave->x, ClosestGrave->y, ClosestGrave->z, GetOrientation());
|
||||
if (isDead()) // not send if alive, because it used in TeleportTo()
|
||||
{
|
||||
WorldPacket data(SMSG_DEATH_RELEASE_LOC, 4*4); // show spirit healer position on minimap
|
||||
data << ClosestGrave->map_id;
|
||||
data << ClosestGrave->Map;
|
||||
data << ClosestGrave->x;
|
||||
data << ClosestGrave->y;
|
||||
data << ClosestGrave->z;
|
||||
@@ -22564,8 +22565,8 @@ void Player::SetEntryPoint()
|
||||
|
||||
if (GetMap()->IsDungeon())
|
||||
{
|
||||
if (const WorldSafeLocsEntry* entry = sObjectMgr->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeamId()))
|
||||
m_entryPointData.joinPos = WorldLocation(entry->map_id, entry->x, entry->y, entry->z, 0.0f);
|
||||
if (const GraveyardStruct* entry = sGraveyard->GetClosestGraveyard(GetPositionX(), GetPositionY(), GetPositionZ(), GetMapId(), GetTeamId()))
|
||||
m_entryPointData.joinPos = WorldLocation(entry->Map, entry->x, entry->y, entry->z, 0.0f);
|
||||
}
|
||||
else if (!GetMap()->IsBattlegroundOrArena())
|
||||
m_entryPointData.joinPos = WorldLocation(GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), GetOrientation());
|
||||
|
||||
Reference in New Issue
Block a user