少年修仙传客户端代码仓库
client_Hale
2019-04-29 8d47b4e4ba352a28b81af961c3314562b76b0ad6
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
9个文件已修改
128 ■■■■ 已修改文件
System/Dungeon/DungeonTargetBehaviour.cs 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/EquipStar/EquipStarModel.cs 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/ClientHazyGrassStage.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyDemonKingModel.cs 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/HazyRegion/HazyGrassModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/ExpertSkillSelectWin.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Skill/TreasureSkillModel.cs 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/ClientTreasureDungeon.cs 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Treasure/TreasureCollectBriefInfoBehaviour.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonTargetBehaviour.cs
@@ -174,7 +174,10 @@
                    }
                    if (_targetValue > 0)
                    {
                        m_TargetNums[_index].text = StringUtility.Contact(collectCount, "/", _targetValue);
                        var label = UIHelper.AppendColor(collectCount >= _targetValue ?
                            TextColType.LightYellow : TextColType.Green
                            , collectCount.ToString());
                        m_TargetNums[_index].text = StringUtility.Contact(label, "/", _targetValue);
                        break;
                    }
                    m_TargetNums[_index].text = collectCount.ToString();
@@ -183,7 +186,10 @@
                    var attackCount = model.GetDungeonNpcAttackCount(npcId);
                    if (_targetValue > 0)
                    {
                        m_TargetNums[_index].text = StringUtility.Contact(attackCount, "/", _targetValue);
                        var label = UIHelper.AppendColor(attackCount >= _targetValue ?
                            TextColType.LightYellow : TextColType.Green
                            , attackCount.ToString());
                        m_TargetNums[_index].text = StringUtility.Contact(label, "/", _targetValue);
                        break;
                    }
                    m_TargetNums[_index].text = attackCount.ToString();
System/EquipStar/EquipStarModel.cs
@@ -526,13 +526,29 @@
            var upgradable = IsEquipPlaceUpgradable(equipGuid);
            if (upgradable)
            {
                for (var i = 1; i <= 5; i++)
                var currentStarLevel = GetEquipStarLevel(equipPosition);
                var config = EquipStarConfig.Get(equipPosition.x, equipPosition.y, currentStarLevel);
                if (config.CostEquipCnt == 0)
                {
                    var itemGuid = GetMaterialLogicStringByIndex(i).value;
                    probability += GetMaterialSuccessRate(equipPosition, itemGuid);
                    if (config.CostItemDict.x > 0)
                    {
                        specialMaterial.value = Mathf.RoundToInt(packModel.GetItemCountByID(PackType.Item, config.CostItemDict.x) >= config.CostItemDict.y ? 1f : 0f * 100);
                    }
                    else
                    {
                        specialMaterial.value = 0;
                    }
                }
                else
                {
                    for (var i = 1; i <= 5; i++)
                    {
                        var itemGuid = GetMaterialLogicStringByIndex(i).value;
                        probability += GetMaterialSuccessRate(equipPosition, itemGuid);
                    }
                starUpgradeProbability.value = Mathf.RoundToInt(probability * 100);
                    starUpgradeProbability.value = Mathf.RoundToInt(probability * 100);
                }
            }
            else
            {
System/HazyRegion/ClientHazyGrassStage.cs
@@ -63,6 +63,9 @@
        InitializeNpc();
        initedFightNpc = true;
        model.dugeonTargetStateRefresh -= DugeonTargetStateRefresh;
        model.dugeonTargetStateRefresh += DugeonTargetStateRefresh;
    }
    protected override void OnUpdate()
@@ -91,6 +94,18 @@
        UnloadAllNpc();
        ClientCollectUtility.OnCollectFinished -= OnCollectFinished;
        model.dugeonTargetStateRefresh -= DugeonTargetStateRefresh;
    }
    private void DugeonTargetStateRefresh()
    {
        if (model.IsDungeonTargetDone)
        {
            if (!NewBieCenter.Instance.IsGuideCompleted(51))
            {
                NewBieCenter.Instance.StartNewBieGuide(51);
            }
        }
    }
    int GetNpcRefreshCount(HazyGrassNpcInfo npcInfo)
System/HazyRegion/HazyDemonKingModel.cs
@@ -46,7 +46,11 @@
        public void OnPlayerLoginOk()
        {
            if (IsInDungeon)
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                ClientDungeonStageUtility.RequestStartClientDungeon(config.dungeonId, config.lineId);
            }
        }
        public override void UnInit()
System/HazyRegion/HazyGrassModel.cs
@@ -55,6 +55,11 @@
        public void OnPlayerLoginOk()
        {
            if (IsInDungeon)
            {
                var config = HazyRegionConfig.Get(hazyRegionModel.processingIncidentId);
                ClientDungeonStageUtility.RequestStartClientDungeon(config.dungeonId, config.lineId);
            }
        }
        public override void UnInit()
@@ -287,6 +292,7 @@
            {
                return;
            }
            m_MapNpcCount.Clear();
            for (int i = 0; i < package.NPCInfoCnt; i++)
            {
                var data = package.NPCInfoList[i];
System/Skill/ExpertSkillSelectWin.cs
@@ -108,7 +108,7 @@
                for (int i = 0; i < m_SkillExperts.Length; i++)
                {
                    var potential = skill.potentials[i];
                    m_SkillExperts[i].Display(potential.id, OnSelect);
                    m_SkillExperts[i].Display(potential.id, skill.level >= potential.limitLevel, OnSelect);
                }
            }
        }
@@ -125,12 +125,17 @@
        {
            if (selectExpert != 0)
            {
                TreasureSkill skill;
                model.TryGetSkill(selectSkillId, out skill);
                var level = 0;
                TreasurePotential expert;
                if (model.TryGetPotential(selectExpert, out expert))
                {
                    level = expert.level;
                }
                m_Select.gameObject.SetActive(skill.level >= expert.limitLevel);
                SkillConfig skillConfig;
                if (level == 0)
@@ -193,18 +198,21 @@
        [Serializable]
        public class SkillExpertWidget
        {
            [SerializeField] Image m_Icon;
            [SerializeField] ImageEx m_Bottom;
            [SerializeField] ImageEx m_Icon;
            [SerializeField] Text m_SkillName;
            [SerializeField] ImageEx m_ReikiBottom;
            [SerializeField] Text m_Reiki;
            [SerializeField] Transform m_ContainerSelect;
            [SerializeField] Text m_Use;
            [SerializeField] Text m_Limit;
            [SerializeField] Button m_Select;
            public int skillId { get; private set; }
            TreasureSkillModel model { get { return ModelCenter.Instance.GetModel<TreasureSkillModel>(); } }
            public void Display(int skillId, Action<int> func)
            public void Display(int skillId, bool unlock, Action<int> func)
            {
                this.skillId = skillId;
@@ -216,12 +224,22 @@
                var property = skillConfig.RequireProperty();
                var propertyConfig = PlayerPropertyConfig.Get(property);
                m_Reiki.text = propertyConfig.Name;
                m_Reiki.color = UIHelper.GetPropertyColor(property);
                m_Reiki.color = unlock ? UIHelper.GetPropertyColor(property) : UIHelper.s_Gray;
                var selectExpertSkill = 0;
                model.TryGetExpertSkill(ExpertSkillSelectWin.selectSkillId, out selectExpertSkill);
                m_Use.gameObject.SetActive(selectExpertSkill == skillId);
                TreasurePotential expert;
                model.TryGetPotential(skillId, out expert);
                m_Limit.text = string.Format("{0}级可使用", expert.limitLevel);
                m_Limit.gameObject.SetActive(!unlock);
                m_Bottom.gray = !unlock;
                m_Icon.gray = !unlock;
                m_ReikiBottom.gray = !unlock;
                m_Select.SetListener(() =>
                {
                    if (func != null)
System/Skill/TreasureSkillModel.cs
@@ -110,7 +110,7 @@
                    treasureSkills.Add(config.limitSkillId, treasureSkill);
                    index++;
                }
                treasureSkill.potentials.Add(new TreasurePotential(config.id, 0, treasureSkill.redpoint.id));
                treasureSkill.potentials.Add(new TreasurePotential(config.id, 0, config.limitLevel, treasureSkill.redpoint.id));
                var skillConfig = SkillConfig.Get(config.limitSkillId);
                List<int> skills;
@@ -372,6 +372,22 @@
            return false;
        }
        public bool ExistAnyUnlockPotential(int skillId)
        {
            TreasureSkill treasureSkill;
            if (TryGetSkill(skillId, out treasureSkill))
            {
                for (int i = 0; i < treasureSkill.potentials.Count; i++)
                {
                    if (treasureSkill.level >= treasureSkill.potentials[i].limitLevel)
                    {
                        return true;
                    }
                }
            }
            return false;
        }
        public void SetAlreadyRemind()
        {
            requireRemind = false;
@@ -396,7 +412,9 @@
                }
                var expertSkill = 0;
                if (skill.level > 0 && !TryGetExpertSkill(skill.skillId, out expertSkill))
                if (funcOpen && skill.level > 0
                    && !TryGetExpertSkill(skill.skillId, out expertSkill)
                    && ExistAnyUnlockPotential(skill.skillId))
                {
                    skill.expertRedpoint.state = RedPointState.Simple;
                }
@@ -481,12 +499,14 @@
    {
        public readonly int id;
        public readonly int maxLevel;
        public readonly int limitLevel;
        public int level { get; private set; }
        public TreasurePotential(int id, int level, int redpointBase)
        public TreasurePotential(int id, int level,int limitLevel, int redpointBase)
        {
            this.id = id;
            this.level = level;
            this.limitLevel = limitLevel;
            var config = SkillConfig.Get(id);
            maxLevel = config.SkillMaxLV;
System/Treasure/ClientTreasureDungeon.cs
@@ -35,6 +35,18 @@
        PlayerDatas.Instance.baseData.mainServerMapIdRecord = PlayerDatas.Instance.baseData.MapID;
        PlayerDatas.Instance.baseData.MapID = (ushort)Client_DataMap;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= PlayerLoginOk;
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += PlayerLoginOk;
    }
    private static void PlayerLoginOk()
    {
        var mapId = PlayerDatas.Instance.baseData.MapID;
        if (mapId == Client_DataMap)
        {
            ClientDungeonStageUtility.RequestStartClientDungeon(0, 0);
        }
    }
    public static void RequestExit()
@@ -43,6 +55,7 @@
        PlayerDatas.Instance.extersion.pkState = 0;
        ModelCenter.Instance.GetModel<DungeonModel>().ResetBufData();
        DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent -= PlayerLoginOk;
        StageLoad.Instance.onStageLoadFinish -= OnStageLoadFinish;
        StageLoad.Instance.onStageLoadFinish += OnStageLoadFinish;
System/Treasure/TreasureCollectBriefInfoBehaviour.cs
@@ -102,7 +102,7 @@
        private void TreasureCollectProgressRefresh(int id)
        {
            if (id == displayId)
            if (id == displayId && model.isServerReady)
            {
                m_ProgressEffect.Play();
                if (m_CacheCoroutine != null)