少年修仙传客户端代码仓库
client_Wu Xijin
2019-07-02 2f87c24e8e8d7842bf7323b9c4008ab8df06536a
7692 【2.0.200】【开发】VIP功能新BOSS之家购买次数
10个文件已修改
151 ■■■■■ 已修改文件
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B7_tagMCBOSSAttactCnt.cs 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HA3_Function/HA3B7_tagMCBOSSAttactCnt.cs 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/EnumWrap.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIBossHomeModelWrap.cs 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/Gen/SnxxzUIHazyRegionModelWrap.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Lua/LuaBehaviour.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/BossHomeModel.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/BossHomeWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/InGamePushContainer.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/EnumHelper.cs 1 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA3B7_tagMCBOSSAttactCnt.cs
@@ -32,6 +32,7 @@
                    break;
                case 1:
                    bossHomeModel.wearyValue = (int)info.KillCnt;
                    bossHomeModel.boughtTimes = (int)info.BuyCnt;
                    break;
                case 2:
                    crossServerBossModel.wearyValue = (int)info.KillCnt;
Core/NetworkPackage/ServerPack/HA3_Function/HA3B7_tagMCBOSSAttactCnt.cs
@@ -1,36 +1,33 @@
using UnityEngine;
using UnityEngine;
using System.Collections;
//A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
public class HA3B7_tagMCBOSSAttactCnt : GameNetPackBasic
{
    public byte Cnt;
    public tagMCBossCntInfo[] KillCntInfoList = null;
    public HA3B7_tagMCBOSSAttactCnt()
    {
        _cmd = (ushort)0xA3B7;
    }
    public override void ReadFromBytes(byte[] vBytes)
    {
        TransBytes(out Cnt, vBytes, NetDataType.BYTE);
        KillCntInfoList = new tagMCBossCntInfo[Cnt];
        for (int i = 0; i < Cnt; i++)
        {
            KillCntInfoList[i] = new tagMCBossCntInfo();
            TransBytes(out KillCntInfoList[i].BossType, vBytes, NetDataType.BYTE);
            TransBytes(out KillCntInfoList[i].KillCnt, vBytes, NetDataType.DWORD);
            TransBytes(out KillCntInfoList[i].ItemAddCnt, vBytes, NetDataType.DWORD);
        }
    }
    public struct tagMCBossCntInfo
    {
        public byte BossType;        //编号类型0-世界boss 1-boss之家
        public uint KillCnt;        //击杀次数
        public uint ItemAddCnt;        //物品增加次数
    }
}
//A3 B7 当日累计攻击boss次数 #tagMCBOSSAttactCnt
public class HA3B7_tagMCBOSSAttactCnt : GameNetPackBasic {
    public byte Cnt;
    public  tagMCBossCntInfo[] KillCntInfoList = null;
    public HA3B7_tagMCBOSSAttactCnt () {
        _cmd = (ushort)0xA3B7;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Cnt, vBytes, NetDataType.BYTE);
        KillCntInfoList = new tagMCBossCntInfo[Cnt];
        for (int i = 0; i < Cnt; i ++) {
            KillCntInfoList[i] = new tagMCBossCntInfo();
            TransBytes (out KillCntInfoList[i].BossType, vBytes, NetDataType.BYTE);
            TransBytes (out KillCntInfoList[i].KillCnt, vBytes, NetDataType.DWORD);
            TransBytes (out KillCntInfoList[i].ItemAddCnt, vBytes, NetDataType.DWORD);
            TransBytes (out KillCntInfoList[i].BuyCnt, vBytes, NetDataType.BYTE);
        }
    }
    public struct tagMCBossCntInfo {
        public byte BossType;        //编号类型0-世界boss 1-boss之家
        public uint KillCnt;        //击杀次数
        public uint ItemAddCnt;        //物品增加次数
        public byte BuyCnt;        //购买次数
    }
}
Lua/Gen/EnumWrap.cs
@@ -5730,7 +5730,7 @@
            Utils.BeginObjectRegister(typeof(VipPrivilegeType), L, translator, 0, 0, 0, 0);
            Utils.EndObjectRegister(typeof(VipPrivilegeType), L, translator, null, null, null, null, null);
            
            Utils.BeginClassRegister(typeof(VipPrivilegeType), L, null, 35, 0, 0);
            Utils.BeginClassRegister(typeof(VipPrivilegeType), L, null, 36, 0, 0);
            
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "TreasureAtk", VipPrivilegeType.TreasureAtk);
            
@@ -5799,6 +5799,8 @@
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "JadeDynastyBoss", VipPrivilegeType.JadeDynastyBoss);
            
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BatchAlchemyFairy", VipPrivilegeType.BatchAlchemyFairy);
            Utils.RegisterObject(L, translator, Utils.CLS_IDX, "BossHomeBuyTimes", VipPrivilegeType.BossHomeBuyTimes);
            
            Utils.RegisterFunc(L, Utils.CLS_IDX, "__CastFrom", __CastFrom);
            
@@ -5953,6 +5955,10 @@
                {
                    translator.PushVipPrivilegeType(L, VipPrivilegeType.BatchAlchemyFairy);
                }
                else if (LuaAPI.xlua_is_eq_str(L, 1, "BossHomeBuyTimes"))
                {
                    translator.PushVipPrivilegeType(L, VipPrivilegeType.BossHomeBuyTimes);
                }
                else
                {
                    return LuaAPI.luaL_error(L, "invalid string for VipPrivilegeType!");
Lua/Gen/SnxxzUIBossHomeModelWrap.cs
@@ -21,7 +21,7 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(Snxxz.UI.BossHomeModel);
            Utils.BeginObjectRegister(type, L, translator, 0, 10, 4, 4);
            Utils.BeginObjectRegister(type, L, translator, 0, 10, 5, 5);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "UnInit", _m_UnInit);
@@ -38,11 +38,13 @@
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedFloor", _g_get_selectedFloor);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectedBoss", _g_get_selectedBoss);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "wearyValue", _g_get_wearyValue);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "boughtTimes", _g_get_boughtTimes);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "bossHomeRedpoint", _g_get_bossHomeRedpoint);
            
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedFloor", _s_set_selectedFloor);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "selectedBoss", _s_set_selectedBoss);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "wearyValue", _s_set_wearyValue);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "boughtTimes", _s_set_boughtTimes);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "bossHomeRedpoint", _s_set_bossHomeRedpoint);
            
            
@@ -336,6 +338,20 @@
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_boughtTimes(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.boughtTimes);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_bossHomeRedpoint(RealStatePtr L)
        {
            try {
@@ -397,6 +413,21 @@
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_boughtTimes(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.BossHomeModel gen_to_be_invoked = (Snxxz.UI.BossHomeModel)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.boughtTimes = LuaAPI.xlua_tointeger(L, 2);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 0;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_bossHomeRedpoint(RealStatePtr L)
        {
            try {
Lua/Gen/SnxxzUIHazyRegionModelWrap.cs
@@ -21,7 +21,7 @@
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            System.Type type = typeof(Snxxz.UI.HazyRegionModel);
            Utils.BeginObjectRegister(type, L, translator, 0, 23, 18, 3);
            Utils.BeginObjectRegister(type, L, translator, 0, 23, 19, 3);
            
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "Init", _m_Init);
            Utils.RegisterFunc(L, Utils.METHOD_IDX, "OnBeforePlayerDataInitialize", _m_OnBeforePlayerDataInitialize);
@@ -60,6 +60,7 @@
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "requireIncidentAnimation", _g_get_requireIncidentAnimation);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "incidentDirty", _g_get_incidentDirty);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "openActviePoint", _g_get_openActviePoint);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "autoOpenLimitLevel", _g_get_autoOpenLimitLevel);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "selectIncident", _g_get_selectIncident);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "InFakeHazyRegion", _g_get_InFakeHazyRegion);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "incidentTypesSort", _g_get_incidentTypesSort);
@@ -890,6 +891,20 @@
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_autoOpenLimitLevel(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                Snxxz.UI.HazyRegionModel gen_to_be_invoked = (Snxxz.UI.HazyRegionModel)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.autoOpenLimitLevel);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, "c# exception:" + gen_e);
            }
            return 1;
        }
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_selectIncident(RealStatePtr L)
        {
            try {
Lua/LuaBehaviour.cs
@@ -29,7 +29,7 @@
        table.SetMetaTable(meta);
        meta.Dispose();
        table.Set("this", this);
        table.Set("transform", this.transform);
        LuaUtility.DoString(fileName, "LuaBehaviour", table);
        var luaAwake = table.Get<Action>("Awake");
System/FindPrecious/BossHomeModel.cs
@@ -59,6 +59,21 @@
            }
        }
        int m_BoughtTimes = 0;
        public int boughtTimes {
            get { return m_BoughtTimes; }
            set {
                m_BoughtTimes = value;
            }
        }
        public int remindTimes {
            get {
                var wearyValueLimit = vipModel.GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit);
                return wearyValueLimit + boughtTimes - wearyValue;
            }
        }
        public event Action<int> bossHomeFloorSelectedEvent;
        public event Action<int> bossSelectedEvent;
        public event Action bossWearyValueChangeEvent;
@@ -99,7 +114,7 @@
            {
                var bossId = sortedBosses[i];
                var bossHomeConfig = BossHomeConfig.Get(bossId);
                if (findPreciousModel.IsBossUnlock(bossId)
                if (findPreciousModel.IsBossUnlock(bossId)
                    && vipLevel >= GetFloorVipRequirement(bossHomeConfig.FloorNum))
                {
                    return bossHomeConfig.FloorNum;
System/FindPrecious/BossHomeWin.cs
@@ -58,8 +58,9 @@
            m_WearyContainer.gameObject.SetActive(wearyValueLimit > 0);
            if (wearyValueLimit > 0)
            {
                m_WearyValue.text = Language.Get("WorldBoss_Endurance0", wearyValueLimit - model.wearyValue);
                m_WearyValue.colorType = model.wearyValue >= wearyValueLimit ? TextColType.Red : TextColType.DarkGreen;
                var countInfo = string.Format("{0}/{1}", model.remindTimes, wearyValueLimit);
                m_WearyValue.text = countInfo;
                m_WearyValue.colorType = model.remindTimes <= 0 ? TextColType.Red : TextColType.DarkGreen;
            }
        }
System/MainInterfacePanel/InGamePushContainer.cs
@@ -300,7 +300,7 @@
                        show = !GeneralDefine.worldBossNoRebornRemindMaps.Contains(mapId);
                        break;
                    case FindPreciousType.BossHome:
                        killable = bossHomeModel.wearyValue < vipModel.GetVipPrivilegeCnt(VipPrivilegeType.BossHomeAwardLimit);
                        killable = bossHomeModel.remindTimes > 0;
                        show = !GeneralDefine.bossHomeNoRebornRemindMaps.Contains(mapId);
                        break;
                    case FindPreciousType.ElderGodArea:
Utility/EnumHelper.cs
@@ -1032,6 +1032,7 @@
    AssistXianYuanCoinsRatioAdd = 34,//助战仙缘币获得倍率加成(万分比)
    JadeDynastyBoss = 35,
    BatchAlchemyFairy = 36,//批量炼制仙丹
    BossHomeBuyTimes=37,//boss之家购买次数
}
[XLua.LuaCallCSharp]