Beispiel #1
0
        public void SendSaleItem(KPackageType ePackageType, KPlayerPackageIndex ePackageIndex, int pos)
        {
            C2S_SALE_ITEM_TO_SYS msg = new C2S_SALE_ITEM_TO_SYS();

            msg.protocolID     = (byte)KC2S_Protocol.c2s_sale_item_to_sys;
            msg.byPackageType  = (ushort)ePackageType;
            msg.byPackageIndex = (ushort)ePackageIndex;
            msg.byPos          = (ushort)pos;
            SendMessage(msg);
        }
Beispiel #2
0
        public void SendUseItem(KPackageType ePackageType, KPlayerPackageIndex ePackageIndex, int pos)
        {
            C2S_USE_ITEM msg = new C2S_USE_ITEM();

            msg.protocolID     = (byte)KC2S_Protocol.c2s_use_item;
            msg.byPackageType  = (ushort)ePackageType;
            msg.byPackageIndex = (ushort)ePackageIndex;
            msg.byPos          = (ushort)pos;
            SendMessage(msg);
        }
Beispiel #3
0
        public void SendUseItemByNum(KPackageType ePackageType, KPlayerPackageIndex ePackageIndex, int pos, int stackNum)
        {
            C2S_USE_ITEM_BY_NUM msg = new C2S_USE_ITEM_BY_NUM();

            msg.protocolID     = (byte)KC2S_Protocol.c2s_use_item_by_num;
            msg.byPackageType  = (ushort)ePackageType;
            msg.byPackageIndex = (ushort)ePackageIndex;
            msg.byPos          = (ushort)pos;
            msg.stackNum       = (ushort)stackNum;
            SendMessage(msg);
        }
Beispiel #4
0
        public void SendPartItemRequest(KPackageType ePackageType, KPlayerPackageIndex ePackageIndex, int pos, int stackNum)
        {
            C2S_PART_ITEM msg = new C2S_PART_ITEM();

            msg.protocolID     = (byte)KC2S_Protocol.c2s_part_item;
            msg.byPackageType  = (ushort)ePackageType;
            msg.byPackageIndex = (ushort)ePackageIndex;
            msg.byPos          = (ushort)pos;
            msg.stackNum       = (ushort)stackNum;
            SendMessage(msg);
        }
Beispiel #5
0
        public void SendSortItem(KPlayerPackageIndex ePackageIndex, ArrayList itemList)
        {
            ItemInfo          info = null;
            C2S_SORT_OUT_ITEM msg  = new C2S_SORT_OUT_ITEM();

            msg.protocolID     = (byte)KC2S_Protocol.c2s_sort_out_item;
            msg.byPackageIndex = (ushort)ePackageIndex;

            KNMBagItemPositionDataList positionList = new KNMBagItemPositionDataList();

            for (int i = 0; i < itemList.Count; i++)
            {
                info = (ItemInfo)itemList[i];
                if (info == null)
                {
                    break;
                }
                positionList.ItemPositionList.Add(info.Position);
            }
            Serializer.Serialize <KNMBagItemPositionDataList>(msg.itemPositionDataList, positionList);
            SendMessage(msg);
        }