少年修仙传客户端代码仓库
client_Zxw
2018-11-26 7cad7f141df56cd931ef82322dd92341e29f8776
Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
10个文件已修改
171 ■■■■■ 已修改文件
System/Dungeon/AssistPlayerCell.cs 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonAssistModel.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/DungeonAssistWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Realm/RealmUpWin.cs 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/AutoHammerWin.cs 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianModel.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/MagicianWin.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Role/PropertyBehaviour.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
UI/Common/UI3DShowHero.cs 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Utility/UIHelper.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/Dungeon/AssistPlayerCell.cs
@@ -60,6 +60,7 @@
            jobNameText.text = OccupationNameConfig.GetOccupationName(playerInfo.Job,1);
            goldHelpText.text = assistModel.goldAssistPlayer.ToString();
            UpdateAssistReward();
            UpdateRelation();
            int nirvanaLv = playerInfo.LV - friendsModel.OpenGreatLV;
            lvIcon.gameObject.SetActive(nirvanaLv > 0);
            if (nirvanaLv > 0)
@@ -119,6 +120,22 @@
            }
        }
        public void UpdateRelation()
        {
            if (playerInfo == null) return;
            relationImg.gameObject.SetActive(playerInfo.relatedToPlayer != DungeonAssistModel.RelatedToPlayer.None);
            switch (playerInfo.relatedToPlayer)
            {
                case DungeonAssistModel.RelatedToPlayer.Friend:
                    relationImg.SetSprite("XT_FBZZ_04");
                    break;
                case DungeonAssistModel.RelatedToPlayer.Ally:
                    relationImg.SetSprite("XT_FBZZ_05");
                    break;
            }
        }
        private void ClickHelp()
        {
            if (playerInfo == null) return;
System/Dungeon/DungeonAssistModel.cs
@@ -38,6 +38,7 @@
            int playerId = (int)PlayerDatas.Instance.baseData.PlayerID;
            helpInfoLocalSave = StringUtility.Contact("HelpInfoLocalSave", playerId);
            GetLocalSaveData();
            UpdateRedpoint();
        }
        public override void UnInit()
@@ -88,6 +89,27 @@
                {
                    var ratio = (float)addRatio / 100;
                    addRatioStr = StringUtility.Contact(ratio, "%");
                    return true;
                }
            }
            return false;
        }
        public bool TryGetCurVipAddCoins(out int addCoins)
        {
            addCoins = 0;
            int vipLv = PlayerDatas.Instance.baseData.VIPLv;
            var vipDict = VipPrivilegeConfig.GetVipPrivilegeDic(VipPrivilegeType.AssistXianYuanCoinsAdd);
            if (vipDict == null || vipLv < 1) return false;
            List<int> vipLvlist = vipDict.Keys.ToList();
            vipLvlist.Sort();
            for (int i = vipLvlist.Count - 1; i > -1; i--)
            {
                var lv = vipLvlist[i];
                var coins = vipDict[lv];
                if (vipLv >= lv && coins > 0)
                {
                    addCoins = coins;
                    return true;
                }
            }
@@ -279,10 +301,10 @@
            helpInfolist = helpInfolist == null ? new List<string>() : helpInfolist;
            if (helpInfolist.Count >= 20)
            {
                helpInfolist.RemoveAt(0);
                helpInfolist.RemoveAt(helpInfolist.Count - 1);
            }
            info = StringUtility.Contact(createDate,"|",info, "|", isNew);
            helpInfolist.Add(info);
            helpInfolist.Insert(0,info);
            LocalSave.SetStringArray(helpInfoLocalSave, helpInfolist.ToArray());
            if(UpdateResultEvent != null)
            {
@@ -331,12 +353,20 @@
        public void UpdateAssistList(HB207_tagMCHelpBattleList battleList)
        {
            assistPlayerDict.Clear();
            List<AssistPlayerInfo> playerInfos = new List<AssistPlayerInfo>();
            assistRefreshNum = battleList.RefreshCount;
            for(int i = 0; i < battleList.HelpCount; i++)
            {
                var info = battleList.HelpPlayerList[i];
                AssistPlayerInfo playerInfo = new AssistPlayerInfo(info);
                assistPlayerDict.Add(playerInfo.PlayerID,playerInfo);
                playerInfos.Add(playerInfo);
            }
            playerInfos.Sort(CompareByFightPower);
            for(int i = 0; i < playerInfos.Count; i++)
            {
                var playerInfo = playerInfos[i];
                assistPlayerDict.Add(playerInfo.PlayerID, playerInfo);
            }
            if(UpdataAssistPlayerListEvent != null)
@@ -348,6 +378,14 @@
            {
                WindowCenter.Instance.Open<DungeonAssistPlayerWin>();
            }
        }
        public int CompareByFightPower(AssistPlayerInfo start,AssistPlayerInfo end)
        {
            int x = start.FightPower;
            int y = end.FightPower;
            if (x.CompareTo(y) != 0) return -x.CompareTo(y);
            return 0;
        }
        public event Action<int> UpdataAssistPlayerEvent;
@@ -436,6 +474,7 @@
            {
                UpdateCheckInResultEvent();
            }
            UpdateRedpoint();
        }
        private List<AssistResult> assistResults = new List<AssistResult>();
        public void UpdateAssistResultNotify(HB211_tagMCHelpBattleRecordList recordList)
@@ -486,6 +525,24 @@
        #endregion
        #region 红点
        public const int AssistCheckInRedPoint = 7800001;
        public Redpoint checkInRedpoint = new Redpoint(AssistCheckInRedPoint);
        public void UpdateRedpoint()
        {
            if (!FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.DayDaily)) return;
            if(IsCheckInOk)
            {
                checkInRedpoint.state = RedPointState.None;
            }
            else
            {
                checkInRedpoint.state = RedPointState.Simple;
            }
        }
        #endregion
        public class AssistResult
        {
            public int assistType; // 1 真实的自己 2 自己的镜像
System/Dungeon/DungeonAssistWin.cs
@@ -92,7 +92,10 @@
        private void UpdateXianYuanCoins()
        {
            dayScoreText.text = StringUtility.Contact(PlayerDatas.Instance.baseData.ExAttr11,"/",assistModel.maxXianYuanCoins);
            int addCoins = 0;
            assistModel.TryGetCurVipAddCoins(out addCoins);
            int limitCoins = assistModel.maxXianYuanCoins + addCoins;
            dayScoreText.text = StringUtility.Contact(PlayerDatas.Instance.baseData.ExAttr11,"/",limitCoins);
        }
        private void UpdateVipAddCoins()
System/Realm/RealmUpWin.cs
@@ -215,17 +215,9 @@
                m_RealmIconNext.Display(_realmLv);
                var fightPower = PlayerDatas.Instance.baseData.FightPoint;
                var presentConfig = Config.Instance.Get<RealmConfig>(PlayerDatas.Instance.baseData.realmLevel);
                if (presentConfig != null && presentConfig.IsBigRealm == 1)
                {
                    m_FightPower.text = Language.Get("RealmRecommendTip", UIHelper.ReplaceLargeNum(config.FightPower));
                }
                else
                {
                    m_FightPower.text = StringUtility.Contact(UIHelper.AppendStringColor(TextColType.Green, Language.Get("RolePromoteBetterFight")),
                    UIHelper.AppendStringColor(fightPower >= config.FightPower ? TextColType.Green : TextColType.Red, fightPower.ToString())
                    , "/", config.FightPower);
                }
                m_FightPower.text = StringUtility.Contact(UIHelper.AppendStringColor(TextColType.Green, Language.Get("RolePromoteBetterFight")),
                UIHelper.AppendStringColor(fightPower >= config.FightPower ? TextColType.Green : TextColType.Red, fightPower.ToString())
                , "/", config.FightPower);
            }
        }
System/Role/AutoHammerWin.cs
@@ -91,7 +91,7 @@
        private void GetTargetLevel(int level)
        {
            Dictionary<int, int> skillDict = null;
            var minLevel = level;
            var minLevel = 0;
            if (model.TryGetGodWeaponSkills(selectGodWeaponType, out skillDict))
            {
                foreach (var key in skillDict.Keys)
@@ -108,14 +108,17 @@
            {
                foreach (var value in stages)
                {
                    if (value >= level && value <= minLevel)
                    if (value >= level)
                    {
                        minLevel = value;
                        if (minLevel == 0 || value <= minLevel)
                        {
                            minLevel = value;
                        }
                        break;
                    }
                }
            }
            targetLevel = minLevel;
            targetLevel = Mathf.Max(level, minLevel);
        }
        private void DisplayLevel()
System/Role/MagicianModel.cs
@@ -75,6 +75,7 @@
        Dictionary<int, List<int>> godWeaponStageDict = new Dictionary<int, List<int>>();
        Dictionary<int, int> exteriorPowerDict = new Dictionary<int, int>();
        Dictionary<int, int> godWeaponSkillEffect = new Dictionary<int, int>();
        Dictionary<int, int> singleHarmmerExp = new Dictionary<int, int>();
        int[] autoHammerExpArea { get; set; }
        int[] autoHammerCount { get; set; }
@@ -182,6 +183,7 @@
            {
                autoHammerExpArea = ConfigParse.GetMultipleStr<int>(autoHammerConfig.Numerical1);
                autoHammerCount = ConfigParse.GetMultipleStr<int>(autoHammerConfig.Numerical2);
                singleHarmmerExp = ConfigParse.GetDic<int, int>(autoHammerConfig.Numerical3);
            }
            var funcConfig = Config.Instance.Get<FuncConfigConfig>("GodMagicExp");
@@ -511,6 +513,10 @@
                    index = i;
                    break;
                }
                else
                {
                    index++;
                }
            }
            if (index < autoHammerCount.Length)
            {
@@ -529,6 +535,10 @@
            {
                totalExp = moneyCount * autoHammerCost.exp;
            }
            else if (singleHarmmerExp.ContainsKey(type))
            {
                totalExp = moneyCount * singleHarmmerExp[type];
            }
            var itemId = items[index];
            var itemConfig = Config.Instance.Get<ItemConfig>(itemId);
            var expCount = Mathf.CeilToInt((float)totalExp / itemConfig.EffectValueA1);
System/Role/MagicianWin.cs
@@ -370,6 +370,11 @@
            m_Hammer.gameObject.SetActive((active || model.SatisfyUnlockCondition(model.selectType)) && !maxLevel);
            m_AutoHammer.gameObject.SetActive(active && !maxLevel);
            m_HammerRedpoint.gameObject.SetActive(model.GetRedpointLightByType(model.selectType));
            List<int> stages = null;
            var requirePreview = model.TryGetGodWeaponStages(model.selectType, out stages);
            m_Preview.gameObject.SetActive(requirePreview);
            if (!active)
            {
                m_CostItemTitle.text = Language.Get("L1049");
System/Role/PropertyBehaviour.cs
@@ -18,7 +18,8 @@
            if (config != null)
            {
                m_PropertyName.text = config.Name;
                m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage)),
                m_PropertyValue.text = StringUtility.Contact(
                    UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                    config.ISPercentage == 1 ? "%" : string.Empty);
            }
        }
@@ -29,7 +30,8 @@
            if (config != null)
            {
                m_PropertyName.text = config.Name;
                m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage)),
                m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
                    UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                    config.ISPercentage == 1 ? "%" : string.Empty);
            }
        }
@@ -40,7 +42,8 @@
            if (config != null)
            {
                m_PropertyName.text = StringUtility.Contact(config.Name, ":");
                m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage)),
                m_PropertyValue.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
                    UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                    config.ISPercentage == 1 ? "%" : string.Empty);
            }
        }
@@ -51,7 +54,8 @@
            if (config != null)
            {
                m_PropertyName.text = StringUtility.Contact(config.Name, ":");
                m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage)),
                m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
                    UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                    config.ISPercentage == 1 ? "%" : string.Empty);
                if (_add == 0)
                {
@@ -59,7 +63,8 @@
                }
                else
                {
                    m_PropertyAdd.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_add, config.ISPercentage)),
                    m_PropertyAdd.text = StringUtility.Contact("+", UIHelper.ReplaceLargeNum(
                        UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                       config.ISPercentage == 1 ? "%" : string.Empty);
                }
            }
@@ -71,9 +76,11 @@
            if (config != null)
            {
                m_PropertyName.text = config.Name;
                m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_value, config.ISPercentage)),
                m_PropertyValue.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
                    UIHelper.ReplacePercentage(_value, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                    config.ISPercentage == 1 ? "%" : string.Empty);
                m_PropertyAdd.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(UIHelper.ReplacePercentage(_add, config.ISPercentage)),
                m_PropertyAdd.text = StringUtility.Contact(UIHelper.ReplaceLargeNum(
                    UIHelper.ReplacePercentage(_add, config.ISPercentage, UIHelper.GetPropertyDecimalCount(_property))),
                   config.ISPercentage == 1 ? "%" : string.Empty);
            }
        }
UI/Common/UI3DShowHero.cs
@@ -486,21 +486,15 @@
                switch (key)
                {
                    case 1:
                        if (clothesModel != null)
                        if (secondaryModel != null)
                        {
                            bone = clothesModel.transform.GetChildTransformDeeply("Bip001 Spine");
                            bone = secondaryModel.transform;
                        }
                        break;
                    case 2:
                        if (weaponModel != null)
                        {
                            bone = weaponModel.transform;
                        }
                        break;
                    case 3:
                        if (secondaryModel != null)
                        {
                            bone = secondaryModel.transform;
                        }
                        break;
                    case 4:
Utility/UIHelper.cs
@@ -306,11 +306,11 @@
        return _textBuilder.ToString();
    }
    public static float ReplacePercentage(float num, int isPer)
    public static float ReplacePercentage(float num, int isPer, int decimals = 1)
    {
        if (isPer == 1 || isPer == 2)
        {
            return (float)Math.Round(num / 100, 1);
            return (float)Math.Round(num / 100, decimals);
        }
        else
        {
@@ -318,6 +318,17 @@
        }
    }
    public static int GetPropertyDecimalCount(int property)
    {
        switch (property)
        {
            case 73:
                return 2;
            default:
                return 1;
        }
    }
    private const string SPECIAL_CHA = " ()()@!#$%^&*[]|_";
    public static bool HasSpecialCharac(string str)
    {