少年修仙传客户端代码仓库
client_linchunjie
2018-09-12 fad29a67b22ffc1a90f453dc03c91fe9ba891de0
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
2个文件已添加
20个文件已修改
770 ■■■■ 已修改文件
Core/GameEngine/Model/Config/FunctionForecastConfig.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/HeroAIHandler.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/HeroAI_Auto.cs 233 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/HeroAI_Base.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/AI/HeroAI_KillUntilDie.cs 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/HeroBehaviour.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/Actor/UserInputHandler.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
Fight/PreFightMission.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousModel.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FindPrecious/FindPreciousTimer.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/BestXBWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HappyXB/RuneXBWin.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeatureNoticeModel.cs 245 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeatureNoticeModel.cs.meta 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/FeatureNoticeWin.cs 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/MainInterfaceWin.cs 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/MainInterfacePanel/TaskListTip.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreModel.cs 51 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Store/StoreWin.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Team/MyTeamWin.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/WindowBase/ModelCenter.cs 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Core/GameEngine/Model/Config/FunctionForecastConfig.cs
@@ -1,6 +1,6 @@
//--------------------------------------------------------
//    [Author]:            第二世界
//    [  Date ]:           Tuesday, September 11, 2018
//    [  Date ]:           Wednesday, September 12, 2018
//--------------------------------------------------------
using UnityEngine;
@@ -21,7 +21,10 @@
        public string Icon { get ; private set; } 
        public string Content { get ; private set; } 
        public int DisplayLevel { get ; private set ; }
        public int Display { get ; private set ; }
        public int Display { get ; private set ; }
        public int RedPointLV { get ; private set ; }
        public int RedPointPercentage { get ; private set ; }
        public int FrameLevel { get ; private set ; }
        public override string getKey()
        {
@@ -51,7 +54,13 @@
            
                DisplayLevel=IsNumeric(rawContents[9]) ? int.Parse(rawContents[9]):0; 
            
                Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
                Display=IsNumeric(rawContents[10]) ? int.Parse(rawContents[10]):0;
                RedPointLV=IsNumeric(rawContents[11]) ? int.Parse(rawContents[11]):0;
                RedPointPercentage=IsNumeric(rawContents[12]) ? int.Parse(rawContents[12]):0;
                FrameLevel=IsNumeric(rawContents[13]) ? int.Parse(rawContents[13]):0;
            }
            catch (Exception ex)
            {
Core/GameEngine/Model/Config/FunctionForecastConfig.cs.meta
@@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: bced258647f0fa940b752dd56e6a27e0
timeCreated: 1536670750
timeCreated: 1536737693
licenseType: Free
MonoImporter:
  serializedVersion: 2
Fight/Actor/AI/HeroAIHandler.cs
@@ -88,6 +88,7 @@
            // 已经执行完毕, 退出状态
            m_Current.Exit();
            m_Current = null;
            currentType = E_HeroAIType.None;
        }
        // 遍历所有状态, 决定此次进入哪个状态
Fight/Actor/AI/HeroAI_Auto.cs
@@ -51,7 +51,7 @@
        m_LastUseSkillTime = 0;
        m_PauseStartTime = 0;
        m_LockTargetSID = 0;
        m_UserClickSkillID = 0;
        m_UserClickSkillID = -1;
        m_NeedMoveToPos = false;
        m_HandUpSkill = null;
        m_State = 0;
@@ -216,11 +216,9 @@
                    }
                }
                // 决策此次要使用的技能
                _skill = DecideUserSkill(m_HandUpSkill);
                break;
            case 1:// 暂停状态
                if (m_NeedMoveToPos)
                {
                    if (StatusMgr.Instance.CanMove(PlayerDatas.Instance.PlayerId))
@@ -234,28 +232,9 @@
                    m_NeedMoveToPos = false;
                }
                if (m_UserClickSkillID == 0)
                if (Time.realtimeSinceStartup - m_PauseStartTime > m_PauseResumeTime)
                {
                    int _index = _hero.nextComAtkIndex;
                    if (_index == -1)
                    {
                        _index = 0;
                    }
                    m_UserClickSkillID = _hero.GetCommonSkillID(_index);
                }
                if (m_UserClickSkillID != -1 && CanCastActiveUse(m_UserClickSkillID))
                {
                    // 决策此次要使用的技能
                    m_DecideSkill = _hero.SkillMgr.Get(m_UserClickSkillID);
                    m_UserClickSkillID = -1;
                }
                else
                {
                    if (Time.realtimeSinceStartup - m_PauseStartTime > m_PauseResumeTime)
                    {
                        m_State = 0;
                    }
                    m_State = 0;
                }
                break;
@@ -267,9 +246,20 @@
            return;
        }
        if (m_DecideSkill != null)
        if (m_UserClickSkillID == 0)
        {
            _skill = m_DecideSkill;
            int _index = _hero.nextComAtkIndex;
            if (_index == -1)
            {
                _index = 0;
            }
            m_UserClickSkillID = _hero.GetCommonSkillID(_index);
        }
        if (m_State == 0 || m_UserClickSkillID != -1)
        {
            // 决策此次要使用的技能
            _skill = DecideUserSkill(m_HandUpSkill, m_UserClickSkillID);
        }
        if (_skill == null)
@@ -277,110 +267,114 @@
            return;
        }
        bool _forceMove = _skill.skillInfo.soFile != null && _skill.skillInfo.soFile.forceMove;
        // 判断周围是否有可攻击目标
        GActorFight _atkTarget = null;
        if (!_forceMove && !IsSkillNeedMove(_skill.skillInfo.config.Tag, (E_SkillType)_skill.skillInfo.config.SkillType))
        // 处理玩家主动切换攻击目标行为
        if (m_LockTargetSID != 0)
        {
            _hero.Behaviour.DoAttack(_skill);
            m_DecideSkill = null;
            _atkTarget = GAMgr.Instance.GetBySID(m_LockTargetSID) as GActorFight;
            if (_atkTarget == null
            || !_atkTarget.CanAtked())
            {
                m_LockTargetSID = 0;
                _atkTarget = null;
            }
        }
        else if (_hero.aiHandler.PriorityNpcID > 0)
        {
            _atkTarget = DecideAttackTarget(_hero.Pos, m_HandupRange, _hero.aiHandler.PriorityNpcID);
        }
        else if (m_LockTargetNpcID > 0)
        {
            _atkTarget = DecideAttackTarget(_hero.Pos, m_HandupRange, m_LockTargetNpcID);
        }
        else
        {
            // 判断周围是否有可攻击目标
            GActorFight _atkTarget = null;
            _atkTarget = SelectTarget();
        }
            // 处理玩家主动切换攻击目标行为
            if (m_LockTargetSID != 0)
            {
                _atkTarget = GAMgr.Instance.GetBySID(m_LockTargetSID) as GActorFight;
        bool _forceMove = _skill.skillInfo.soFile != null && _skill.skillInfo.soFile.forceMove;
        if (_atkTarget == null
         || _atkTarget.ActorInfo.serverDie
         || (!_forceMove && !IsSkillNeedMove(_skill.skillInfo.config.Tag, (E_SkillType)_skill.skillInfo.config.SkillType)))
        {
            _hero.Behaviour.DoAttack(_skill);
            m_DecideSkill = null;
            return;
        }
                if (_atkTarget == null
                || !_atkTarget.CanAtked())
                {
                    m_LockTargetSID = 0;
                    _atkTarget = null;
                }
            }
            else if (_hero.aiHandler.PriorityNpcID > 0)
            {
                _atkTarget = DecideAttackTarget(_hero.Pos, m_HandupRange, _hero.aiHandler.PriorityNpcID);
            }
            else if (m_LockTargetNpcID > 0)
            {
                _atkTarget = DecideAttackTarget(_hero.Pos, m_HandupRange, m_LockTargetNpcID);
            }
            else
            {
                _atkTarget = SelectTarget();
            }
            if (_atkTarget == null)
            {
                _hero.StopRush();
                return;
            }
            _hero.LockTarget = _hero.SelectTarget = _atkTarget;
            // 判断技能范围, 不在可释放范围需要移动至目标
            float _compareDist = _skill.skillInfo.config.AtkDist * .5f;
            float _compareDistSqrt = _compareDist * _compareDist;
            // 计算当前和目标的距离
            float _currentDistSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _atkTarget.Pos);
            // 比较距离
            if (_currentDistSqrt > _compareDistSqrt)
            {
                if ((StatusMgr.IsValid()
                && !StatusMgr.Instance.CanMove(_hero.ServerInstID)))
                {
                    return;
                }
                // 移动至目标
                _hero.MoveToTarget(_atkTarget, _compareDist);
                // 判断是否需要冲锋
                if (_hero.IsNeedRush(_currentDistSqrt))
                {
                    _hero.StartRush();
                }
                return;
            }
            // 停止冲锋逻辑
        if (_atkTarget == null)
        {
            _hero.StopRush();
            return;
        }
        _hero.LockTarget = _hero.SelectTarget = _atkTarget;
        // 判断技能范围, 不在可释放范围需要移动至目标
        float _compareDist = _skill.skillInfo.config.AtkDist * .5f;
        float _compareDistSqrt = _compareDist * _compareDist;
        // 计算当前和目标的距离
        float _currentDistSqrt = MathUtility.DistanceSqrtXZ(_hero.Pos, _atkTarget.Pos);
        // 比较距离
        if (_currentDistSqrt > _compareDistSqrt)
        {
            if ((StatusMgr.IsValid()
            && !StatusMgr.Instance.CanMove(_hero.ServerInstID)))
            {
                return;
            }
            // 移动至目标
            _hero.MoveToTarget(_atkTarget, _compareDist);
            // 判断是否需要冲锋
            if (_hero.IsNeedRush(_currentDistSqrt))
            {
                _hero.StartRush();
            }
            return;
        }
        // 停止冲锋逻辑
        _hero.StopRush();
        if (IsSkillNeedMove(_skill.skillInfo.config.Tag, (E_SkillType)_skill.skillInfo.config.SkillType))
        {
            Vector3 _forward = MathUtility.ForwardXZ(_atkTarget.Pos, _hero.Pos);
            _hero.destForward = _hero.Forward = _forward;
        }
            // 判断是否普通, 调用不同的接口
            if (_hero.Behaviour.IsComAtk(_skill.id))
        // 判断是否普通, 调用不同的接口
        if (_hero.Behaviour.IsComAtk(_skill.id))
        {
            _hero.Behaviour.DoCommonAttack();
            if (m_DecideSkill != null && m_DecideSkill.id == _skill.id)
            {
                _hero.Behaviour.DoCommonAttack();
                if (m_DecideSkill != null && m_DecideSkill.id == _skill.id)
                {
                    m_DecideSkill = null;
                }
                if (_skill.id == m_UserClickSkillID)
                {
                    m_UserClickSkillID = -1;
                }
                m_DecideSkill = null;
            }
            else
            if (_skill.id == m_UserClickSkillID)
            {
                _hero.Behaviour.DoAttack(_skill);
                if (m_DecideSkill != null && m_DecideSkill.id == _skill.id)
                {
                    m_DecideSkill = null;
                }
                if (_skill.id == m_UserClickSkillID)
                {
                    m_UserClickSkillID = -1;
                }
                m_UserClickSkillID = -1;
            }
        }
        else
        {
            _hero.Behaviour.DoAttack(_skill);
            if (m_DecideSkill != null && m_DecideSkill.id == _skill.id)
            {
                m_DecideSkill = null;
            }
            if (_skill.id == m_UserClickSkillID)
            {
                m_UserClickSkillID = -1;
            }
        }
        m_LastUseSkillTime = Time.realtimeSinceStartup;
    }
@@ -424,6 +418,15 @@
        {
            _hero.StopRush();
        }
        Skill _skill = _hero.SkillMgr.CurCastSkill;
        if (_skill != null)
        {
            if (!_skill.SkillCompelete)
            {
                m_UserClickSkillID = -1;
            }
        }
    }
    private Vector3 m_TargetPos;
@@ -460,8 +463,6 @@
        //    SysNotifyMgr.Instance.ShowTip("HookPrompt_Manual");
        //}
        m_NeedMoveToPos = false;
        m_PauseStartTime = Time.realtimeSinceStartup;
        m_State = 1;
    }
    private void OnLockTargetChanged(uint sid)
Fight/Actor/AI/HeroAI_Base.cs
@@ -22,7 +22,7 @@
    protected int xpSkillID = 0;
    protected Skill DecideUserSkill(int[] skillList = null)
    protected Skill DecideUserSkill(int[] skillList = null, int priorSkillId = -1)
    {
        GA_Hero _hero = PlayerDatas.Instance.hero;
        if (_hero == null || !_hero.CanCastSkill())
@@ -32,6 +32,18 @@
        Skill _skill = null;
        if (priorSkillId >= 0)
        {
            if (CanCast(priorSkillId))
            {
                _skill = _hero.SkillMgr.Get(priorSkillId);
                if (_skill != null)
                {
                    return _skill;
                }
            }
        }
        // 判断是否需要使用加血技能
        float _curHpPer = PlayerDatas.Instance.baseData.HP * 1f / PlayerDatas.Instance.extersion.MaxHP;
        if (_curHpPer < _hero.JobSetup.HpPerUseSkill * Constants.F_DELTA)
Fight/Actor/AI/HeroAI_KillUntilDie.cs
@@ -85,7 +85,11 @@
    private void OnUserClickSkill(int skillID)
    {
        m_FirstSkill = skillID;
        GActor _target = GAMgr.Instance.GetBySID(m_TargetID);
        if (_target != null && !_target.ActorInfo.serverDie)
        {
            m_FirstSkill = skillID;
        }
    }
    public override void Update()
@@ -278,25 +282,30 @@
        GA_Hero _hero = PlayerDatas.Instance.hero;
        GActorFight _target = GAMgr.Instance.GetBySID(m_TargetID) as GActorFight;
        //if (_target == null || !_target.CanAtked())
        //{
        //    Debug.Log("目标已死亡或者不可被攻击");
        //}
        // if (_target == null || !_target.CanAtked())
        // {
        //     Debug.Log("目标已死亡或者不可被攻击");
        // }
        //if (PlayerDatas.Instance.hero == null)
        //{
        //    Debug.Log("主角被销毁");
        //}
        // if (PlayerDatas.Instance.hero == null)
        // {
        //     Debug.Log("主角被销毁");
        // }
        //if (m_ActiveInterrupt)
        //{
        //    Debug.Log("行为被打断");
        //}
        // if (m_ActiveInterrupt)
        // {
        //     Debug.Log("行为被打断");
        // }
        //if (_hero.aiHandler.currentType != E_HeroAIType.KillUntilDie)
        //{
        //    Debug.Log("已切换ai行为");
        //}
        // if (_hero.aiHandler.currentType != E_HeroAIType.KillUntilDie)
        // {
        //     Debug.Log("已切换ai行为");
        // }
        // if (m_LimitOnce)
        // {
        //     Debug.Log("释放过一次技能");
        // }
        return (_target == null
            || !_target.CanAtked()
@@ -304,8 +313,8 @@
            || _hero == null
            || _hero.aiHandler.currentType != E_HeroAIType.KillUntilDie)
            && (m_LimitOnce
             || MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.Safe)
             || MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.RebornSafe));
            || MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.Safe)
            || MapArea.IsInMapArea(_hero.CurMapArea, MapArea.E_Type.RebornSafe));
    }
    private void OnActiveInterrupt()
@@ -313,8 +322,10 @@
        m_ActiveInterrupt = true;
        GA_Hero _hero = PlayerDatas.Instance.hero;
        _hero.aiHandler.currentType = E_HeroAIType.None;
        if (_hero != null)
        {
            _hero.aiHandler.currentType = E_HeroAIType.None;
        }
    }
    private void OnClickFloor(Vector3 dest)
@@ -322,6 +333,9 @@
        m_ActiveInterrupt = true;
        GA_Hero _hero = PlayerDatas.Instance.hero;
        _hero.aiHandler.currentType = E_HeroAIType.None;
        if (_hero != null)
        {
            _hero.aiHandler.currentType = E_HeroAIType.None;
        }
    }
}
Fight/Actor/HeroBehaviour.cs
@@ -143,7 +143,6 @@
            }
        }
        if (m_Hero.aiHandler.currentType == E_HeroAIType.None)
        {
            byte _type = (byte)E_HeroAIType.KillUntilDie;
@@ -155,10 +154,12 @@
            _data.defaultSkillID = m_WillUsedSkillID;
            m_Hero.aiHandler.currentType = E_HeroAIType.KillUntilDie;
        }
        if (OnUserClickSkill != null)
        else
        {
            OnUserClickSkill(m_WillUsedSkillID);
            if (OnUserClickSkill != null)
            {
                OnUserClickSkill(m_WillUsedSkillID);
            }
        }
    }
Fight/Actor/UserInputHandler.cs
@@ -57,7 +57,7 @@
        float KeyVertical = Input.GetAxis("Vertical");
        float KeyHorizontal = Input.GetAxis("Horizontal");
        if (Input.GetKey(KeyCode.J))
        if (Input.GetKeyUp(KeyCode.J))
        {
            _hero.ComAtk();
        }
Fight/PreFightMission.cs
@@ -902,7 +902,7 @@
             _model2.clickClosed = false;
             m_AfterAttackType = E_AfterAttackType.RefreshRock;
             HeroBehaviour.OnUserClickSkill += OnCastSkill;
             HeroBehaviour.onCastSkill += OnCastSkill;
             _model2.onClose = null;
@@ -1146,7 +1146,7 @@
    private void OnCastSkill(int skillID)
    {
        HeroBehaviour.OnUserClickSkill -= OnCastSkill;
        HeroBehaviour.onCastSkill -= OnCastSkill;
        if (m_AfterAttackType == E_AfterAttackType.RefreshRock)
        {
@@ -1612,7 +1612,7 @@
        _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("CopyOfThePanel/HighSettingTip/Container_Treasure");
        _temp.gameObject.SetActive(true);
        _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("MainInterfaceWin/InGameDownLoadProgress");
        _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("InGameDownLoadProgress");
        _temp.localScale = Vector3.one;
        _temp = WindowCenter.Instance.Get<MainInterfaceWin>().transform.Find("SkillButtonTip/Pivot/CastSkillTip/SwitchPan_a");
System/FindPrecious/FindPreciousModel.cs
@@ -383,9 +383,12 @@
                _redpointId == BossHomeModel.BOSSHOME_REDPOINT ||
                _redpointId == PersonalBossModel.PERSONAL_REDPOINTID)
            {
                var count = worldBossModel.worldBossRedPoint.count + bossHomeModel.bossHomeRedpoint.count + personalBossModel.personalRedpoint.count;
                findPreciousRedpoint.state = count > 0 ? RedPointState.Quantity : RedPointState.None;
                findPreciousRedpoint.count = count;
                var worldBossRedpointCount = worldBossModel.worldBossRedPoint.count;
                var bossHomeRedpointCount = bossHomeModel.bossHomeRedpoint.count;
                var personalBossRedpointCount = personalBossModel.personalRedpoint.count;
                var totalCount = worldBossRedpointCount + bossHomeRedpointCount + personalBossRedpointCount;
                findPreciousRedpoint.state = totalCount > 0 ? RedPointState.Quantity : RedPointState.None;
                findPreciousRedpoint.count = totalCount;
            }
        }
System/FindPrecious/FindPreciousTimer.cs
@@ -26,7 +26,6 @@
            if (IsValidClockSetting(_rebornTime))
            {
                clocks[_npcId] = new BossRebornClock(_npcId, _rebornTime);
                if (!bossIds.Contains(_npcId))
                {
                    bossIds.Add(_npcId);
@@ -69,14 +68,7 @@
        private bool IsValidClockSetting(DateTime _rebornTime)
        {
            if ((_rebornTime - DateTime.Now).TotalSeconds < FindPreciousModel.PREPOSE_SECONDS)
            {
                return false;
            }
            else
            {
                return true;
            }
            return (_rebornTime - DateTime.Now).TotalSeconds >= FindPreciousModel.PREPOSE_SECONDS;
        }
        public class BossRebornClock
System/HappyXB/BestXBWin.cs
@@ -466,7 +466,7 @@
                        yield return new WaitForSeconds(xbSpeed1);
                        break;
                    case 9:
                        if(cycle > 1 && remainIndex <= 4)
                        if(cycle > cycleTimes && remainIndex <= 4)
                        {
                            xbSpeed2 += XbA2 * 0.05f;
                            if (xbSpeed2 >= maxTimeInter)
System/HappyXB/RuneXBWin.cs
@@ -475,7 +475,7 @@
                        yield return new WaitForSeconds(xbSpeed1);
                        break;
                    case 9:
                        if (cycle > 1 && remainIndex <= 4)
                        if (cycle > cycleTimes && remainIndex <= 4)
                        {
                            xbSpeed2 += XbA2 * 0.05f;
                            if (xbSpeed2 >= maxTimeInter)
System/MainInterfacePanel/FeatureNoticeModel.cs
New file
@@ -0,0 +1,245 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Wednesday, September 12, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using TableConfig;
using System.Collections.Generic;
using System;
using Snxxz.UI;
//功能预告红点
public class FeatureNoticeModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
{
    public List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
    private const int Redpoint_key1 = 38;
    public Redpoint redPointStre1 = new Redpoint(Redpoint_key1);
    private int OpenFuncId = 0;
    private bool RedPointChange = false;
    private bool IsRedPoint = false;
    public override void Init()
    {
        AddList();
    }
    public void OnBeforePlayerDataInitialize()
    {
    }
    public void OnPlayerLoginOk()
    {
        RedDotStatus();
        PlayerDatas.Instance.PlayerDataRefreshInfoEvent -= OnPlayersUpLV;
        FuncOpen.Instance.OnFuncStateChangeEvent -= OnFuncStateChangeEvent;
        treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent;
        treasureModel.treasureStageUpEvent -= treasureStageUpEvent;
        FuncOpen.Instance.OnFuncStateChangeEvent += OnFuncStateChangeEvent;
        PlayerDatas.Instance.PlayerDataRefreshInfoEvent += OnPlayersUpLV;
        treasureModel.treasureStateChangeEvent += treasureStateChangeEvent;
        treasureModel.treasureStageUpEvent += treasureStageUpEvent;
    }
    public override void UnInit()
    {
    }
    private void treasureStageUpEvent(int obj)
    {
        RedDotStatus();
    }
    private void treasureStateChangeEvent(int obj)
    {
        RedDotStatus();
    }
    private void OnFuncStateChangeEvent(int obj)
    {
        RedDotStatus();
    }
    private void OnPlayersUpLV(PlayerDataRefresh obj)
    {
        if (obj == PlayerDataRefresh.LV)
        {
            RedDotStatus();
        }
    }
    private void AddList()//添加列表信息
    {
        if (FunctionList.Count <= 0)
        {
            var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
            foreach (var key in configs)
            {
                var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
                if (functionForecastConfig != null && functionForecastConfig.Display == 1)
                {
                    FunctionList.Add(functionForecastConfig);
                }
            }
        }
    }
    private void RedDotStatus()
    {
        for (int i = 0; i < FunctionList.Count; i++)
        {
            if (!FuncOpen.Instance.IsFuncOpen(FunctionList[i].FuncId))
            {
                redPointStre1.state = RedPointState.None;
                if (OpenFuncId != FunctionList[i].FuncId)
                {
                    RedPointChange = false;
                }
                if (OpenFuncId != FunctionList[i].FuncId || !RedPointChange)
                {
                    IsRedPoint = false;
                    TrailerClassification(FunctionList[i].FuncId);
                }
                return;
            }
        }
    }
    private void TrailerClassification(int funcID)
    {
        FuncOpenLVConfig funcoPenConfig = Config.Instance.Get<FuncOpenLVConfig>(funcID);
        var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcID);
        if (funcoPenConfig.LimitMagicWeapon != 0 || funcoPenConfig.LimitMissionID != 0)
        {
            if (funcoPenConfig.LimitMagicWeapon != 0)//法宝
            {
                int faBaoID = funcoPenConfig.LimitMagicWeapon / 100;
                MagicWeapon(faBaoID, funcID);
            }
            else if (funcoPenConfig.LimitMissionID != 0)//任务
            {
                if (functionForecastConfig.RedPointLV <= 0)
                {
                    return;
                }
                if (PlayerDatas.Instance.baseData.LV - functionForecastConfig.RedPointLV >= funcoPenConfig.LimitLV)
                {
                    RedPointChange = true;
                    IsRedPoint = true;
                }
                if (IsRedPoint)
                {
                    redPointStre1.state = RedPointState.Simple;
                }
                else
                {
                    redPointStre1.state = RedPointState.None;
                }
                return;
            }
        }
        else//等级
        {
            if (functionForecastConfig.RedPointLV <= 0)
            {
                return;
            }
            if (PlayerDatas.Instance.baseData.LV - functionForecastConfig.RedPointLV >= funcoPenConfig.LimitLV)
            {
                RedPointChange = true;
                IsRedPoint = true;
            }
            if (IsRedPoint)
            {
                redPointStre1.state = RedPointState.Simple;
            }
            else
            {
                redPointStre1.state = RedPointState.None;
            }
            return;
        }
    }
    TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
    private void MagicWeapon(int fabaoID,int funcID)
    {
        var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(funcID);
        Treasure treasure;
        if (treasureModel.TryGetTreasure(fabaoID, out treasure)
              && treasure.state == TreasureState.Collected)
        {
            var list = treasure.treasureStages;
            var funcStage = 0;
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].unlockType == TreasureStageUnlock.Func &&
                    list[i].func == funcID)
                {
                    funcStage = i;
                    break;
                }
            }
            if (treasure.stage == funcStage - 1 || funcStage == 0)
            {
                float exp = (treasure.exp / treasure.treasureStages[funcStage].exp)*100;
                if (functionForecastConfig.RedPointPercentage > 0)
                {
                    if (exp >= functionForecastConfig.RedPointPercentage)
                    {
                        RedPointChange = true;
                        IsRedPoint = true;
                    }
                    if (IsRedPoint)
                    {
                        redPointStre1.state = RedPointState.Simple;
                    }
                }
                else
                {
                    redPointStre1.state = RedPointState.None;
                }
            }
        }
    }
    public void WhetherToPlayTheBox()
    {
        var inDungeon = IsDungeon();
        var IsOpenMaininterface = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
        if (NewBieCenter.Instance.inGuiding || ModelCenter.Instance.GetModel<TreasureModel>().newGotShowing || inDungeon || !IsOpenMaininterface)
        {
            return;
        }
        for (int i = 0; i < FunctionList.Count; i++)
        {
            if (!FuncOpen.Instance.IsFuncOpen(FunctionList[i].FuncId))
            {
                var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(FunctionList[i].FuncId);
                if (functionForecastConfig.FrameLevel <= 0)
                {
                    return;
                }
                string strKey = "FeatureNotice" + functionForecastConfig.FrameLevel;
                int type = LocalSave.GetInt(strKey);
                bool IsOpenMain = WindowCenter.Instance.CheckOpen<MainInterfaceWin>();
                if (PlayerDatas.Instance.baseData.LV >= functionForecastConfig.FrameLevel && type == 0)
                {
                    LocalSave.SetInt(strKey, functionForecastConfig.FrameLevel);
                    WindowCenter.Instance.Open<FeatureNoticeWin>();
                }
            }
        }
    }
    private bool IsDungeon()
    {
        var mapId = PlayerDatas.Instance.baseData.MapID;
        var mapConfig = Config.Instance.Get<MapConfig>(mapId);
        return mapConfig != null && mapConfig.MapFBType != 0;
    }
}
System/MainInterfacePanel/FeatureNoticeModel.cs.meta
New file
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e9c203c14c6a0b4419efaefdddbe4d89
timeCreated: 1536732400
licenseType: Free
MonoImporter:
  serializedVersion: 2
  defaultReferences: []
  executionOrder: 0
  icon: {instanceID: 0}
  userData:
  assetBundleName:
  assetBundleVariant:
System/MainInterfacePanel/FeatureNoticeWin.cs
@@ -26,9 +26,8 @@
        [SerializeField] Text m_TextUnopened;//未开启
        [SerializeField] Text m_Textschedule;//进度
        [SerializeField] Button m_ButtonGoto;
        List<FunctionForecastConfig> FunctionList = new List<FunctionForecastConfig>();
        TreasureModel treasureModel { get { return ModelCenter.Instance.GetModel<TreasureModel>(); } }
        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
        #region Built-in
        private int ClickFuncID = 0;
        protected override void BindController()
@@ -42,7 +41,6 @@
        protected override void OnPreOpen()
        {
            AddList();//添加数组列表
            DefaultSelection();//获取默认选择
            m_ScrollerController.OnRefreshCell += OnRefreshGridCell;       
            OnCreateGridLineCell(m_ScrollerController);
@@ -64,6 +62,10 @@
            m_ScrollerController.OnRefreshCell -= OnRefreshGridCell;
            treasureModel.treasureStateChangeEvent -= treasureStateChangeEvent;
            treasureModel.treasureStageUpEvent -= treasureStageUpEvent;
            if (featureNoticeModel.redPointStre1.state == RedPointState.Simple)
            {
                featureNoticeModel.redPointStre1.state = RedPointState.None;
            }
        }
        private void treasureStageUpEvent(int obj)
@@ -94,15 +96,15 @@
        void OnCreateGridLineCell(ScrollerController gridCtrl)
        {
            gridCtrl.Refresh();
            for (int i = 0; i < FunctionList.Count; i++)
            for (int i = 0; i < featureNoticeModel.FunctionList.Count; i++)
            {
                if (i == 0)
                {
                    gridCtrl.AddCell(ScrollerDataType.Header, FunctionList[i].FuncId);
                    gridCtrl.AddCell(ScrollerDataType.Header, featureNoticeModel.FunctionList[i].FuncId);
                }
                else
                {
                    gridCtrl.AddCell(ScrollerDataType.Normal, FunctionList[i].FuncId);
                    gridCtrl.AddCell(ScrollerDataType.Normal, featureNoticeModel.FunctionList[i].FuncId);
                }
            }
            gridCtrl.Restart();
@@ -160,22 +162,6 @@
        {
        }
        #endregion
        private void AddList()//添加列表信息
        {
            if (FunctionList.Count <= 0)
            {
                var configs = Config.Instance.GetAllKeys<FunctionForecastConfig>();
                foreach (var key in configs)
                {
                    var functionForecastConfig = Config.Instance.Get<FunctionForecastConfig>(key);
                    if (functionForecastConfig != null && functionForecastConfig.Display == 1)
                    {
                        FunctionList.Add(functionForecastConfig);
                    }
                }
            }
        }
        private void DefaultSelection()//获取默认选择
        {
            var configs = Config.Instance.GetAllValues<FunctionForecastConfig>();
@@ -190,14 +176,14 @@
            }
            if (ClickFuncID == 0)
            {
                ClickFuncID = FunctionList[0].FuncId;
                ClickFuncID = featureNoticeModel.FunctionList[0].FuncId;
            }
        }
        private int JumpIndex()//Jump选中
        {
            int Index = 0;
            Index = FunctionList.FindIndex((x)=>
            Index = featureNoticeModel.FunctionList.FindIndex((x)=>
            {
                return x.FuncId == ClickFuncID;
            });
@@ -296,7 +282,15 @@
                {
                    if (treasure.stage == funcStage - 1 || funcStage == 0)
                    {
                        m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp+"%";
                        if (treasure.exp >= treasure.treasureStages[funcStage].exp)
                        {
                            m_Textschedule.text = "100%";
                        }
                        else
                        {
                            m_Textschedule.text = (float)treasure.exp / treasure.treasureStages[funcStage].exp + "%";
                        }
                    }
                    else
                    {
System/MainInterfacePanel/MainInterfaceWin.cs
@@ -136,6 +136,7 @@
        DemonJarModel demonJarModel { get { return ModelCenter.Instance.GetModel<DemonJarModel>(); } }
        DungeonModel dungeonModel { get { return ModelCenter.Instance.GetModel<DungeonModel>(); } }
        FairyGrabBossModel fairyGrabBossModel { get { return ModelCenter.Instance.GetModel<FairyGrabBossModel>(); } }
        FeatureNoticeModel featureNoticeModel { get { return ModelCenter.Instance.GetModel<FeatureNoticeModel>(); } }
        #region Built-in
        protected override void BindController()
@@ -342,7 +343,7 @@
            m_HighSettingTip.AfterOpen();
            m_ChatTip.OnAfterOpen();
            HandleAchievement();
            featureNoticeModel.WhetherToPlayTheBox();
        }
        protected override void OnPreClose()
@@ -889,6 +890,10 @@
        void Updatefighting(PlayerDataRefresh _tCDBPlayerRefresh)//数据的刷新
        {
            ArticleExperience();//关于经验条
            if (_tCDBPlayerRefresh == PlayerDataRefresh.LV)
            {
                featureNoticeModel.WhetherToPlayTheBox();
            }
        }
        void OnCollectBtnClick()
System/MainInterfacePanel/TaskListTip.cs
@@ -448,10 +448,21 @@
            int type = 0;
            if (jumpTask == 0)//跳到默认选中
            {
                if (_list.Contains(taskmodel.GetNowTaskID))
                if (taskmodel.GetNowTaskID != taskmodel.TaskupToDate)//默认的和最新选中的不一致时
                {
                    type = _list.IndexOf(taskmodel.GetNowTaskID);
                    if (_list.Contains(taskmodel.TaskupToDate))
                    {
                        type = _list.IndexOf(taskmodel.TaskupToDate);
                    }
                    taskmodel.TaskupToDate = taskmodel.GetNowTaskID;
                }
                else
                {
                    if (_list.Contains(taskmodel.GetNowTaskID))
                    {
                        type = _list.IndexOf(taskmodel.GetNowTaskID);
                    }
                }
            }
            else
            {
System/Store/StoreModel.cs
@@ -31,6 +31,7 @@
{
    public int[] normalBuyCoinsTypes { get; private set; }
    public string UNIONSTORESAVE_KEY { get; private set; }
    public string MUSTBUYSAVE_KEY { get; private set; }
    public string StoreEffectRecord_Key { get; private set; }
    public List<StoreConfig> shoplist;
@@ -67,8 +68,8 @@
    public void OnAfterPlayerDataInitialize()
    {
        UNIONSTORESAVE_KEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, LocalSaveStoreType.UnionStore);
        DebugEx.Log("UNIONSTORESAVE_KEY:" + UNIONSTORESAVE_KEY);
        StoreEffectRecord_Key = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID, "StoreEffectRecord");
        MUSTBUYSAVE_KEY = StringUtility.Contact(PlayerDatas.Instance.baseData.PlayerID,"MustBuy");
    }
    public void OnPlayerLoginOk()
@@ -662,7 +663,7 @@
    public bool CheckWeekStoreIsShopBuy(out List<StoreConfig> buylist)
    {
        buylist = new List<StoreConfig>();
        if (!IsNewDay()) return false;
        if (!IsNewDay(StoreEffectRecord_Key)) return false;
        List<StoreConfig> shoplist = StoreConfig.GetTypeStoreModel((int)StoreFunc.WeekStore);
        for(int i = 0; i < shoplist.Count; i++)
@@ -700,16 +701,16 @@
        }
    }
    private bool IsNewDay()
    private bool IsNewDay(string recordKey)
    {
        if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Store)) return false;
   
        if (PlayerPrefs.HasKey(StoreEffectRecord_Key))
        if (PlayerPrefs.HasKey(recordKey))
        {
            int day = LocalSave.GetInt(StoreEffectRecord_Key);
            int day = LocalSave.GetInt(recordKey);
            if(day != TimeUtility.ServerNow.Day)
            {
                LocalSave.SetInt(StoreEffectRecord_Key,TimeUtility.ServerNow.Day);
                LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
                return true;
            }
            else
@@ -719,7 +720,7 @@
        }
        else
        {
            LocalSave.SetInt(StoreEffectRecord_Key, TimeUtility.ServerNow.Day);
            LocalSave.SetInt(recordKey, TimeUtility.ServerNow.Day);
            return true;
        }
    }
@@ -835,9 +836,45 @@
                    shopRedDict[storeConfig.ID].state = RedPointState.None;
                }
            }
            UpdateMustBuyRedpoint(storeConfig);
        }
    }
    public void UpdateMustBuyRedpoint(StoreConfig storeConfig)
    {
        if (CheckIsMustBuy(storeConfig))
        {
            shopRedDict[storeConfig.ID].state = RedPointState.Simple;
        }
        else
        {
            shopRedDict[storeConfig.ID].state = RedPointState.None;
        }
    }
    public void ClearMustBuyRedpoint(StoreConfig storeConfig)
    {
        if(mustIdlist.Contains(storeConfig.ItemID))
        {
            shopRedDict[storeConfig.ID].state = RedPointState.None;
        }
    }
    public List<int> mustIdlist = new List<int>() { 4741};
    public bool CheckIsMustBuy(StoreConfig config)
    {
        if(mustIdlist.Contains(config.ItemID)
            && CheckShopIsCanBuy(config))
        {
            if(IsNewDay(MUSTBUYSAVE_KEY))
            {
                return true;
            }
        }
        return false;
    }
    public bool CheckScoreStoreIsCanBuy(StoreConfig storeConfig)
    {
        List<StoreConfig> list = StoreConfig.GetSellShoplist();
System/Store/StoreWin.cs
@@ -392,36 +392,9 @@
                            shopId = 0;
                            shopItemCell.LoadGuidEffectCtrl(shopInfo.ID, shopId);
                        }
                        //if(shopItemCell.effect.IsPlaying)
                        //{
                        //    shopItemCell.effect.StopImediatly();
                        //    if(m_storeModel.shoplist.Contains(shopInfo))
                        //    {
                        //        m_storeModel.shoplist.Remove(shopInfo);
                        //    }
                        //}
                        m_storeModel.ClearMustBuyRedpoint(shopInfo);
                        m_storeModel.OnClickShopCell(shopInfo);
                    });
                    //if(m_storeModel.storeFuncType == StoreFunc.WeekStore)
                    //{
                    //    if(m_storeModel.shoplist.Contains(shopInfo))
                    //    {
                    //        if(!shopItemCell.effect.IsPlaying)
                    //        {
                    //            shopItemCell.effect.Play();
                    //        }
                    //    }
                    //    else
                    //    {
                    //        if (shopItemCell.effect.IsPlaying)
                    //        {
                    //            shopItemCell.effect.StopImediatly();
                    //        }
                    //    }
                    //}
                }
                else
                {
System/Team/MyTeamWin.cs
@@ -289,7 +289,8 @@
                Teammate mate;
                if (model.myTeam.TryGetMember(i, out mate))
                {
                    sign.Display(mate.mapId == PlayerDatas.Instance.baseData.MapID ? TeammateNearByBehaviour.LocationState.NearBy : TeammateNearByBehaviour.LocationState.FarAway);
                    var isNearBy = mate.mapId == PlayerDatas.Instance.baseData.MapID;
                    sign.Display(isNearBy ? TeammateNearByBehaviour.LocationState.NearBy : TeammateNearByBehaviour.LocationState.FarAway);
                }
                else
                {
System/WindowBase/ModelCenter.cs
@@ -193,6 +193,7 @@
            RegisterModel<FairyGrabBossModel>();
            RegisterModel<GodBeastModel>();
            RegisterModel<PrayForDurgModel>();
            RegisterModel<FeatureNoticeModel>();
            inited = true;
        }