Beispiel #1
0
 public static PacketWriter BuyFromShop(ShopItemIndex index, byte amount)
 {
     var pw = GetWriter(ClientPacketID.BuyFromShop);
     pw.Write(index);
     pw.Write(amount);
     return pw;
 }
Beispiel #2
0
        public static PacketWriter BuyFromShop(ShopItemIndex index, byte amount)
        {
            var pw = GetWriter(ClientPacketID.BuyFromShop);

            pw.Write(index);
            pw.Write(amount);
            return(pw);
        }
Beispiel #3
0
            /// <summary>
            /// Initializes a new instance of the <see cref="ShopItemPB"/> class.
            /// </summary>
            /// <param name="parent">The parent.</param>
            /// <param name="pos">The pos.</param>
            /// <param name="index">The <see cref="ShopItemIndex"/>.</param>
            /// <exception cref="ArgumentNullException"><paramref name="parent" /> is <c>null</c>.</exception>
            public ShopItemPB(ShopForm parent, Vector2 pos, ShopItemIndex index) : base(parent, pos, _itemSize)
            {
                if (parent == null)
                {
                    throw new ArgumentNullException("parent");
                }

                _slot    = index;
                Tooltip  = _tooltipHandler;
                MouseUp += ShopForm.ShopItemPB_OnMouseUp;
            }
Beispiel #4
0
 public static void Write(this BitStream bitStream, ShopItemIndex shopItemIndex)
 {
     ((IValueWriter)bitStream).Write(null, shopItemIndex);
 }
 public static void Write(this IValueWriter writer, string name, ShopItemIndex value)
 {
     writer.Write(name, value);
 }
Beispiel #6
0
            /// <summary>
            /// Initializes a new instance of the <see cref="ShopItemPB"/> class.
            /// </summary>
            /// <param name="parent">The parent.</param>
            /// <param name="pos">The pos.</param>
            /// <param name="index">The <see cref="ShopItemIndex"/>.</param>
            /// <exception cref="ArgumentNullException"><paramref name="parent" /> is <c>null</c>.</exception>
            public ShopItemPB(ShopForm parent, Vector2 pos, ShopItemIndex index) : base(parent, pos, _itemSize)
            {
                if (parent == null)
                    throw new ArgumentNullException("parent");

                _slot = index;
                Tooltip = _tooltipHandler;
                MouseUp += ShopForm.ShopItemPB_OnMouseUp;
            }
Beispiel #7
0
 public static void Write(this BitStream bitStream, ShopItemIndex shopItemIndex)
 {
     ((IValueWriter)bitStream).Write(null, shopItemIndex);
 }