protected override void OnClicked()
        {
            switch (this.m_Type)
            {
            case 0:
                this.m_Owner.Page = this.m_Param;
                break;

            case 1:
            case 4:
                if (this.m_RelayID != 0)
                {
                    GServerGump.SetCachedLocation(this.m_Owner.DialogID, this.m_Owner.X, this.m_Owner.Y);
                }
                Network.Send((Packet) new PGumpButton(this.m_Owner, this.m_RelayID));
                Gumps.Destroy(this.m_Parent);
                break;
            }
        }
        private static bool Wrestle_OnAction(string args)
        {
            try
            {
                switch ((WrestleType)Enum.Parse(typeof(WrestleType), args, true))
                {
                case WrestleType.Disarm:
                    return(Network.Send((Packet) new PWrestleDisarm()));

                case WrestleType.Stun:
                    return(Network.Send((Packet) new PWrestleStun()));
                }
            }
            catch
            {
                Engine.AddTextMessage(string.Format("Unknown wrestle type: {0}", (object)args));
            }
            return(true);
        }
Exemple #3
0
 protected internal override void OnMouseUp(int X, int Y, MouseButtons mb)
 {
     if ((mb & MouseButtons.Right) != MouseButtons.None)
     {
         Point client = this.m_Parent.PointToClient(this.PointToScreen(new Point(X, Y)));
         this.m_Parent.OnMouseUp(client.X, client.Y, mb);
     }
     else if (TargetManager.IsActive && (mb & MouseButtons.Left) != MouseButtons.None)
     {
         this._item.OnTarget();
         Engine.CancelClick();
     }
     else
     {
         if ((mb & MouseButtons.Left) == MouseButtons.None || (Control.ModifierKeys & Keys.Shift) == Keys.None)
         {
             return;
         }
         Network.Send((Packet) new PPopupRequest(this._item));
     }
 }
Exemple #4
0
 private void Okay_Clicked(object sender, EventArgs e)
 {
     try
     {
         int num = Convert.ToInt32(this.m_TextBox.String);
         if (num <= 0)
         {
             Gumps.Destroy((Gump)this);
         }
         else
         {
             if (num > this.m_Amount)
             {
                 num = this.m_Amount;
             }
             this.m_IsDragging  = false;
             this.m_Item.Amount = num;
             Network.Send((Packet) new PPickupItem(this.m_Item, this.m_Item.Amount));
             Gumps.Desktop.Children.Add((Gump) new GDraggedItem(this.m_Item));
             if (this.m_ToDestroy is Gump)
             {
                 if (((Gump)this.m_ToDestroy).Parent is GContainer)
                 {
                     ((GContainer)((Gump)this.m_ToDestroy).Parent).m_Hash[(object)this.m_Item] = (object)null;
                 }
                 Gumps.Destroy((Gump)this.m_ToDestroy);
             }
             else if (this.m_ToDestroy is Item)
             {
                 Item obj = (Item)this.m_ToDestroy;
                 obj.RestoreInfo = new RestoreInfo(obj);
                 World.Remove(obj);
             }
             Gumps.Destroy((Gump)this);
         }
     }
     catch
     {
     }
 }
 private static bool Salute_OnAction(string args)
 {
     return(Network.Send((Packet) new PAction("salute")));
 }
 private static bool Bow_OnAction(string args)
 {
     return(Network.Send((Packet) new PAction("bow")));
 }
 private void Cancel()
 {
     Network.Send((Packet) new PQuestionMenuCancel(this.m_Serial, this.m_MenuID));
     Gumps.Destroy((Gump)this);
 }
Exemple #8
0
 public void Accept()
 {
     Network.Send((Packet) new PSellItems(this.m_Serial, this.m_Info));
     this.m_OfferMenu.WriteSignature();
 }
Exemple #9
0
 public void Close()
 {
     Network.Send((Packet) new PCancelTrade(this.m_Serial));
 }
Exemple #10
0
 protected internal override void OnDoubleClick(int x, int y)
 {
     Network.Send((Packet) new PVirtueItemTrigger(this.m_Owner, this.m_GumpID));
 }
Exemple #11
0
 private void Entry_OnClick(Gump Sender)
 {
     Network.Send((Packet) new PPopupResponse(this.m_Owner, (int)Sender.GetTag("EntryID")));
     Gumps.Destroy((Gump)this);
 }
Exemple #12
0
 public virtual void Invoke(string text)
 {
     Network.Send((Packet) new PUnicodeSpeech(text, true, this));
 }
Exemple #13
0
 public static void Dispatch(object state)
 {
     PUpdateRange.m_Queue.Enqueue(state);
     Network.Send((Packet) new PUpdateRange(18));
 }
Exemple #14
0
 public bool SendUse()
 {
     return(Network.Send((Packet) new PUseRequest((IEntity)this)));
 }
Exemple #15
0
 protected internal override void OnDoubleClick(int x, int y)
 {
     Network.Send((Packet) new PQuestionMenuResponse(this.m_Owner.Serial, this.m_Owner.MenuID, this.m_Entry.Index, this.m_Entry.ItemID, this.m_Entry.Hue));
     Gumps.Destroy((Gump)this.m_Owner);
 }
Exemple #16
0
 public bool Look()
 {
     return(Network.Send((Packet) new PLookRequest((IEntity)this)));
 }
 protected internal override void OnDoubleClick(int x, int y)
 {
     Network.Send((Packet) new PProfileRequest(this.m_Mobile));
 }