少年修仙传客户端代码仓库
client_Wu Xijin
2019-04-17 27e8ca3551b83470dbfdbcd12309c71656ab5f43
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
9个文件已修改
10个文件已添加
735 ■■■■■ 已修改文件
Core/GameEngine/DataToCtl/PackageRegedit.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/DungeonUseBuffConfig.cs 211 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/DungeonUseBuffConfig.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CB1_ActionMap/CB10A_tagCMFBBuyBuff.cs 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ClientPack/ClientToMapServer/CB1_ActionMap/CB10A_tagCMFBBuyBuff.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HB2_ActionMap/DTCB215_tagMCFBBuyBuffInfo.cs 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/DTCFile/ServerPack/HB2_ActionMap/DTCB215_tagMCFBBuyBuffInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HB2_ActionMap/HB215_tagMCFBBuyBuffInfo.cs 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/NetworkPackage/ServerPack/HB2_ActionMap/HB215_tagMCFBBuyBuffInfo.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonFightWin.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonReturnBloodBehaviour.cs 221 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonUseBuffModel.cs 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonUseBuffModel.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingModel.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingPlayerBehaviour.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyGrassDungeonWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/ConfigInitiator.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/OperationLogCollect.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/DataToCtl/PackageRegedit.cs
@@ -25,6 +25,7 @@
    public static void Init()
    {
        // 登记相应的数据体及对应的数据转逻辑类
        Register(typeof(HB215_tagMCFBBuyBuffInfo), typeof(DTCB215_tagMCFBBuyBuffInfo));
        Register(typeof(HA718_tagMCCollectAwardItemInfo), typeof(DTCA718_tagMCCollectAwardItemInfo));
        Register(typeof(HB214_tagMCCuntomFBPrizeInfo), typeof(DTCB214_tagMCCuntomFBPrizeInfo));
        Register(typeof(HA307_tagMCFairyAdventuresInfo), typeof(DTCA307_tagMCFairyAdventuresInfo));
Core/GameEngine/Model/Config/DungeonUseBuffConfig.cs
New file
@@ -0,0 +1,211 @@
//--------------------------------------------------------
//    [Author]:           Fish
//    [  Date ]:           Tuesday, April 16, 2019
//--------------------------------------------------------
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System;
using UnityEngine;
[XLua.LuaCallCSharp]
public partial class DungeonUseBuffConfig
{
    public readonly int ID;
    public readonly int DataMapId;
    public readonly int MoneyCnt;
    public readonly int BuffID;
    public readonly int CD;
    public DungeonUseBuffConfig()
    {
    }
    public DungeonUseBuffConfig(string input)
    {
        try
        {
            var tables = input.Split('\t');
            int.TryParse(tables[0],out ID);
            int.TryParse(tables[1],out DataMapId);
            int.TryParse(tables[2],out MoneyCnt);
            int.TryParse(tables[3],out BuffID);
            int.TryParse(tables[4],out CD);
        }
        catch (Exception ex)
        {
            DebugEx.Log(ex);
        }
    }
    static Dictionary<string, DungeonUseBuffConfig> configs = new Dictionary<string, DungeonUseBuffConfig>();
    public static DungeonUseBuffConfig Get(string id)
    {
        if (!inited)
        {
            Debug.Log("DungeonUseBuffConfig 还未完成初始化。");
            return null;
        }
        if (configs.ContainsKey(id))
        {
            return configs[id];
        }
        DungeonUseBuffConfig config = null;
        if (rawDatas.ContainsKey(id))
        {
            config = configs[id] = new DungeonUseBuffConfig(rawDatas[id]);
            rawDatas.Remove(id);
        }
        return config;
    }
    public static DungeonUseBuffConfig Get(int id)
    {
        return Get(id.ToString());
    }
    public static List<string> GetKeys()
    {
        var keys = new List<string>();
        keys.AddRange(configs.Keys);
        keys.AddRange(rawDatas.Keys);
        return keys;
    }
    public static List<DungeonUseBuffConfig> GetValues()
    {
        var values = new List<DungeonUseBuffConfig>();
        values.AddRange(configs.Values);
        var keys = new List<string>(rawDatas.Keys);
        foreach (var key in keys)
        {
            values.Add(Get(key));
        }
        return values;
    }
    public static bool Has(string id)
    {
        return configs.ContainsKey(id) || rawDatas.ContainsKey(id);
    }
    public static bool Has(int id)
    {
        return Has(id.ToString());
    }
    public static bool inited { get; private set; }
    protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>();
    public static void Init(bool sync=false)
    {
        inited = false;
        var path = string.Empty;
        if (AssetSource.refdataFromEditor)
        {
            path = ResourcesPath.CONFIG_FODLER +"/DungeonUseBuff.txt";
        }
        else
        {
            path = AssetVersionUtility.GetAssetFilePath("config/DungeonUseBuff.txt");
        }
        var tempConfig = new DungeonUseBuffConfig();
        var preParse = tempConfig is IConfigPostProcess;
        if (sync)
        {
            var lines = File.ReadAllLines(path);
            if (!preParse)
            {
                rawDatas = new Dictionary<string, string>(lines.Length - 3);
            }
            for (int i = 3; i < lines.Length; i++)
            {
                try
                {
                    var line = lines[i];
                    var index = line.IndexOf("\t");
                    if (index == -1)
                    {
                        continue;
                    }
                    var id = line.Substring(0, index);
                    if (preParse)
                    {
                        var config = new DungeonUseBuffConfig(line);
                        configs[id] = config;
                        (config as IConfigPostProcess).OnConfigParseCompleted();
                    }
                    else
                    {
                        rawDatas[id] = line;
                    }
                }
                catch (System.Exception ex)
                {
                    Debug.LogError(ex);
                }
            }
            inited = true;
        }
        else
        {
            ThreadPool.QueueUserWorkItem((object _object) =>
            {
                var lines = File.ReadAllLines(path);
                if (!preParse)
                {
                    rawDatas = new Dictionary<string, string>(lines.Length - 3);
                }
                for (int i = 3; i < lines.Length; i++)
                {
                    try
                    {
                       var line = lines[i];
                        var index = line.IndexOf("\t");
                        if (index == -1)
                        {
                            continue;
                        }
                        var id = line.Substring(0, index);
                        if (preParse)
                        {
                            var config = new DungeonUseBuffConfig(line);
                            configs[id] = config;
                            (config as IConfigPostProcess).OnConfigParseCompleted();
                        }
                        else
                        {
                            rawDatas[id] = line;
                        }
                    }
                    catch (System.Exception ex)
                    {
                        Debug.LogError(ex);
                    }
                }
                inited = true;
            });
        }
    }
}
Core/GameEngine/Model/Config/DungeonUseBuffConfig.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 443e9762aa0f4cd4b8551575e1b8bbb9
timeCreated: 1555415806
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ClientPack/ClientToMapServer/CB1_ActionMap/CB10A_tagCMFBBuyBuff.cs
New file
@@ -0,0 +1,20 @@
using UnityEngine;
using System.Collections;
// B1 0A 副本购买buff #tagCMFBBuyBuff
public class CB10A_tagCMFBBuyBuff : GameNetPackBasic {
    public uint MapID;
    public ushort MoneyCnt;
    public CB10A_tagCMFBBuyBuff () {
        combineCmd = (ushort)0x03FE;
        _cmd = (ushort)0xB10A;
    }
    public override void WriteToBytes () {
        WriteBytes (MapID, NetDataType.DWORD);
        WriteBytes (MoneyCnt, NetDataType.WORD);
    }
}
Core/NetworkPackage/ClientPack/ClientToMapServer/CB1_ActionMap/CB10A_tagCMFBBuyBuff.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 8ae3d7fd5cd37de44b90243da6d1c531
timeCreated: 1555420339
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/DTCFile/ServerPack/HB2_ActionMap/DTCB215_tagMCFBBuyBuffInfo.cs
New file
@@ -0,0 +1,26 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, April 16, 2019
//--------------------------------------------------------
using Snxxz.UI;
using System;
using System.Collections;
using System.Collections.Generic;
public class DTCB215_tagMCFBBuyBuffInfo : DtcBasic
{
    public override void Done(GameNetPackBasic vNetPack)
    {
        base.Done(vNetPack);
        var package = vNetPack as HB215_tagMCFBBuyBuffInfo;
        ModelCenter.Instance.GetModel<DungeonUseBuffModel>().ReceivePackage(package);
    }
}
Core/NetworkPackage/DTCFile/ServerPack/HB2_ActionMap/DTCB215_tagMCFBBuyBuffInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 639360f931dc64a45bcb25f90776d4bd
timeCreated: 1555420417
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Core/NetworkPackage/ServerPack/HB2_ActionMap/HB215_tagMCFBBuyBuffInfo.cs
New file
@@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
// B2 15 副本买buff信息通知 #tagMCFBBuyBuffInfo
public class HB215_tagMCFBBuyBuffInfo : GameNetPackBasic {
    public byte Cnt;
    public  tagMCFBBuyBuffTime[] InfoList;
    public HB215_tagMCFBBuyBuffInfo () {
        _cmd = (ushort)0xB215;
    }
    public override void ReadFromBytes (byte[] vBytes) {
        TransBytes (out Cnt, vBytes, NetDataType.BYTE);
        InfoList = new tagMCFBBuyBuffTime[Cnt];
        for (int i = 0; i < Cnt; i ++) {
            InfoList[i] = new tagMCFBBuyBuffTime();
            TransBytes (out InfoList[i].MapID, vBytes, NetDataType.DWORD);
            TransBytes (out InfoList[i].MoneyCnt, vBytes, NetDataType.WORD);
            TransBytes (out InfoList[i].BuyTime, vBytes, NetDataType.DWORD);
        }
    }
    public struct tagMCFBBuyBuffTime {
        public uint MapID;
        public ushort MoneyCnt;
        public uint BuyTime;
    }
}
Core/NetworkPackage/ServerPack/HB2_ActionMap/HB215_tagMCFBBuyBuffInfo.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 4c40e169a5e64ef44adfc36bd3da6cdd
timeCreated: 1555420384
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Dungeon/DungeonFightWin.cs
@@ -34,6 +34,7 @@
        [SerializeField] GameObject m_Container_WHYJ;
        [SerializeField] DungenWHYJ m_DungenWHYJ;
        [SerializeField] GatherSoulDungeonBehaviour m_GatherSoulDungeonBehaviour;
        [SerializeField] DungeonReturnBloodBehaviour m_DungeonReturnBlood;
        bool excutedAutoExit = false;
        float timer = 0f;
        DateTime endTime = DateTime.Now;
@@ -49,6 +50,7 @@
        RuneTowerModel runeTowerModel { get { return ModelCenter.Instance.GetModel<RuneTowerModel>(); } }
        BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        DungeonUseBuffModel dungeonUseBuffModel { get { return ModelCenter.Instance.GetModel<DungeonUseBuffModel>(); } }
        #region Built-in
        protected override void BindController()
@@ -80,6 +82,16 @@
            m_BossInfosContainer.gameObject.SetActive(
                dataMapId == ElderGodAreaModel.ELDERGODAREA_MAPID
                || dataMapId == BossHomeModel.BOSSHOME_MAPID);
            if (dungeonUseBuffModel.IsDungeonUseBuff(dataMapId))
            {
                m_DungeonReturnBlood.gameObject.SetActive(true);
                m_DungeonReturnBlood.Display(dataMapId);
            }
            else
            {
                m_DungeonReturnBlood.gameObject.SetActive(false);
            }
            m_GatherSoulDungeonBehaviour.gameObject.SetActive(dataMapId == GatherSoulDungeonModel.DUNGEON_MAPID);
            switch (dataMapId)
@@ -160,6 +172,7 @@
            m_BossInfosContainer.Dispose();
            m_AncientKing.UnInit();
            m_GatherSoulDungeonBehaviour.Dispose();
            m_DungeonReturnBlood.Dispose();
            DropItemManager.pickUpCallBack -= OnPickItem;
            MainInterfaceWin.Event_Duplicates -= OnChangeFuncBtnPosEvent;
            model.dungeonCoolDownEvent -= OnLeaveMapTimeEvent;
System/Dungeon/DungeonReturnBloodBehaviour.cs
@@ -8,16 +8,231 @@
{
    public class DungeonReturnBloodBehaviour : MonoBehaviour
    {
        [SerializeField] Button m_ReturnBlood;
        [SerializeField] Button m_MoneyReturnBlood;
        [SerializeField] ReturnBloodBeha m_MoneyReturnBeha;
        [SerializeField] Button m_FreeReturnBlood;
        [SerializeField] ReturnBloodBeha m_FreeReturnBeha;
        int mapId = 0;
        int moneyReturnId = 0;
        int freeReturnId = 0;
        DungeonUseBuffModel model
        {
            get { return ModelCenter.Instance.GetModel<DungeonUseBuffModel>(); }
        }
        private void Awake()
        {
            m_ReturnBlood.AddListener(OnReturnBlood);
            m_FreeReturnBlood.AddListener(FreeReturnBlood);
            m_MoneyReturnBlood.AddListener(MoneyReturnBlood);
        }
        private void OnReturnBlood()
        public void Display(int mapId)
        {
            this.mapId = mapId;
            moneyReturnId = 0;
            freeReturnId = 0;
            var list = model.GetDungeonUseBuffs(mapId);
            for (int i = 0; i < list.Count; i++)
            {
                var config = DungeonUseBuffConfig.Get(list[i]);
                if (config.MoneyCnt != 0)
                {
                    moneyReturnId = list[i];
                }
                else
                {
                    freeReturnId = list[i];
                }
            }
            m_MoneyReturnBlood.gameObject.SetActive(moneyReturnId != 0);
            if (moneyReturnId != 0)
            {
                m_MoneyReturnBeha.Display(moneyReturnId);
            }
            m_FreeReturnBlood.gameObject.SetActive(freeReturnId != 0);
            if (freeReturnId != 0)
            {
                m_FreeReturnBeha.Display(freeReturnId);
            }
            DisplayTime();
            model.onUseBuffTimeRefresh += OnUseBuffTimeRefresh;
        }
        void DisplayTime()
        {
            if (moneyReturnId != 0)
            {
                var seconds = GetBuffSeconds(moneyReturnId);
                m_MoneyReturnBeha.SetCoolDown(seconds);
            }
            if (freeReturnId != 0)
            {
                var seconds = GetBuffSeconds(freeReturnId);
                m_FreeReturnBeha.SetCoolDown(seconds);
            }
        }
        private void LateUpdate()
        {
            if (m_FreeReturnBlood.gameObject.activeSelf)
            {
                m_FreeReturnBeha.OnUpdate();
            }
            if (m_MoneyReturnBlood.gameObject.activeSelf)
            {
                m_MoneyReturnBeha.OnUpdate();
            }
        }
        float GetBuffSeconds(int id)
        {
            var config = DungeonUseBuffConfig.Get(id);
            var tick = model.GetUseBuffTime(config.DataMapId, config.MoneyCnt);
            var useTime = TimeUtility.GetTime(tick);
            var seconds = Mathf.Max(0f, config.CD - (float)(TimeUtility.ServerNow - useTime).TotalSeconds);
            return seconds;
        }
        private void MoneyReturnBlood()
        {
            if (moneyReturnId != 0)
            {
                var config = DungeonUseBuffConfig.Get(moneyReturnId);
                var seconds = GetBuffSeconds(moneyReturnId);
                if (seconds <= 0)
                {
                    if (model.moneyCostRemind)
                    {
                        var skillConfig = SkillConfig.Get(config.BuffID);
                        ConfirmCancel.ToggleConfirmCancel(Language.Get("Mail101"),
                            Language.Get("HazyReturnBloodRemind", config.MoneyCnt, skillConfig.EffectValue11 / 100),
                            Language.Get("InspireNoMention"),
                            (bool isOk, bool toggle) =>
                            {
                                if (toggle)
                                {
                                    model.moneyCostRemind = false;
                                }
                                if (isOk)
                                {
                                    if (PlayerDatas.Instance.baseData.diamond < config.MoneyCnt)
                                    {
                                        WindowCenter.Instance.Open<RechargeTipWin>();
                                        return;
                                    }
                                    var pak = new CB10A_tagCMFBBuyBuff();
                                    pak.MapID = (uint)config.DataMapId;
                                    pak.MoneyCnt = (ushort)config.MoneyCnt;
                                    GameNetSystem.Instance.SendInfo(pak);
                                }
                            });
                    }
                    else
                    {
                        var pak = new CB10A_tagCMFBBuyBuff();
                        pak.MapID = (uint)config.DataMapId;
                        pak.MoneyCnt = (ushort)config.MoneyCnt;
                        GameNetSystem.Instance.SendInfo(pak);
                    }
                }
            }
        }
        private void FreeReturnBlood()
        {
            if (freeReturnId != 0)
            {
                var config = DungeonUseBuffConfig.Get(freeReturnId);
                var seconds = GetBuffSeconds(freeReturnId);
                if (seconds <= 0)
                {
                    var pak = new CB10A_tagCMFBBuyBuff();
                    pak.MapID = (uint)config.DataMapId;
                    pak.MoneyCnt = (ushort)config.MoneyCnt;
                    GameNetSystem.Instance.SendInfo(pak);
                }
            }
        }
        private void OnUseBuffTimeRefresh()
        {
            DisplayTime();
        }
        public void Dispose()
        {
            model.onUseBuffTimeRefresh -= OnUseBuffTimeRefresh;
        }
        [Serializable]
        public class ReturnBloodBeha
        {
            [SerializeField] Image m_Mask;
            [SerializeField] Text m_Time;
            [SerializeField] Text m_Cost;
            [SerializeField] Text m_Effect;
            int id = 0;
            float seconds = 0f;
            public void Display(int id)
            {
                this.id = id;
                var config = DungeonUseBuffConfig.Get(id);
                if (config.MoneyCnt != 0)
                {
                    m_Cost.text = config.MoneyCnt.ToString();
                }
                var skillConfig = SkillConfig.Get(config.BuffID);
                m_Effect.text = Language.Get("HazyReturnBlood", skillConfig.EffectValue11 / 100);
                m_Mask.gameObject.SetActive(false);
            }
            public void SetCoolDown(float seconds)
            {
                this.seconds = seconds;
                if (seconds <= 0 && m_Mask.gameObject.activeSelf)
                {
                    m_Mask.gameObject.SetActive(false);
                }
            }
            void DisplayMask()
            {
                var config = DungeonUseBuffConfig.Get(id);
                var progress = Mathf.Clamp01(seconds / config.CD);
                m_Mask.fillAmount = progress;
                if (!m_Mask.gameObject.activeSelf)
                {
                    m_Mask.gameObject.SetActive(true);
                }
                m_Time.text = ((int)seconds).ToString();
            }
            public void OnUpdate()
            {
                if (seconds > 0f)
                {
                    seconds -= Time.deltaTime;
                    DisplayMask();
                    if (seconds <= 0f)
                    {
                        m_Mask.gameObject.SetActive(false);
                    }
                }
            }
        }
    }
}
System/Dungeon/DungeonUseBuffModel.cs
New file
@@ -0,0 +1,96 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Snxxz.UI
{
    public class DungeonUseBuffModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
    {
        Dictionary<int, List<int>> m_UseBuffMaps = new Dictionary<int, List<int>>();
        Dictionary<int, Dictionary<int, uint>> m_UseBuffTimes = new Dictionary<int, Dictionary<int, uint>>();
        public bool moneyCostRemind { get; set; }
        public event Action onUseBuffTimeRefresh;
        public override void Init()
        {
            ParseConfig();
            StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
        }
        public void OnBeforePlayerDataInitialize()
        {
            m_UseBuffTimes.Clear();
        }
        public void OnPlayerLoginOk()
        {
        }
        public override void UnInit()
        {
            StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
        }
        private void OnStageLoadFinish()
        {
            moneyCostRemind = true;
        }
        void ParseConfig()
        {
            var configs = DungeonUseBuffConfig.GetValues();
            foreach (var config in configs)
            {
                List<int> ids = null;
                if (!m_UseBuffMaps.TryGetValue(config.DataMapId, out ids))
                {
                    ids = new List<int>();
                    m_UseBuffMaps.Add(config.DataMapId, ids);
                }
                ids.Add(config.ID);
            }
        }
        public bool IsDungeonUseBuff(int mapId)
        {
            return m_UseBuffMaps.ContainsKey(mapId);
        }
        public List<int> GetDungeonUseBuffs(int mapId)
        {
            return m_UseBuffMaps.ContainsKey(mapId) ? m_UseBuffMaps[mapId] : null;
        }
        public uint GetUseBuffTime(int mapId, int moneyCnt)
        {
            if (m_UseBuffTimes.ContainsKey(mapId)
                && m_UseBuffTimes[mapId].ContainsKey(moneyCnt))
            {
                return m_UseBuffTimes[mapId][moneyCnt];
            }
            return 0;
        }
        public void ReceivePackage(HB215_tagMCFBBuyBuffInfo package)
        {
            for (int i = 0; i < package.Cnt; i++)
            {
                var data = package.InfoList[i];
                Dictionary<int, uint> dict = null;
                if (!m_UseBuffTimes.TryGetValue((int)data.MapID, out dict))
                {
                    dict = new Dictionary<int, uint>();
                    m_UseBuffTimes.Add((int)data.MapID, dict);
                }
                dict[data.MoneyCnt] = data.BuyTime;
            }
            if (onUseBuffTimeRefresh != null)
            {
                onUseBuffTimeRefresh();
            }
        }
    }
}
System/Dungeon/DungeonUseBuffModel.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: b96475bae31cb2f49b91ee730474aa55
timeCreated: 1555415547
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/HazyRegion/HazyDemonKingModel.cs
@@ -61,8 +61,18 @@
            {
                var requireRefreshPlayer = false;
                var actors = GAMgr.Instance.GetGroupList(E_ActorGroup.Player);
                if ((actors != null && actors.Count != m_PlayerInfos.Count)
                    || (actors == null && m_PlayerInfos.Count != 0))
                var playerCount = 0;
                foreach (var sid in m_PlayerInfos.Keys)
                {
                    if (sid != PlayerDatas.Instance.PlayerId)
                    {
                        playerCount++;
                    }
                }
                if ((actors != null && actors.Count != playerCount)
                    || (actors == null && playerCount != 0))
                {
                    requireRefreshPlayer = true;
                }
@@ -183,7 +193,16 @@
        public void SendSelectAtkTarget(uint serverInstId)
        {
            var actor = GAMgr.Instance.GetBySID(serverInstId);
            if (actor != null)
            {
                var hero = PlayerDatas.Instance.hero;
                if (hero != null)
                {
                    hero.LockTarget = actor;
                    hero.SelectTarget = actor;
                }
            }
        }
        public uint GetPlayerAtkTarget(uint serverInstId)
@@ -192,6 +211,18 @@
            {
                return ClientHazyDemonKingStage.GetClientBossSid();
            }
            if (serverInstId == PlayerDatas.Instance.PlayerId)
            {
                var hero = PlayerDatas.Instance.hero;
                if (hero != null && hero.SelectTarget != null)
                {
                    return hero.SelectTarget.ServerInstID;
                }
            }
            else
            {
            }
            return 0;
        }
System/HazyRegion/HazyDemonKingPlayerBehaviour.cs
@@ -16,6 +16,7 @@
        [SerializeField] Transform m_ContainerFightState;
        [SerializeField] Image m_FightSign;
        [SerializeField] Text m_AtkState;
        [SerializeField] UIEffect m_FightingEffect;
        [SerializeField] Button m_SelectAtk;
        bool dirty = false;
@@ -102,14 +103,20 @@
                switch (atkState)
                {
                    case 0:
                        m_FightingEffect.Play();
                        m_FightSign.gameObject.SetActive(false);
                        m_AtkState.text = Language.Get("DemonKingFightState_0");
                        m_AtkState.color = UIHelper.GetUIColor(TextColType.Red, true);
                        break;
                    case 1:
                        m_FightingEffect.StopImediatly();
                        m_FightSign.gameObject.SetActive(true);
                        m_AtkState.text = Language.Get("DemonKingFightState_1");
                        m_AtkState.color = UIHelper.GetUIColor(TextColType.Red, true);
                        break;
                    case 2:
                        m_FightingEffect.StopImediatly();
                        m_FightSign.gameObject.SetActive(true);
                        m_AtkState.text = Language.Get("DemonKingFightState_2");
                        m_AtkState.color = UIHelper.GetUIColor(TextColType.NavyBrown, true);
                        break;
System/HazyRegion/HazyGrassDungeonWin.cs
@@ -124,7 +124,7 @@
                    var refreshSeconds = npcInfos[i].refreshMinute * 60;
                    var seconds = refreshSeconds - used % refreshSeconds;
                    var npcConfig = NPCConfig.Get(npcInfos[i].npcId);
                    m_GrassTimes[i].text = string.Format("{0}{1}后刷新", npcConfig.charName,
                    m_GrassTimes[i].text = Language.Get("HazyGrassRefresh", npcConfig.charName,
                        TimeUtility.SecondsToMS(seconds));
                }
                else
@@ -176,7 +176,7 @@
            public void Display(int npcId, int count)
            {
                var npcConfig = NPCConfig.Get(npcId);
                m_Title.text = string.Format("剩余{0}数量:", npcConfig.charName);
                m_Title.text = Language.Get("HazyGrassCountTitle", npcConfig.charName);
                m_Count.text = count.ToString();
                m_Count.color = UIHelper.GetUIColor(count > 0 ? TextColType.Green : TextColType.Red);
            }
System/WindowBase/ModelCenter.cs
@@ -234,6 +234,7 @@
            RegisterModel<HazyRegionModel>();
            RegisterModel<HazyDemonKingModel>();
            RegisterModel<HazyGrassModel>();
            RegisterModel<DungeonUseBuffModel>();
            inited = true;
        }
Utility/ConfigInitiator.cs
@@ -292,6 +292,7 @@
        normalTasks.Add(new ConfigInitTask("HazyRegionConfig", () => { HazyRegionConfig.Init(); }, () => { return HazyRegionConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("AdventureDialogueConfig", () => { AdventureDialogueConfig.Init(); }, () => { return AdventureDialogueConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("MapNpcRefreshConfig", () => { MapNpcRefreshConfig.Init(); }, () => { return MapNpcRefreshConfig.inited; }));
        normalTasks.Add(new ConfigInitTask("DungeonUseBuffConfig", () => { DungeonUseBuffConfig.Init(); }, () => { return DungeonUseBuffConfig.inited; }));
    }
    static List<ConfigInitTask> doingTasks = new List<ConfigInitTask>();
Utility/OperationLogCollect.cs
@@ -22,6 +22,7 @@
            tables["EventID"] = 9001.ToString();
            tables["ProductID"] = "xbqy";
            tables["Device"] = SystemInfo.deviceName;
            tables["DeviceFlag"] = SDKUtility.Instance.Device.imei;
            tables["IP"] = DeviceUtility.GetIp();
            tables["DeviceFlag"] = DeviceUtility.GetDeviceUniquenessIdentify();
            tables["Flag"] = "1001";
@@ -46,7 +47,7 @@
            tables["ProductID"] = "xbqy";
            tables["Device"] = SystemInfo.deviceName;
            tables["IP"] = DeviceUtility.GetIp();
            tables["DeviceFlag"] = string.IsNullOrEmpty(SDKUtility.Instance.Device.uniqueID) ? "other" : SDKUtility.Instance.Device.uniqueID;
            tables["DeviceFlag"] = SDKUtility.Instance.Device.imei;
            tables["Flag"] = VersionConfig.Get().clientPackageFlag;
            tables["Time"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            tables["Step"] = _step.ToString();
@@ -85,6 +86,7 @@
            var device = new Dictionary<string, string>();
            device["IMEI"] = DeviceUtility.GetDeviceUniquenessIdentify();
            device["DeviceFlag"] = SDKUtility.Instance.Device.imei;
#if UNITY_ANDROID
            device["IMEI2"] = SDKUtility.Instance.Device.imei;
#endif
@@ -121,6 +123,7 @@
        tables["Level"] = PlayerDatas.Instance.baseData.LV.ToString();
        tables["RoleID"] = PlayerDatas.Instance.baseData.PlayerName;
        tables["VIPLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
        tables["DeviceFlag"] = SDKUtility.Instance.Device.imei;
        var contentPrefix = StringUtility.Contact("IMEI:", DeviceUtility.GetDeviceUniquenessIdentify(), ";");
        contentPrefix = StringUtility.Contact(contentPrefix, "Brand:", DeviceUtility.GetDeviceName(), ";");
@@ -157,6 +160,7 @@
        tables["Level"] = PlayerDatas.Instance.baseData.LV.ToString();
        tables["VIPLevel"] = PlayerDatas.Instance.baseData.VIPLv.ToString();
        tables["Content"] = WWW.EscapeURL(UIHelper.TrimContentToServer(content));
        tables["DeviceFlag"] = SDKUtility.Instance.Device.imei;
        HttpRequest.Instance.RequestHttpGet(StringUtility.Contact(chatReportUrl, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
#endif