少年修仙传客户端代码仓库
client_Wu Xijin
2019-04-29 469866975156c12945f65f0d6f7e6d57ec4f782f
Merge branch 'master' into SubWindow
22个文件已修改
4个文件已添加
1009 ■■■■ 已修改文件
Fight/Actor/AI/Process/PN_ShowSkillTip.cs 55 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_ShowSkillTip.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/ProcessManager.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/ProcessNode.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/SoProcessNode.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyDrugWin.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyStoveBehaviour.cs 119 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Alchemy/AlchemyUseDrugWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/BossShow/ShowActor.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipGemWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthHeadBehaviour.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthModel.cs 293 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthSelectBehaviour.cs 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipGem/EquipStrengthWin.cs 191 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingModel.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyGrassModel.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/KnapSack/Logic/ItemLogicUtility.cs 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/LowSettingTip.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskModel.cs 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/RidingPet/RidingPetBossHintWin.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/ReikiFuncOpenWin.cs 75 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/ReikiFuncOpenWin.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/ReikiRootModel.cs 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/ReikiRootWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/TreasureSkillModel.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/TreasureSkillWin.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/Process/PN_ShowSkillTip.cs
New file
@@ -0,0 +1,55 @@
using System;
using Snxxz.UI;
public class PN_ShowSkillTip : ProcessNode
{
    private bool m_IsCompelete = false;
    public PN_ShowSkillTip(int id)
    {
        param = id;
    }
    public override void Init()
    {
        m_IsCompelete = false;
        var _config = bossSkillTipsConfig.Get(param);
        if (_config != null)
        {
            BossNotify.Notify(_config.SkillID);
            BossNotify.OnNotifyStateEvent -= OnNotifyCompelete;
            BossNotify.OnNotifyStateEvent += OnNotifyCompelete;
        }
#if UNITY_EDITOR
        if (RuntimeLogUtility.s_LogProcessInfo)
        {
            UnityEngine.Debug.LogFormat("显示技能提示: {0}");
        }
#endif
    }
    private void OnNotifyCompelete(int id, bool ok)
    {
        if (id == param)
        {
            if (!ok)
            {
                m_IsCompelete = true;
            }
        }
    }
    public override bool IsOver()
    {
        return m_IsCompelete;
    }
    public override void UnInit()
    {
        BossNotify.OnNotifyStateEvent -= OnNotifyCompelete;
    }
    public override void Update()
    {
    }
}
Fight/Actor/AI/Process/PN_ShowSkillTip.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: bdf7bb184a77d884592abb5e52bdb6ee
timeCreated: 1556431442
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
Fight/Actor/AI/Process/ProcessManager.cs
@@ -99,6 +99,9 @@
                case ProcessNode.E_ProcessType.StartPlayerAI:
                    m_NodeQueue.Enqueue(new PN_StartPlayerAI());
                    break;
                case ProcessNode.E_ProcessType.ShowSkillTip:
                    m_NodeQueue.Enqueue(new PN_ShowSkillTip(_node.param));
                    break;
            }
        }
    }
Fight/Actor/AI/Process/ProcessNode.cs
@@ -17,6 +17,7 @@
        PlayEffect,
        StopEffect,
        StartPlayerAI,
        ShowSkillTip,
    }
    public int param;
Fight/Actor/AI/Process/SoProcessNode.cs
@@ -109,6 +109,10 @@
            else if (_node.nodeType == ProcessNode.E_ProcessType.StartPlayerAI)
            {
            }
            else if (_node.nodeType == ProcessNode.E_ProcessType.ShowSkillTip)
            {
                _Item(ref _node, "技能提示");
            }
            EditorGUILayout.EndVertical();
            EditorGUILayout.BeginVertical();
            if (GUILayout.Button("删除", GUILayout.Height(20)))
System/Alchemy/AlchemyDrugWin.cs
@@ -21,6 +21,7 @@
        [SerializeField] AlchemyStudyBehaviour m_AlchemyStudy;
        [SerializeField] AlchemyBriefBehaviour m_AlchemyBrief;
        [SerializeField] AlchemyStoveBehaviour m_AlchemyStove;
        [SerializeField] UIEffect m_StudySuccEffect;
        AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
        #region Built-in
@@ -124,6 +125,13 @@
        private void AlchemyStateRefresh()
        {
            DisplayAlchmey();
            var lastGrasp = !m_AlchemyStudy.gameObject.activeSelf;
            if (model.isServerPrepare && !lastGrasp && model.IsGraspRecipe(model.selectAlchemy))
            {
                m_StudySuccEffect.Play();
            }
        }
        void DisplayAlchmey()
System/Alchemy/AlchemyStoveBehaviour.cs
@@ -8,6 +8,7 @@
{
    public class AlchemyStoveBehaviour : MonoBehaviour
    {
        [SerializeField] Transform m_ContainerMaterials;
        [SerializeField] AlchemyMaterial[] m_AlchemyMaterials;
        [SerializeField] Transform m_ContainerAlcheming;
@@ -26,6 +27,14 @@
        [SerializeField] Text m_FuncLabel;
        [SerializeField] Transform m_ContainerUnGrasp;
        [SerializeField] UIEffect m_AlchemingEffect;
        [SerializeField] UIEffect m_AlchemyCompleteEffect;
        [SerializeField] UIEffect[] m_AlchemyFlyEffects;
        [SerializeField] Transform m_ContainerFlyMaterials;
        [SerializeField] Transform[] m_FlyMaterials;
        [SerializeField] Image[] m_FlyIcons;
        [SerializeField] UIEffect m_AlchemyBoomEffect;
        int m_State = 0; //0-正常状态 1-炼丹中 2-炼丹结束
        int state
        {
@@ -41,6 +50,8 @@
        }
        float timer = 0f;
        bool animationStep = false;
        AlchemyModel model { get { return ModelCenter.Instance.GetModel<AlchemyModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
@@ -91,9 +102,16 @@
            m_ContainerNormal.gameObject.SetActive(state == 0);
            m_ContainerComplete.gameObject.SetActive(state == 2);
            m_AlchemingEffect.StopImediatly();
            m_AlchemyCompleteEffect.StopImediatly();
            m_ContainerMaterials.gameObject.SetActive(false);
            m_ContainerFlyMaterials.gameObject.SetActive(false);
            switch (state)
            {
                case 0:
                    m_ContainerMaterials.gameObject.SetActive(true);
                    m_StoveLevel.text = StringUtility.Contact("Lv.", model.stoveLevel);
                    var isMax = !RefineStoveConfig.Has(model.stoveLevel + 1);
                    var stoveConfig = RefineStoveConfig.Get(model.stoveLevel);
@@ -110,16 +128,11 @@
                    }
                    break;
                case 1:
                    uint tick = 0;
                    if (model.TryGetAlchemyStartTime(model.selectAlchemy, out tick))
                    {
                        var config = AlchemyConfig.Get(model.selectAlchemy);
                        var startTime = TimeUtility.GetTime(tick);
                        var seconds = (int)(config.NeedTime - (float)(TimeUtility.ServerNow - startTime).TotalSeconds);
                        m_AlchemyTime.text = TimeUtility.SecondsToHMS(seconds);
                    }
                    m_AlchemingEffect.Play();
                    DisplayAlchemyTime();
                    break;
                case 2:
                    m_AlchemyCompleteEffect.Play();
                    break;
            }
@@ -164,6 +177,62 @@
            }
        }
        void DisplayAlchemyTime()
        {
            uint tick = 0;
            if (model.TryGetAlchemyStartTime(model.selectAlchemy, out tick))
            {
                var config = AlchemyConfig.Get(model.selectAlchemy);
                var startTime = TimeUtility.GetTime(tick);
                var seconds = (int)(config.NeedTime - (float)(TimeUtility.ServerNow - startTime).TotalSeconds);
                m_AlchemyTime.text = TimeUtility.SecondsToHMS(seconds);
            }
        }
        void DisplayAnimation()
        {
            m_ContainerMaterials.gameObject.SetActive(false);
            m_ContainerFlyMaterials.gameObject.SetActive(true);
            List<Item> materials;
            model.TryGetAlchemyMaterials(model.selectAlchemy, out materials);
            for (int i = 0; i < m_FlyMaterials.Length; i++)
            {
                m_FlyMaterials[i].gameObject.SetActive(i < materials.Count);
                if (i < materials.Count)
                {
                    var itemConfig = ItemConfig.Get(materials[i].id);
                    m_FlyIcons[i].SetSprite(itemConfig.IconKey);
                    m_AlchemyFlyEffects[i].Play();
                    var parent = m_AlchemyFlyEffects[i].target.transform.Find("Animation/GuadianAnimation");
                    if (parent != null)
                    {
                        m_FlyMaterials[i].SetParent(parent);
                        m_FlyMaterials[i].transform.localPosition = Vector3.zero;
                    }
                }
                else
                {
                    m_AlchemyFlyEffects[i].StopImediatly();
                }
            }
            StartCoroutine(Co_DisplayAnimation());
        }
        IEnumerator Co_DisplayAnimation()
        {
            m_AlchemyBoomEffect.Play();
            yield return WaitingForSecondConst.WaitMS700;
            m_ContainerFlyMaterials.gameObject.SetActive(false);
            for (int i = 0; i < m_FlyMaterials.Length; i++)
            {
                m_FlyMaterials[i].SetParent(m_ContainerFlyMaterials);
            }
            animationStep = false;
            m_State = model.GetStoveState(model.selectAlchemy);
            DisplayStove();
        }
        private void SelectAlchemyRefresh()
        {
            m_State = model.GetStoveState(model.selectAlchemy);
@@ -173,9 +242,27 @@
        private void AlchemyStateRefresh()
        {
            m_State = model.GetStoveState(model.selectAlchemy);
            DisplayStove();
            DisplayAlchemyMaterials();
            animationStep = false;
            if (model.isServerPrepare)
            {
                var newState = model.GetStoveState(model.selectAlchemy);
                if (newState == 1 && state == 0)
                {
                    animationStep = true;
                }
            }
            if (!animationStep)
            {
                m_State = model.GetStoveState(model.selectAlchemy);
                DisplayStove();
                DisplayAlchemyMaterials();
            }
            if (animationStep)
            {
                DisplayAnimation();
            }
        }
        private void PlayerDataRefreshEvent(PlayerDataType dataType)
@@ -198,13 +285,18 @@
        private void PerSecond()
        {
            if (animationStep)
            {
                return;
            }
            var _state = model.GetStoveState(model.selectAlchemy);
            if (_state == state)
            {
                if (state == 1)
                {
                    DisplayStove();
                    DisplayAlchemyTime();
                }
            }
            else
@@ -300,6 +392,9 @@
            model.alchemyStateRefresh -= AlchemyStateRefresh;
            PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
            packModel.refreshItemCountEvent -= RefreshItemCountEvent;
            StopAllCoroutines();
            animationStep = false;
        }
    }
System/Alchemy/AlchemyUseDrugWin.cs
@@ -137,7 +137,7 @@
            var rhs_Config = ItemConfig.Get(rhs);
            if (lhs_Config.LV != rhs_Config.LV)
            {
                return -lhs_Config.LV.CompareTo(rhs_Config.LV);
                return lhs_Config.LV.CompareTo(rhs_Config.LV);
            }
            return lhs.CompareTo(rhs);
        }
System/BossShow/ShowActor.cs
@@ -127,8 +127,6 @@
            if (m_Animator != null)
            {
                m_Animator.enabled = true;
                m_Animator.Play(Animator.StringToHash("Idle"), 0, 0);
                nextAction = 0;
                if (m_Index < actorShowModel.clipActions.Length)
                {
                    nextAction = actorShowModel.clipActions[m_Index];
@@ -137,6 +135,7 @@
                {
                    nextAction = GAStaticDefine.Act_Show;
                }
                m_Animator.Update(0);
            }
        }
        else
@@ -189,6 +188,7 @@
    {
        if (m_Animator != null)
        {
            m_Animator.Play(Animator.StringToHash("Idle"), 0, 0);
            m_Animator.enabled = false;
            if (m_CacheAnimator)
System/EquipGem/EquipGemWin.cs
@@ -226,10 +226,10 @@
                    var slotCount = model.GetUnlockEquipSlotCount(level);
                    if (slotCount > 0)
                    {
                        m_Sorts.Clear();
                        m_Controller.AddCell(ScrollerDataType.Header, level);
                        if (model.selectLevel == level)
                        {
                            m_Sorts.Clear();
                            m_Sorts.AddRange(model.GetMosaicEquipPlaces());
                            m_Sorts.Sort(EquipCompare);
                            foreach (var place in m_Sorts)
System/EquipGem/EquipStrengthHeadBehaviour.cs
@@ -48,7 +48,8 @@
            m_Select.SetListener(OnSelect);
            Redpoint redpoint;
            m_Redpoint.redpointId = 0;
            strengthModel.TryGetRedpoint(level, out redpoint);
            m_Redpoint.redpointId = redpoint.id;
        }
        private void OnSelect()
System/EquipGem/EquipStrengthModel.cs
@@ -54,6 +54,8 @@
    public event Action SelectEquipRefresh;//二级页签刷新
    public event Action SelectLevelRefresh;//一级页签刷新
    public List<int> equipPlaces { get; private set; }
    private bool isChangeBool = true;
    public bool IsChangeBool {
        get { return isChangeBool; }
@@ -92,27 +94,114 @@
    public Int2 jumpEquipPosition { get; set; }
    public bool isServerPrepare { get; private set; }
    public readonly Redpoint redpoint = new Redpoint(106, 10601);
    public static int REDPOINTBASE = 106010000;
    Dictionary<int, Redpoint> m_EquipSetRedpoints = new Dictionary<int, Redpoint>();
    Dictionary<int, EquipStrengthRedpoint> m_EquipStrengthRedpoints = new Dictionary<int, EquipStrengthRedpoint>();
    Dictionary<Int2, Redpoint> equipPositionRed = new Dictionary<Int2, Redpoint>();
    PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
    EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
    EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
    public override void Init()
    {
        var strengthenLevelLimit = FuncConfigConfig.Get("StrengthenLevelLimit").Numerical1;
        PartTypeDic = ConfigParse.GetDic<int, int>(strengthenLevelLimit);
        GetEquipLevelMax();
        GetEvolutionTypeMax();
        equipPlaces = new List<int>(12);
        for (int i = 1; i <= 12; i++)
        {
            equipPlaces.Add(i);
        }
        var configs = EquipControlConfig.GetValues();
        var totalEquipLevels = new List<int>();
        foreach (var item in configs)
        {
            var level = item.level;
            if (!totalEquipLevels.Contains(level))
            {
                totalEquipLevels.Add(level);
            }
        }
        foreach (var level in totalEquipLevels)
        {
            var equipSetRedpointBase = REDPOINTBASE++;
            m_EquipSetRedpoints[level] = new Redpoint(redpoint.id, equipSetRedpointBase);
            foreach (var place in equipPlaces)
            {
                var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
                if (!m_EquipStrengthRedpoints.ContainsKey(packIndex))
                {
                    EquipStrengthRedpoint _redpoint = new EquipStrengthRedpoint(equipSetRedpointBase);
                    m_EquipStrengthRedpoints.Add(packIndex, _redpoint);
                }
            }
        }
        packModel.refreshItemCountEvent += RefreshItemCountEvent;
        FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
        PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
    }
    public void OnBeforePlayerDataInitialize()
    {
        isServerPrepare = false;
    }
    public void OnPlayerLoginOk()
    {
        UpdateRedpoint();
        isServerPrepare = true;
    }
    public override void UnInit()
    {
        packModel.refreshItemCountEvent -= RefreshItemCountEvent;
        FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
        PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
    }
    private void PlayerDataRefreshEvent(PlayerDataType dataType)
    {
        if (dataType == PlayerDataType.Silver)
        {
            if (isServerPrepare)
            {
                UpdateRedpoint();
            }
        }
    }
    private void OnFuncStateChangeEvent(int id)
    {
        if (id == (int)FuncOpenEnum.Strength)
        {
            if (isServerPrepare)
            {
                UpdateRedpoint();
            }
        }
    }
    private void RefreshItemCountEvent(PackType packType, int arg2, int itemId)
    {
        if (packType == PackType.Item)
        {
            if (isServerPrepare)
            {
                UpdateRedpoint();
            }
        }
    }
    public void UpdateEuipPartPlusInfo(HA3B3_tagMCEquipPartPlusInfo info)
@@ -147,6 +236,11 @@
        if (EquipStrengthUpdate != null)
        {
            EquipStrengthUpdate();
        }
        if (isServerPrepare)
        {
            UpdateRedpoint();
        }
    }
@@ -350,6 +444,201 @@
        return lv;
    }
    public int GetEquipStrengthState(Int2 position)
    {
        var equipGuid = equipModel.GetEquip(position);
        if (string.IsNullOrEmpty(equipGuid))
        {
            return 3;
        }
        var serverPlace = EquipPlaceMapConfig.GetServerPlace(position.x, position.y);
        var item = packModel.GetItemByGuid(equipGuid);
        var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, position.x);
        int star = Mathf.Min(maxStar, equipStarModel.GetStarLevel(position));
        int equipLevel = 0;
        int advancedLevel = 0;
        if (EquipStrengthDic.ContainsKey(serverPlace))//获取当前强化等级
        {
            equipLevel = EquipStrengthDic[serverPlace].StrengthLevel;
            advancedLevel = EquipStrengthDic[serverPlace].EvolveLV;
        }
        int equipType = EquipStrengthModel.GetEquipStrengthType(position.y);
        var itemPlusMaxConfig = ItemPlusMaxConfig.GetEquipTypeAndEquipStar(equipType, star);//获取强化等级上限值
        if (itemPlusMaxConfig == null)
        {
            return 2;
        }
        int maxLevel = GetEquipLevelMax(equipType, maxStar);//获取最大强化等级
        if (equipLevel >= maxLevel)//满级
        {
            return 2;
        }
        if (maxLevel > equipLevel && equipLevel >= itemPlusMaxConfig.levelMax)//强化上限
        {
            return 1;
        }
        return 0;
    }
    public bool SatisfyEquipAdvance(Int2 position)
    {
        int equipLv = 0;
        int advancedLv = 0;
        int itemCount = 0;
        int equipIndex = EquipPlaceMapConfig.GetServerPlace(position.x, position.y);
        if (EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
        {
            equipLv = EquipStrengthDic[equipIndex].StrengthLevel;
            advancedLv = EquipStrengthDic[equipIndex].EvolveLV;
        }
        var equipPlusEvolve = GetEquipPlusEvolve(position.y, advancedLv + 1);
        if (equipPlusEvolve == null)
        {
            return false;
        }
        if (equipPlusEvolve.NeedPlusLV > equipLv)
        {
            return false;
        }
        itemCount = packModel.GetItemCountByID(PackType.Item, equipPlusEvolve.CostItemID);
        if (equipPlusEvolve.CostItemCount > itemCount)
        {
            return false;
        }
        return true;
    }
    public bool HasEnoughMoney(Int2 position)
    {
        var config = GetEquipConfig(position.x, position.y);
        if (config == null)
        {
            return false;
        }
        ulong money = UIHelper.GetMoneyCnt(3);
        ulong requireMoney = (ulong)config.costCount;
        return requireMoney < money;
    }
    public bool TryGetRedpoint(int level, out Redpoint _redpoint)
    {
        return m_EquipSetRedpoints.TryGetValue(level, out _redpoint);
    }
    public bool TryGetRedpoint(int level, int place, out EquipStrengthRedpoint _redpoint)
    {
        var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
        return m_EquipStrengthRedpoints.TryGetValue(packIndex, out _redpoint);
    }
    void UpdateRedpoint()
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Strength))
        {
            RefreshRedpoint(Int2.zero, 0);
            return;
        }
        var equipSets = equipModel.GetAllEquipSets();
        foreach (var level in equipSets)
        {
            foreach (var place in equipPlaces)
            {
                var position = new Int2(level, place);
                var equipGuid = equipModel.GetEquip(position);
                if (string.IsNullOrEmpty(equipGuid))
                {
                    continue;
                }
                if (SatisfyEquipAdvance(position))
                {
                    RefreshRedpoint(position, 2);
                    return;
                }
            }
        }
        var satisfyPosition = Int2.zero;
        var minStage = int.MaxValue;
        foreach (var level in equipSets)
        {
            foreach (var place in equipPlaces)
            {
                var position = new Int2(level, place);
                var equipGuid = equipModel.GetEquip(position);
                if (string.IsNullOrEmpty(equipGuid))
                {
                    continue;
                }
                var state = GetEquipStrengthState(position);
                if (state != 0)
                {
                    continue;
                }
                if (!HasEnoughMoney(position))
                {
                    continue;
                }
                var serverPlace = EquipPlaceMapConfig.GetServerPlace(position.x, position.y);
                var strengthLevel = EquipStrengthDic[serverPlace].StrengthLevel;
                var stage = strengthLevel / 20;
                if (minStage > stage)
                {
                    minStage = stage;
                    satisfyPosition = position;
                }
            }
        }
        RefreshRedpoint(satisfyPosition, 1);
    }
    void RefreshRedpoint(Int2 position, int type)
    {
        var equipSets = equipModel.GetAllEquipSets();
        foreach (var level in equipSets)
        {
            foreach (var place in equipPlaces)
            {
                var packIndex = EquipPlaceMapConfig.GetServerPlace(level, place);
                EquipStrengthRedpoint redpoint;
                TryGetRedpoint(level, place, out redpoint);
                redpoint.strengthRedpoint.state =
                    position.x == level && position.y == place && type == 1 ? RedPointState.Simple : RedPointState.None;
                redpoint.advanceRedpoint.state =
                    position.x == level && position.y == place && type == 2 ? RedPointState.Simple : RedPointState.None;
            }
        }
    }
    public class EquipStrengthRedpoint
    {
        public readonly Redpoint redpoint;
        public readonly Redpoint strengthRedpoint;
        public readonly Redpoint advanceRedpoint;
        public EquipStrengthRedpoint(int baseId)
        {
            redpoint = new Redpoint(baseId, EquipStrengthModel.REDPOINTBASE++);
            strengthRedpoint = new Redpoint(redpoint.id, EquipStrengthModel.REDPOINTBASE++);
            advanceRedpoint = new Redpoint(redpoint.id, EquipStrengthModel.REDPOINTBASE++);
        }
    }
}
System/EquipGem/EquipStrengthSelectBehaviour.cs
@@ -22,7 +22,6 @@
        [SerializeField] Button m_Select;
        [SerializeField] RedpointBehaviour m_Redpoint;
        EquipGemModel model { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }      
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        EquipStrengthModel strengthModel { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
@@ -49,8 +48,11 @@
            if (equiped)
            {
                DisplayBase();
                EquipGemRedpoint equipGemRedpoint;
                m_Redpoint.redpointId = 0;
                EquipStrengthModel.EquipStrengthRedpoint redpoint;
                if (strengthModel.TryGetRedpoint(level, place, out redpoint))
                {
                    m_Redpoint.redpointId = redpoint.redpoint.id;
                }
            }
            else
            {
System/EquipGem/EquipStrengthWin.cs
@@ -29,12 +29,14 @@
        [SerializeField] Button m_AutomaticBtn;
        [SerializeField] Button m_StopBtn;
        [SerializeField] RedpointBehaviour m_AdvanceRedpoint;
        [SerializeField] RedpointBehaviour m_StrengthRedpoint;
        [SerializeField] UIEffect m_UIEffect1A;
        [SerializeField] UIEffect m_UIEffect1B;
        [SerializeField] UIEffect m_UIEffect1C;
        EquipStrengthModel model { get { return ModelCenter.Instance.GetModel<EquipStrengthModel>(); } }
        EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        EquipStarModel equipStarModel { get { return ModelCenter.Instance.GetModel<EquipStarModel>(); } }
@@ -42,6 +44,9 @@
        private bool IsAutomaticBool = false;
        private float WaitTime = 0.1f;
        private float Times = 0f;
        List<int> m_Sorts = new List<int>();
        #region Built-in
        protected override void BindController()
        {
@@ -135,23 +140,18 @@
                }
                if (equipSet.unLocked)
                {
                    var slotCount = equipGemModel.GetUnlockEquipSlotCount(level);
                    if (slotCount > 0)
                    jumpIndex++;
                    if (model.SelectLevel == level)
                    {
                        jumpIndex++;
                        if (equipGemModel.selectLevel == level)
                        foreach (var place in m_Sorts)
                        {
                            var places = equipGemModel.GetMosaicEquipPlaces();
                            foreach (var place in places)
                            if (equipSet.IsSlotUnLocked(place))
                            {
                                if (equipSet.IsSlotUnLocked(place))
                                if (selectLevel == level && selectPlace == place)
                                {
                                    if (selectLevel == level && selectPlace == place)
                                    {
                                        return jumpIndex;
                                    }
                                    jumpIndex++;
                                    return jumpIndex;
                                }
                                jumpIndex++;
                            }
                        }
                    }
@@ -221,19 +221,17 @@
                }
                if (equipSet.unLocked)
                {
                    var slotCount = equipGemModel.GetUnlockEquipSlotCount(level);
                    if (slotCount > 0)
                    m_Controller.AddCell(ScrollerDataType.Header, level);
                    if (model.SelectLevel == level)
                    {
                        m_Controller.AddCell(ScrollerDataType.Header, level);
                        if (model.SelectLevel == level)
                        m_Sorts.Clear();
                        m_Sorts.AddRange(model.equipPlaces);
                        m_Sorts.Sort(EquipCompare);
                        foreach (var place in m_Sorts)
                        {
                            var places = equipGemModel.GetMosaicEquipPlaces();
                            foreach (var place in places)
                            if (equipSet.IsSlotUnLocked(place))
                            {
                                if (equipSet.IsSlotUnLocked(place))
                                {
                                    m_Controller.AddCell(ScrollerDataType.Normal, level * 1000 + place);
                                }
                                m_Controller.AddCell(ScrollerDataType.Normal, level * 1000 + place);
                            }
                        }
                    }
@@ -241,6 +239,18 @@
            }
            m_Controller.Restart();
        }
        private int EquipCompare(int x, int y)
        {
            var x_state = model.GetEquipStrengthState(new Int2(model.SelectLevel, x));
            var y_state = model.GetEquipStrengthState(new Int2(model.SelectLevel, y));
            if (x_state != y_state)
            {
                return x_state.CompareTo(y_state);
            }
            return x.CompareTo(y);
        }
        private void SelectEquipRefresh()
        {
            m_Controller.m_Scorller.RefreshActiveCellViews();
@@ -292,70 +302,51 @@
                m_ContainerStrength.gameObject.SetActive(false);
                return;
            }
            m_ContainerEmpty.gameObject.SetActive(false);
            m_ContainerStrength.gameObject.SetActive(true);
            m_NotEquipped.SetActive(false);
            m_EquipStrengthFull.gameObject.SetActive(false);
            m_EquipStrengthUpper.gameObject.SetActive(false);
            m_EquipStrengthRein.gameObject.SetActive(false);
            m_EquipEvolution.gameObject.SetActive(false);
            int equipLevel = model.SelectLevel;
            int equipPlace = model.SelectEquipPlace;
            var equipSet = equipModel.GetEquipSet(equipLevel);
            string equipGuid = string.Empty;
            equipGuid = equipSet.GetEquip(equipPlace);
            var equiped = !string.IsNullOrEmpty(equipGuid);
            if (equiped)
            EquipStrengthModel.EquipStrengthRedpoint redpoint;
            if (model.TryGetRedpoint(model.SelectLevel, model.SelectEquipPlace, out redpoint))
            {
                int equipIndex = EquipPlaceMapConfig.GetServerPlace(equipLevel, equipPlace);
                var item = packModel.GetItemByGuid(equipGuid);
                var maxStar = EquipStarModel.GetMaxStarLevel(item.config.ItemColor, equipLevel);
                int star = Mathf.Min(maxStar, equipStarModel.GetStarLevel(new Int2(equipLevel, equipPlace)));
                int equipLv = 0;
                int advancedLv = 0;
                if (model.EquipStrengthDic.ContainsKey(equipIndex))//获取当前强化等级
                {
                    equipLv = model.EquipStrengthDic[equipIndex].StrengthLevel;
                    advancedLv = model.EquipStrengthDic[equipIndex].EvolveLV;
                }
                int equipType = EquipStrengthModel.GetEquipStrengthType(equipPlace);
                var itemPlusMaxConfig = ItemPlusMaxConfig.GetEquipTypeAndEquipStar(equipType, star);//获取强化等级上限值
                if (itemPlusMaxConfig == null)
                {
                    DebugEx.LogError("未查找到表数据");
                    return;
                }
                int maxLv = model.GetEquipLevelMax(equipType, maxStar);//获取最大强化等级
                m_EquipEvolution.gameObject.SetActive(true);
                m_EquipEvolution.SetEquipEvolution(equipPlace, advancedLv);
                if (equipLv >= maxLv)//满级
                {
                    m_BottomFrame.SetActive(false);
                    m_EquipStrengthFull.gameObject.SetActive(true);
                    m_EquipStrengthFull.SetEquipStrengthFull(equipGuid, equipLevel, equipPlace);
                }
                else if (maxLv > equipLv && equipLv >= itemPlusMaxConfig.levelMax)//强化上限
                {
                    m_BottomFrame.SetActive(true);
                    m_EquipStrengthUpper.gameObject.SetActive(true);
                    m_EquipStrengthUpper.SetEquipStrengthUpper(equipGuid, equipLevel, equipPlace);
                }
                else if (itemPlusMaxConfig.levelMax > equipLv)//可强化过
                {
                    m_BottomFrame.SetActive(true);
                    m_EquipStrengthRein.gameObject.SetActive(true);
                    m_EquipStrengthRein.SetEquipStrengthRein(equipGuid, equipLevel, equipPlace);
                }
                m_AdvanceRedpoint.redpointId = redpoint.advanceRedpoint.id;
                m_StrengthRedpoint.redpointId = redpoint.strengthRedpoint.id;
            }
            else
            var equipGuid = equipModel.GetEquip(new Int2(model.SelectLevel, model.SelectEquipPlace));
            var state = model.GetEquipStrengthState(new Int2(model.SelectLevel, model.SelectEquipPlace));
            m_NotEquipped.SetActive(state == 3);
            m_EquipStrengthFull.gameObject.SetActive(state == 2);
            m_EquipStrengthUpper.gameObject.SetActive(state == 1);
            m_EquipStrengthRein.gameObject.SetActive(state == 0);
            m_EquipEvolution.gameObject.SetActive(state != 3);
            m_BottomFrame.gameObject.SetActive(state == 1 || state == 0);
            if (state != 3)
            {
                m_BottomFrame.SetActive(false);
                m_NotEquipped.SetActive(true);
                var advancedLv = 0;
                var serverPlace = EquipPlaceMapConfig.GetServerPlace(model.SelectLevel, model.SelectEquipPlace);
                if (model.EquipStrengthDic.ContainsKey(serverPlace))
                {
                    advancedLv = model.EquipStrengthDic[serverPlace].EvolveLV;
                }
                m_EquipEvolution.SetEquipEvolution(model.SelectEquipPlace, advancedLv);
            }
            switch (state)
            {
                case 0:
                    m_EquipStrengthRein.SetEquipStrengthRein(equipGuid, model.SelectLevel, model.SelectEquipPlace);
                    break;
                case 1:
                    m_EquipStrengthUpper.SetEquipStrengthUpper(equipGuid, model.SelectLevel, model.SelectEquipPlace);
                    break;
                case 2:
                    m_EquipStrengthFull.SetEquipStrengthFull(equipGuid, model.SelectLevel, model.SelectEquipPlace);
                    break;
            }
        }
@@ -373,6 +364,22 @@
            }
            var equipSets = equipModel.GetAllEquipSets();
            foreach (var equipSet in equipSets)
            {
                var places = model.equipPlaces;
                foreach (var place in places)
                {
                    EquipStrengthModel.EquipStrengthRedpoint redpoint;
                    if (model.TryGetRedpoint(equipSet, place, out redpoint)
                        && redpoint.redpoint.state == RedPointState.Simple)
                    {
                        model.SelectLevel = equipSet;
                        model.SelectEquipPlace = place;
                        return;
                    }
                }
            }
            foreach (var level in equipSets)
            {
                var equipSet = equipModel.GetEquipSet(level);
@@ -382,22 +389,18 @@
                }
                if (equipSet.unLocked)
                {
                    var slotCount = equipGemModel.GetUnlockEquipSlotCount(level);
                    if (slotCount > 0)
                    if (model.SelectLevel == -1)
                    {
                        if (model.SelectLevel == -1)
                        model.SelectLevel = level;
                    }
                    if (model.SelectLevel == level)
                    {
                        var places = model.equipPlaces;
                        foreach (var place in places)
                        {
                            model.SelectLevel = level;
                        }
                        if (model.SelectLevel == level)
                        {
                            var places = equipGemModel.GetMosaicEquipPlaces();
                            foreach (var place in places)
                            if (model.SelectEquipPlace == -1)
                            {
                                if (model.SelectEquipPlace == -1)
                                {
                                    model.SelectEquipPlace = place;
                                }
                                model.SelectEquipPlace = place;
                            }
                        }
                    }
System/HazyRegion/HazyDemonKingModel.cs
@@ -12,6 +12,8 @@
        public bool IsInDungeon { get; private set; }
        bool requireExitClientDungeon = false;
        public int invincibleBuffId { get; private set; }
        public const int Client_MapID = 2000;
@@ -62,8 +64,9 @@
            m_AttackHeroPlayers.Clear();
            if (IsInDungeon && !IsInDemonKingDungeon(mapId))
            if (requireExitClientDungeon)
            {
                requireExitClientDungeon = false;
                ClientDungeonStageUtility.RequestExitClientDungeon();
            }
@@ -366,8 +369,9 @@
        public void RequestExitClientDungeon()
        {
            requireExitClientDungeon = true;
            ClientDungeonStageUtility.SetClientDungeon(false, 0);
            //ClientDungeonStageUtility.RequestExitClientDungeon();
            PlayerDatas.Instance.extersion.pkState = 0;
            ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
System/HazyRegion/HazyGrassModel.cs
@@ -16,6 +16,8 @@
        public bool IsInDungeon { get; private set; }
        bool requireExitClientDungeon = false;
        bool m_IsDungeonTargetDone = false;
        public bool IsDungeonTargetDone
        {
@@ -101,8 +103,9 @@
            m_MapNpcCount.Clear();
            if (IsInDungeon && !IsInGrassDungeon(mapId))
            if (requireExitClientDungeon)
            {
                requireExitClientDungeon = false;
                ClientDungeonStageUtility.RequestExitClientDungeon();
            }
@@ -338,8 +341,8 @@
        public void RequestExitClientDungeon()
        {
            requireExitClientDungeon = true;
            ClientDungeonStageUtility.SetClientDungeon(false, 0);
            //ClientDungeonStageUtility.RequestExitClientDungeon();
            PlayerDatas.Instance.extersion.pkState = 0;
            ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
System/KnapSack/Logic/ItemLogicUtility.cs
@@ -3,6 +3,7 @@
using System.Linq;
using LitJson;
using UnityEngine;
using LitJson;
namespace Snxxz.UI
{
@@ -20,6 +21,7 @@
        private List<int> equipBaseProperties = new List<int>();
        private Dictionary<int, int> promptUseLimitDict;
        private Dictionary<int, List<int>> betterEquipExceptDungeonDict;
        Dictionary<int, int> equipSkillScores = new Dictionary<int, int>();
        PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
        BuffModel buffDatas { get { return ModelCenter.Instance.GetModel<BuffModel>(); } }
@@ -27,7 +29,6 @@
        PetModel petDatas { get { return ModelCenter.Instance.GetModel<PetModel>(); } }
        StrengthenModel strengthDatas { get { return ModelCenter.Instance.GetModel<StrengthenModel>(); } }
        MagicianModel magicianModel { get { return ModelCenter.Instance.GetModel<MagicianModel>(); } }
        TrialDungeonModel trialModel { get { return ModelCenter.Instance.GetModel<TrialDungeonModel>(); } }
        ComposeWinModel composeModel { get { return ModelCenter.Instance.GetModel<ComposeWinModel>(); } }
        EquipModel equipModel { get { return ModelCenter.Instance.GetModel<EquipModel>(); } }
@@ -36,6 +37,17 @@
            var GSFormulaConfig = FuncConfigConfig.Get("EquipGSFormula");
            dogzGSFormula = GSFormulaConfig.Numerical3;
            normalGSFormula = GSFormulaConfig.Numerical1;
            var equipSkillScoreJson = JsonMapper.ToObject(GSFormulaConfig.Numerical4);
            foreach (var key in equipSkillScoreJson.Keys)
            {
                var skillId = 0;
                int.TryParse(key, out skillId);
                if (skillId != 0)
                {
                    equipSkillScores[skillId] = (int)equipSkillScoreJson[key];
                }
            }
            var baseAttr = JsonMapper.ToObject(GSFormulaConfig.Numerical2);
            if (baseAttr.IsArray)
@@ -355,13 +367,24 @@
                type = GeneralDefine.GetPackTypeByItemType(config.Type);
            }
            var skillScore = 0;
            if (config.AddSkill1 != 0 && equipSkillScores.ContainsKey(config.AddSkill1))
            {
                skillScore += equipSkillScores[config.AddSkill1];
            }
            if (config.AddSkill2 != 0 && equipSkillScores.ContainsKey(config.AddSkill2))
            {
                skillScore += equipSkillScores[config.AddSkill2];
            }
            switch (type)
            {
                case PackType.DogzEquip:
                case PackType.DogzItem:
                    return Equation.Instance.Eval<int>(dogzGSFormula);
                default:
                    return Equation.Instance.Eval<int>(normalGSFormula);
                    return skillScore + Equation.Instance.Eval<int>(normalGSFormula);
            }
        }
System/MainInterfacePanel/LowSettingTip.cs
@@ -86,11 +86,11 @@
            var talentModel = ModelCenter.Instance.GetModel<TalentModel>();
            if (skillModel.passSkillRedpoint.state == RedPointState.Simple)
            {
                WindowCenter.Instance.Open<SkillWin>(false, 1);
                WindowCenter.Instance.Open<SkillWin>(false, 2);
            }
            else if (treasureSkillModel.redpoint.state == RedPointState.Simple)
            {
                WindowCenter.Instance.Open<SkillWin>(false, 2);
                WindowCenter.Instance.Open<SkillWin>(false, 1);
            }
            else if (talentModel.talentRedpoint.state == RedPointState.Simple)
            {
System/MainInterfacePanel/TaskModel.cs
@@ -69,6 +69,9 @@
    public Dictionary<int, Dictionary<string, int>> ReplaceDic = new Dictionary<int, Dictionary<string, int>>();//key值替换字典
    public Dictionary<int, RunTaskAwardRecord> AwardRecordDic = new Dictionary<int, RunTaskAwardRecord>();//跑环奖励记录
    public Dictionary<int, int> NPCShowDic = new Dictionary<int, int>();//关于NPC的显隐问题
    Dictionary<int, int> m_ShowNpcCache = new Dictionary<int, int>();
    public delegate void OnTaskToAdd(int MissionID, int MissionState, int DiscriptionIndex);
    public static event OnTaskToAdd Event_TaskToAdd;//任务添加
    public delegate void OnTaskRefreshes(int _taskId);
@@ -186,6 +189,7 @@
        ReplaceDic.Clear();
        AwardRecordDic.Clear();
        NPCShowDic.Clear();
        m_ShowNpcCache.Clear();
        _conversation = null;
        _DefaultDialogContent = null;
        _TaskNow = 0;
@@ -242,10 +246,10 @@
                currentMissionState = MissionState;
            }
            //仙盟任务完成
            if ((pytaskM.type == 12||pytaskM.type == 14) && TaskAllocation.Instance.FairyAuAllNumber() >= FairyAuTaskCount_Day)
            {
                Event_FairyAuTask();
                return;
            if ((pytaskM.type == 12 || pytaskM.type == 14) && TaskAllocation.Instance.FairyAuAllNumber() >= FairyAuTaskCount_Day)
            {
                Event_FairyAuTask();
                return;
            }
@@ -1361,12 +1365,12 @@
            yield return WaitingForSecondConst.WaitMS800;//缓冲一秒再进行
        }
        if (MainTaskDic.ContainsKey(_taskID))//主线等待表现
        {
            if (taskWait.wait)
            {
                yield return WaitingForSecondConst.GetWaitForSeconds(mainTaskAutoWaitTime);
            }
        if (MainTaskDic.ContainsKey(_taskID))//主线等待表现
        {
            if (taskWait.wait)
            {
                yield return WaitingForSecondConst.GetWaitForSeconds(mainTaskAutoWaitTime);
            }
        }
        if (GA_Hero.s_MapSwitching)
@@ -1388,6 +1392,10 @@
    {
        foreach (string key in _Dic.Keys)
        {
            if (key.Equals("Show_{visit_npc_id}"))
            {
                continue;
            }
            string[] str = key.Split('_');
            if (str[0] == "Show")
            {
@@ -1397,8 +1405,44 @@
        return 0;
    }
    private int CacheNpcID = 0;
    private void StorageNPCDic(uint taskId, string key, int Value)//关于NPC的显隐
    {
        if (key.Equals("Show_{visit_npc_id}"))
        {
            m_ShowNpcCache[(int)taskId] = Value;
            if (CacheNpcID != 0)
            {
                Task0820(new H0820_tagMissionDict()
                {
                    MissionID = taskId,
                    DictKey = "Show_" + CacheNpcID,
                    DictValue = (uint)m_ShowNpcCache[(int)taskId],
                });
                m_ShowNpcCache.Remove(CacheNpcID);
                CacheNpcID = 0;
            }
            return;
        }
        if (key.Equals("visit_npc_id"))
        {
            CacheNpcID = Value;
            if (m_ShowNpcCache.ContainsKey((int)taskId))
            {
                Task0820(new H0820_tagMissionDict()
                {
                    MissionID = taskId,
                    DictKey = "Show_" + CacheNpcID,
                    DictValue = (uint)m_ShowNpcCache[(int)taskId],
                });
                m_ShowNpcCache.Remove((int)taskId);
                CacheNpcID = 0;
            }
            return;
        }
        string[] str = key.Split('_');
        if (str[0] == "Show")
        {
@@ -1688,36 +1732,36 @@
        }
    }
    public class TaskWait
    {
        public bool wait
        {
            get
            {
                foreach (var key in taskWaits.Keys)
                {
                    if ((TimeUtility.ServerNow - taskWaits[key]).TotalSeconds < 1f)
                    {
                        return true;
                    }
                }
                return false;
            }
        }
        Dictionary<TaskWaitType, DateTime> taskWaits = new Dictionary<TaskWaitType, DateTime>();
        public void Push(TaskWaitType type)
        {
            taskWaits[type] = TimeUtility.ServerNow;
        }
    public class TaskWait
    {
        public bool wait
        {
            get
            {
                foreach (var key in taskWaits.Keys)
                {
                    if ((TimeUtility.ServerNow - taskWaits[key]).TotalSeconds < 1f)
                    {
                        return true;
                    }
                }
                return false;
            }
        }
        Dictionary<TaskWaitType, DateTime> taskWaits = new Dictionary<TaskWaitType, DateTime>();
        public void Push(TaskWaitType type)
        {
            taskWaits[type] = TimeUtility.ServerNow;
        }
    }
    public enum TaskWaitType
    {
        TaskComplete,
        LevelUp,
        TreasureProgress,
        BetterEquip,
    public enum TaskWaitType
    {
        TaskComplete,
        LevelUp,
        TreasureProgress,
        BetterEquip,
    }
}
System/RidingPet/RidingPetBossHintWin.cs
@@ -20,8 +20,8 @@
        {
            var mission = dungeonModel.mission;
            var currentHp = (long)(mission.remainHPPer/* * 0.000001d * BOSSHP_TOTAL*/);
            var progress = 1 - (float)currentHp/* / BOSSHP_TOTAL*/;
            m_Progress.text = StringUtility.Contact((int)(progress * 100), "%");
            var progress = 100 - (float)currentHp/* / BOSSHP_TOTAL*/;
            m_Progress.text = StringUtility.Contact((int)(progress/* * 100*/), "%");
        }
        void DisplayTop3HurtRank()
System/Role/ReikiFuncOpenWin.cs
New file
@@ -0,0 +1,75 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Sunday, April 28, 2019
//--------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class ReikiFuncOpenWin : Window
    {
        [SerializeField] UIAlphaTween m_AlphaTween;
        [SerializeField] float m_OpenTime = 2f;
        float timer = 0f;
        #region Built-in
        protected override void BindController()
        {
        }
        protected override void AddListeners()
        {
        }
        protected override void OnPreOpen()
        {
            m_OpenTime = Mathf.Max(2f, m_OpenTime);
            timer = 0f;
            m_AlphaTween.SetStartState();
        }
        protected override void OnAfterOpen()
        {
        }
        protected override void OnPreClose()
        {
        }
        protected override void OnAfterClose()
        {
        }
        protected override void LateUpdate()
        {
            base.LateUpdate();
            if (timer >= m_OpenTime)
            {
                return;
            }
            timer += Time.deltaTime;
            if (timer >= m_OpenTime)
            {
                StartAnimation();
            }
        }
        #endregion
        void StartAnimation()
        {
            m_AlphaTween.Play(CloseClick);
        }
    }
}
System/Role/ReikiFuncOpenWin.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 06bd2f1845f1e084fa01024c4a127bfc
timeCreated: 1556447400
licenseType: Pro
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/Role/ReikiRootModel.cs
@@ -42,6 +42,20 @@
        public int maxQuality { get; private set; }
        public bool isServerPrepare { get; private set; }
        public bool displayOpenAnimation
        {
            get
            {
                return LocalSave.GetBool("ReikiRootOpenAnimation");
            }
            set
            {
                LocalSave.SetBool("ReikiRootOpenAnimation", value);
            }
        }
        public readonly Redpoint redpoint = new Redpoint(101, 10103);
        public event Action onCacheFreePointRefresh;
@@ -52,22 +66,26 @@
            ParseConfig();
            PlayerDatas.Instance.playerDataRefreshEvent += PlayerDataRefreshEvent;
            FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
        }
        public void OnBeforePlayerDataInitialize()
        {
            m_ReikiRootPoints.Clear();
            m_ReikiRootFreePoints.Clear();
            isServerPrepare = false;
        }
        public void OnPlayerLoginOk()
        {
            RefreshReikiRootPoint();
            isServerPrepare = true;
        }
        public override void UnInit()
        {
            PlayerDatas.Instance.playerDataRefreshEvent -= PlayerDataRefreshEvent;
            FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
        }
        void ParseConfig()
@@ -106,6 +124,18 @@
            }
        }
        private void OnFuncStateChangeEvent(int id)
        {
            if (id == (int)FuncOpenEnum.ReikiRoot)
            {
                RefreshRedpoint();
                if (isServerPrepare && FuncOpen.Instance.IsFuncOpen(id))
                {
                    displayOpenAnimation = true;
                }
            }
        }
        public int GetReikiRootQuality(int id, int point)
        {
            var config = ReikiRootConfig.Get(id);
System/Role/ReikiRootWin.cs
@@ -77,6 +77,11 @@
        protected override void OnAfterOpen()
        {
            if (model.displayOpenAnimation)
            {
                WindowCenter.Instance.Open<ReikiFuncOpenWin>();
                model.displayOpenAnimation = false;
            }
        }
        protected override void OnPreClose()
System/Skill/TreasureSkillModel.cs
@@ -260,8 +260,13 @@
        public void OnDeleteSkill(int skillID)
        {
            var skillConfig = SkillConfig.Get(skillID);
            if (skillConfig == null)
            {
                return;
            }
            TreasurePotential treasurePotential;
            if (TryGetPotential(skillID, out treasurePotential))
            if (TryGetPotential(skillConfig.SkillTypeID, out treasurePotential))
            {
                treasurePotential.Reset();
            }
System/Skill/TreasureSkillWin.cs
@@ -16,6 +16,7 @@
    {
        [SerializeField] ScrollerController m_Controller;
        [SerializeField] Text m_SkillName;
        [SerializeField] SkillWidget m_SkillNow;
        [SerializeField] SkillWidget m_SkillNext;
        [SerializeField] SkillExpertWidget m_SkillExpert;
@@ -155,6 +156,8 @@
                    return;
                }
                m_SkillName.text = config.SkillName;
                m_SkillNow.Display(skill.skillId, skill.level);
                bool isMax = skill.level >= skill.maxLevel;