mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
fix(Core/Graveyard): prevent non-death knights from getting ported to… (#8206)
This commit is contained in:
@@ -421,12 +421,9 @@ void WorldSession::SendSpiritResurrect()
|
||||
|
||||
// get corpse nearest graveyard
|
||||
GraveyardStruct const* corpseGrave = nullptr;
|
||||
WorldLocation corpseLocation = _player->GetCorpseLocation();
|
||||
if (_player->HasCorpse())
|
||||
{
|
||||
corpseGrave = sGraveyard->GetClosestGraveyard(corpseLocation.GetPositionX(), corpseLocation.GetPositionY(),
|
||||
corpseLocation.GetPositionZ(), corpseLocation.GetMapId(), _player->GetTeamId());
|
||||
}
|
||||
|
||||
// Search for any graveyards near the player's corpse.
|
||||
corpseGrave = sGraveyard->GetClosestGraveyard(_player, _player->GetTeamId(), _player->HasCorpse());
|
||||
|
||||
// now can spawn bones
|
||||
_player->SpawnCorpseBones();
|
||||
@@ -434,7 +431,7 @@ void WorldSession::SendSpiritResurrect()
|
||||
// teleport to nearest from corpse graveyard, if different from nearest to player ghost
|
||||
if (corpseGrave)
|
||||
{
|
||||
GraveyardStruct const* ghostGrave = sGraveyard->GetClosestGraveyard(_player->GetPositionX(), _player->GetPositionY(), _player->GetPositionZ(), _player->GetMapId(), _player->GetTeamId());
|
||||
GraveyardStruct const* ghostGrave = sGraveyard->GetClosestGraveyard(_player, _player->GetTeamId());
|
||||
|
||||
if (corpseGrave != ghostGrave)
|
||||
_player->TeleportTo(corpseGrave->Map, corpseGrave->x, corpseGrave->y, corpseGrave->z, _player->GetOrientation());
|
||||
|
||||
Reference in New Issue
Block a user