Beispiel #1
0
        /// <summary>Raises the FriendFoundReply event</summary>
        /// <param name="e">A FriendFoundReplyEventArgs object containing the
        /// data returned from the data server</param>
        protected virtual void OnFriendFoundReply(FriendFoundReplyEventArgs e)
        {
            EventHandler <FriendFoundReplyEventArgs> handler = m_FriendFound;

            if (handler != null)
            {
                handler(this, e);
            }
        }
 /// <summary>Raises the FriendFoundReply event</summary>
 /// <param name="e">A FriendFoundReplyEventArgs object containing the
 /// data returned from the data server</param>
 protected virtual void OnFriendFoundReply(FriendFoundReplyEventArgs e)
 {
     EventHandler<FriendFoundReplyEventArgs> handler = m_FriendFound;
     if (handler != null)
         handler(this, e);
 }
Beispiel #3
0
 public void Friends_FriendFoundReply(object sender, FriendFoundReplyEventArgs e)
 {
     Hashtable item = new Hashtable();
     item.Add("MessageType", "FriendFound");
     item.Add("Location", e.Location);
     item.Add("RegionHandle", e.RegionHandle.ToString()); // String to avoid upsetting JavaScript.
     enqueue(item);
 }
Beispiel #4
0
        void Friends_FriendFoundReply(object sender, FriendFoundReplyEventArgs e)
        {
            if (mapFriend == null || mapFriend.UUID != e.AgentID) return;

            if (InvokeRequired)
            {
                if (!instance.MonoRuntime || IsHandleCreated)
                {
                    BeginInvoke(new MethodInvoker(() => Friends_FriendFoundReply(sender, e)));
                }
                return;
            }

            txtRegion.Text = string.Empty;
            nudX.Value = (int)e.Location.X;
            nudY.Value = (int)e.Location.Y;
            nudZ.Value = (int)e.Location.Z;
            targetRegionHandle = e.RegionHandle;
            uint x, y;
            Utils.LongToUInts(e.RegionHandle, out x, out y);
            x /= 256;
            y /= 256;
            ulong hndle = Utils.UIntsToLong(x, y);
            foreach (KeyValuePair<string, ulong> kvp in regionHandles)
            {
                if (kvp.Value == hndle)
                {
                    txtRegion.Text = kvp.Key;
                    btnTeleport.Enabled = true;
                }
            }
            mmap.CenterMap(x, y, (uint)e.Location.X, (uint)e.Location.Y, true);
        }
Beispiel #5
0
 public virtual void Friends_OnFriendFound(object sender, FriendFoundReplyEventArgs e) { OnEvent("On-Friend-Found", paramNamesOnFriendFound, paramTypesOnFriendFound,e); }