少年修仙传客户端代码仓库
hch
2025-02-18 d0a98d02634fee5771d1e7871e75381de06baca8
10398 子 2月11-14版本更新 / 2月17-21版本更新 -购买超65535 问题
1个文件已添加
8个文件已修改
116 ■■■■■ 已修改文件
Core/NetworkPackage/ClientPack/ClientToMapServer/CA3_Item/CA310_tagCMBuyItem.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HA8_Item/HA802_tagMCShopItemDayBuyCntInfo.cs 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LogicProject/System/FosterActivity/FosterModel.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LogicProject/System/MergeServerActivity/MergeServerFlashRushToBuyItemCell.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HolidayWishes/HolidayFlashRushSaleItemCell.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HolidayWishes/HolidayFlashSaleModel.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleItemCell.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/OpenServerActivity/FlashSaleModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreModel.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CA3_Item/CA310_tagCMBuyItem.cs
New file
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;
// A3 10 购买商城物品 #tagCMBuyItem
public class CA310_tagCMBuyItem : GameNetPackBasic {
    public ushort BuyItemIndex;    //购买的物品索引
    public uint BuyCount;    //购买数量
    public CA310_tagCMBuyItem () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xA310;
    }
    public override void WriteToBytes () {
        WriteBytes (BuyItemIndex, NetDataType.WORD);
        WriteBytes (BuyCount, NetDataType.DWORD);
    }
}
Core/NetworkPackage/ServerPack/HA8_Item/HA802_tagMCShopItemDayBuyCntInfo.cs
@@ -1,31 +1,31 @@
using UnityEngine;
using System.Collections;
using UnityEngine;
using System.Collections;
// A8 02 通知NPC商店物品今日已购买次数 #tagMCShopItemDayBuyCntInfo
// A8 02 通知NPC商店物品今日已购买次数 #tagMCShopItemDayBuyCntInfo
public class HA802_tagMCShopItemDayBuyCntInfo : GameNetPackBasic {
    public ushort Count;    //通知个数,注意不限制每日购买次数的默认不通知
    public  tagMCShopItemDayBuyCnt[] DayBuyCntList;
    public HA802_tagMCShopItemDayBuyCntInfo () {
        _cmd = (ushort)0xA802;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Count, vBytes, NetDataType.WORD);
        DayBuyCntList = new tagMCShopItemDayBuyCnt[Count];
        for (int i = 0; i < Count; i ++) {
            DayBuyCntList[i] = new tagMCShopItemDayBuyCnt();
            TransBytes (out DayBuyCntList[i].ItemIndex, vBytes, NetDataType.DWORD);
            TransBytes (out DayBuyCntList[i].BuyCnt, vBytes, NetDataType.WORD);
            TransBytes (out DayBuyCntList[i].IsReset, vBytes, NetDataType.BYTE);
        }
    }
    public struct tagMCShopItemDayBuyCnt {
        public uint ItemIndex;
        public ushort BuyCnt;        // 今日已购买次数
        public byte IsReset;        //是否重置
    }
}
public class HA802_tagMCShopItemDayBuyCntInfo : GameNetPackBasic {
    public ushort Count;    //通知个数,注意不限制每日购买次数的默认不通知
    public  tagMCShopItemDayBuyCnt[] DayBuyCntList;
    public HA802_tagMCShopItemDayBuyCntInfo () {
        _cmd = (ushort)0xA802;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Count, vBytes, NetDataType.WORD);
        DayBuyCntList = new tagMCShopItemDayBuyCnt[Count];
        for (int i = 0; i < Count; i ++) {
            DayBuyCntList[i] = new tagMCShopItemDayBuyCnt();
            TransBytes (out DayBuyCntList[i].ItemIndex, vBytes, NetDataType.DWORD);
            TransBytes (out DayBuyCntList[i].BuyCnt, vBytes, NetDataType.DWORD);
            TransBytes (out DayBuyCntList[i].IsReset, vBytes, NetDataType.BYTE);
        }
    }
    public struct tagMCShopItemDayBuyCnt {
        public uint ItemIndex;
        public uint BuyCnt;        // 今日已购买次数
        public byte IsReset;        //是否重置
    }
}
LogicProject/System/FosterActivity/FosterModel.cs
@@ -70,10 +70,9 @@
    //购买
    public void BuyItem(int ID,int count )
    {
        C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
        buyShop.NPCID = 0;
        CA310_tagCMBuyItem buyShop = new CA310_tagCMBuyItem();
        buyShop.BuyItemIndex = (ushort)ID;
        buyShop.BuyCount = (ushort)count;
        buyShop.BuyCount = (uint)count;
        GameNetSystem.Instance.SendInfo(buyShop);
    }
LogicProject/System/MergeServerActivity/MergeServerFlashRushToBuyItemCell.cs
@@ -144,10 +144,9 @@
        if(UIHelper.GetMoneyCnt(saleItem.moneyType) >= (ulong)saleItem.moneyNumber)
        {
            C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
            buyShop.NPCID = 0;
            CA310_tagCMBuyItem buyShop = new CA310_tagCMBuyItem();
            buyShop.BuyItemIndex = (ushort)saleItem.shopId;
            buyShop.BuyCount = (ushort)1;
            buyShop.BuyCount = 1;
            GameNetSystem.Instance.SendInfo(buyShop);
        }
        else
System/HolidayWishes/HolidayFlashRushSaleItemCell.cs
@@ -141,10 +141,9 @@
            if(UIHelper.GetMoneyCnt(saleItem.moneyType) >= (ulong)saleItem.moneyNumber)
            {
                C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
                buyShop.NPCID = 0;
                CA310_tagCMBuyItem buyShop = new CA310_tagCMBuyItem();
                buyShop.BuyItemIndex = (ushort)saleItem.shopId;
                buyShop.BuyCount = (ushort)1;
                buyShop.BuyCount = 1;
                GameNetSystem.Instance.SendInfo(buyShop);
            }
            else
System/HolidayWishes/HolidayFlashSaleModel.cs
@@ -163,8 +163,7 @@
                        {
                            if (isOk)
                            {
                                C0803_tagCBuyItemList pak = new C0803_tagCBuyItemList();
                                pak.NPCID = 0;
                                CA310_tagCMBuyItem pak = new CA310_tagCMBuyItem();
                                pak.BuyItemIndex = (ushort)gift.id;
                                pak.BuyCount = 1;
                                GameNetSystem.Instance.SendInfo(pak);
@@ -173,7 +172,7 @@
                    }
                    else
                    {
                        C0803_tagCBuyItemList pak = new C0803_tagCBuyItemList();
                        CA310_tagCMBuyItem pak = new CA310_tagCMBuyItem();
                        pak.NPCID = 0;
                        pak.BuyItemIndex = (ushort)gift.id;
                        pak.BuyCount = 1;
System/OpenServerActivity/FlashSaleItemCell.cs
@@ -141,10 +141,9 @@
            if(UIHelper.GetMoneyCnt(saleItem.moneyType) >= (ulong)saleItem.moneyNumber)
            {
                C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
                buyShop.NPCID = 0;
                CA310_tagCMBuyItem buyShop = new CA310_tagCMBuyItem();
                buyShop.BuyItemIndex = (ushort)saleItem.shopId;
                buyShop.BuyCount = (ushort)1;
                buyShop.BuyCount = 1;
                GameNetSystem.Instance.SendInfo(buyShop);
            }
            else
System/OpenServerActivity/FlashSaleModel.cs
@@ -162,8 +162,7 @@
                        {
                            if (isOk)
                            {
                                C0803_tagCBuyItemList pak = new C0803_tagCBuyItemList();
                                pak.NPCID = 0;
                                CA310_tagCMBuyItem pak = new CA310_tagCMBuyItem();
                                pak.BuyItemIndex = (ushort)gift.id;
                                pak.BuyCount = 1;
                                GameNetSystem.Instance.SendInfo(pak);
@@ -172,8 +171,7 @@
                    }
                    else
                    {
                        C0803_tagCBuyItemList pak = new C0803_tagCBuyItemList();
                        pak.NPCID = 0;
                        CA310_tagCMBuyItem pak = new CA310_tagCMBuyItem();
                        pak.BuyItemIndex = (ushort)gift.id;
                        pak.BuyCount = 1;
                        GameNetSystem.Instance.SendInfo(pak);
System/Store/StoreModel.cs
@@ -1178,10 +1178,9 @@
            }
            else
            {
                C0803_tagCBuyItemList buyShop = new C0803_tagCBuyItemList();
                buyShop.NPCID = 0;
                CA310_tagCMBuyItem buyShop = new CA310_tagCMBuyItem();
                buyShop.BuyItemIndex = (ushort)model.ID;
                buyShop.BuyCount = (ushort)count;
                buyShop.BuyCount = (uint)count;
                GameNetSystem.Instance.SendInfo(buyShop);
            }
        }