当前位置: 首页>>代码示例>>C#>>正文


C# BitStream.ReadInventorySlot方法代码示例

本文整理汇总了C#中NetGore.IO.BitStream.ReadInventorySlot方法的典型用法代码示例。如果您正苦于以下问题:C# BitStream.ReadInventorySlot方法的具体用法?C# BitStream.ReadInventorySlot怎么用?C# BitStream.ReadInventorySlot使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NetGore.IO.BitStream的用法示例。


在下文中一共展示了BitStream.ReadInventorySlot方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RecvSwapInventorySlots

        void RecvSwapInventorySlots(IIPSocket conn, BitStream r)
        {
            var a = r.ReadInventorySlot();
            var b = r.ReadInventorySlot();

            var user = TryGetUser(conn);
            if (user == null)
                return;

            user.Inventory.SwapSlots(a, b);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:11,代码来源:ServerPacketHandler.cs

示例2: RecvUseInventoryItem

        void RecvUseInventoryItem(IIPSocket conn, BitStream r)
        {
            var slot = r.ReadInventorySlot();

            User user;
            if ((user = TryGetUser(conn)) == null)
                return;

            user.UseInventoryItem(slot);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:10,代码来源:ServerPacketHandler.cs

示例3: RecvSellInventoryToShop

        void RecvSellInventoryToShop(IIPSocket conn, BitStream r)
        {
            var slot = r.ReadInventorySlot();
            var amount = r.ReadByte();

            User user;
            if ((user = TryGetUser(conn)) == null)
                return;

            user.ShoppingState.TrySellInventory(slot, amount);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:11,代码来源:ServerPacketHandler.cs

示例4: RecvGetInventoryItemInfo

        void RecvGetInventoryItemInfo(IIPSocket conn, BitStream r)
        {
            var slot = r.ReadInventorySlot();

            User user;
            if ((user = TryGetUser(conn)) != null)
                user.SendInventoryItemStats(slot);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:8,代码来源:ServerPacketHandler.cs

示例5: RecvDropInventoryItem

        void RecvDropInventoryItem(IIPSocket conn, BitStream r)
        {
            var slot = r.ReadInventorySlot();
            var amount = r.ReadByte();

            User user;
            if ((user = TryGetUser(conn)) == null)
                return;

            if (user.IsPeerTrading)
                return;

            if (amount < 1)
                return;

            user.Inventory.Drop(slot, amount);
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:17,代码来源:ServerPacketHandler.cs

示例6: RecvSetInventorySlot

        void RecvSetInventorySlot(IIPSocket conn, BitStream r)
        {
            var slot = r.ReadInventorySlot();
            var hasGraphic = r.ReadBool();
            var graphic = hasGraphic ? r.ReadGrhIndex() : GrhIndex.Invalid;
            var amount = r.ReadByte();

            UserInfo.Inventory.Update(slot, graphic, amount, GetTime());
        }
开发者ID:mateuscezar,项目名称:netgore,代码行数:9,代码来源:ClientPacketHandler.cs

示例7: RecvSendInventoryItemInfo

 void RecvSendInventoryItemInfo(IIPSocket conn, BitStream r)
 {
     var slot = r.ReadInventorySlot();
     GameplayScreen.InventoryInfoRequester.ReceiveInfo(slot, r);
 }
开发者ID:mateuscezar,项目名称:netgore,代码行数:5,代码来源:ClientPacketHandler.cs


注:本文中的NetGore.IO.BitStream.ReadInventorySlot方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。