/// <summary> /// Turn the teleporter to face the player. /// </summary> /// <param name="player"></param> /// <returns></returns> public override bool Interact(GamePlayer player) { if (!base.Interact(player) || GameRelic.IsPlayerCarryingRelic(player)) { return(false); } TurnTo(player, 10000); return(true); }
/// <summary> /// Teleport the player to the designated coordinates. /// </summary> /// <param name="player"></param> /// <param name="destination"></param> protected virtual void OnTeleport(GamePlayer player, Teleport destination) { if (player.InCombat == false && GameRelic.IsPlayerCarryingRelic(player) == false) { player.LeaveHouse(); GameLocation currentLocation = new GameLocation("TeleportStart", player.CurrentRegionID, player.Position, player.Heading); player.MoveTo((ushort)destination.RegionID, destination.X, destination.Y, destination.Z, (ushort)destination.Heading); GameServer.ServerRules.OnPlayerTeleport(player, currentLocation, destination); } }
/// <summary> /// Talk to the teleporter. /// </summary> /// <param name="source"></param> /// <param name="text"></param> /// <returns></returns> public override bool WhisperReceive(GameLiving source, string text) { if (!base.WhisperReceive(source, text)) { return(false); } GamePlayer player = source as GamePlayer; if (player == null) { return(false); } if (GameRelic.IsPlayerCarryingRelic(player)) { return(false); } return(GetTeleportLocation(player, text)); }