Core/Misc: Some refactoring

Port From (https://github.com/TrinityCore/TrinityCore/commit/94a79bac7a06aa0f931e9d651928de7eea0a8b5c)
This commit is contained in:
hondacrx
2022-01-06 20:07:26 -05:00
parent e51b775636
commit d2ba807c20
19 changed files with 585 additions and 477 deletions
+3 -3
View File
@@ -645,9 +645,9 @@ namespace Game.Chat.Commands
return false;
}
if (!GridDefines.IsValidMapCoord(goData.spawnPoint) || Global.ObjectMgr.IsTransportMap(goData.spawnPoint.GetMapId()))
if (!GridDefines.IsValidMapCoord(goData.MapId, goData.SpawnPoint) || Global.ObjectMgr.IsTransportMap(goData.MapId))
{
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, goData.spawnPoint.GetPositionX(), goData.spawnPoint.GetPositionY(), goData.spawnPoint.GetMapId());
handler.SendSysMessage(CypherStrings.InvalidTargetCoord, goData.SpawnPoint.GetPositionX(), goData.SpawnPoint.GetPositionY(), goData.MapId);
return false;
}
@@ -657,7 +657,7 @@ namespace Game.Chat.Commands
else
player.SaveRecallPosition(); // save only in non-flight case
player.TeleportTo(goData.spawnPoint);
player.TeleportTo(new WorldLocation(goData.MapId, goData.SpawnPoint));
return true;
}