OpenMetaverse.AgentManager.TeleportLureRespond C# (CSharp) Method

TeleportLureRespond() public method

Respond to a teleport lure by either accepting it and initiating the teleport, or denying it
public TeleportLureRespond ( UUID requesterID, bool accept ) : void
requesterID UUID of the avatar sending the lure
accept bool true to accept the lure, false to decline it
return void
        public void TeleportLureRespond(UUID requesterID, bool accept)
        {
            InstantMessage(Name, requesterID, String.Empty, UUID.Random(),
                accept ? InstantMessageDialog.AcceptTeleport : InstantMessageDialog.DenyTeleport,
                InstantMessageOnline.Offline, this.SimPosition, UUID.Zero, new byte[0]);

            if (accept)
            {
                TeleportLureRequestPacket lure = new TeleportLureRequestPacket();

                lure.Info.AgentID = Client.Self.AgentID;
                lure.Info.SessionID = Client.Self.SessionID;
                lure.Info.LureID = Client.Self.AgentID;
                lure.Info.TeleportFlags = (uint)TeleportFlags.ViaLure;

                Client.Network.SendPacket(lure);
            }
        }