Core/AreaTriggers: Teleport to current instance entrance when entering instances via areatrigger entity
Port From (https://github.com/TrinityCore/TrinityCore/commit/4e7508db7b70b2b79ee1fc77a1899d08173ffc62)
This commit is contained in:
@@ -802,7 +802,15 @@ namespace Game.Entities
|
||||
{
|
||||
Player player = caster.ToPlayer();
|
||||
if (player != null)
|
||||
{
|
||||
if (player.GetMapId() != safeLoc.Loc.GetMapId())
|
||||
{
|
||||
WorldSafeLocsEntry instanceEntrance = player.GetInstanceEntrance(safeLoc.Loc.GetMapId());
|
||||
if (instanceEntrance != null)
|
||||
safeLoc = instanceEntrance;
|
||||
}
|
||||
player.TeleportTo(safeLoc.Loc);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user