From 973edc44a04dceb8b48a32ca912e6167f86189d4 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期一, 25 八月 2025 17:38:02 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts --- Main/System/HeroUI/HeroUIManager.cs | 102 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 97 insertions(+), 5 deletions(-) diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs index 8480413..874b6f1 100644 --- a/Main/System/HeroUI/HeroUIManager.cs +++ b/Main/System/HeroUI/HeroUIManager.cs @@ -16,6 +16,10 @@ public WaitHeroFuncResponse waitResponse; //璇锋眰姝﹀皢鍔熻兘锛屼笌鏈嶅姟绔氦浜� + public const float lihuiScale = 0.6f; //绔嬬粯缂╂斁澶у皬 + + //鐢ㄤ簬闈炰笂闃垫灏嗘垬鍔涘彉鍖栨椂 姝﹀皢ID锛氫笂娆℃垬鍔� + public KeyValuePair<string, long> lastFightPower = new KeyValuePair<string, long>(); public override void Init() { @@ -34,7 +38,7 @@ { var config = FuncConfigConfig.Get("HeroRebirth"); payBackMoneyType = int.Parse(config.Numerical1); - payBackMoney = int.Parse(config.Numerical2); + rebornAwakeHeroMaxCount = int.Parse(config.Numerical2); } public void OnBeforePlayerDataInitialize() @@ -124,7 +128,6 @@ return hero.heroLevel == GetMaxLVByBreakLV(hero.Quality, hero.breakLevel); } - #endregion @@ -144,7 +147,7 @@ { if (isOK) { - if (UIHelper.GetMoneyCnt(buyInfo[0]) < (ulong)buyInfo[1]) + if (UIHelper.GetMoneyCnt(buyInfo[0]) < buyInfo[1]) { SysNotifyMgr.Instance.ShowTip("LackMoney", buyInfo[0]); return; @@ -203,10 +206,99 @@ } - + + #region 鎷涘嫙 + + public HappXBTitle selectCallType; //瀵诲疂鏋氫妇绫诲瀷 + public int selectCallIndex;//0锛�1鎶� 1锛�10鎶� 瀵瑰簲閰嶇疆椤哄簭 + public const string skipKey = "SkipHeroCall"; + + //绉垎鎷涘嫙棰勮 + public List<int> heroCallSortList { get; private set; } = new List<int>(); //绉垎鎷涘嫙鍒楄〃 + public int selectHeroCallListJob = 0; //绛涢�夎亴涓� + public int selectHeroCallListCountry = 0; //绛涢�夊浗瀹� + + public bool IsNewHero(int heroID) + { + var bookInfo = GetHeroBookInfo(heroID); + if (bookInfo != null) + { + if (bookInfo.BookInitState < 2) + { + //鏇寸簿鍑嗙殑 闇�瑕佹瘮杈冩湰娆℃娊鐨勫悓姝﹀皢涓暟 鍜� 鑳屽寘閲屾湁鐨勪釜鏁板啀姣旇緝 + if (HappyXBModel.Instance.GetCountInResult(heroID) >= HeroManager.Instance.GetHeroCountByID(heroID)) + { + return true; + } + else + { + return false; + } + } + else + { + return false; + } + } + + return true; + } + + List<int> allHeroCallScoreList = new List<int>(); //绉垎鎷涘嫙鍒楄〃 + public void SortHeroCallList() + { + if (allHeroCallScoreList.IsNullOrEmpty()) + { + allHeroCallScoreList = HappyXBModel.Instance.GetAllGridLibItemIDByType((int)HappXBTitle.HeroCallScore); + } + heroCallSortList = new List<int>(); + if (selectHeroCallListJob == 0 && selectHeroCallListCountry == 0) + { + heroCallSortList = allHeroCallScoreList; + } + else + { + foreach (var item in allHeroCallScoreList) + { + HeroConfig heroConfig = HeroConfig.Get(item); + if (heroConfig == null) + { + continue; + } + if (selectHeroCallListJob != 0 && selectHeroCallListJob != heroConfig.Class) + { + continue; + } + if (selectHeroCallListCountry != 0 && selectHeroCallListCountry != heroConfig.Country) + { + continue; + } + heroCallSortList.Add(item); + } + } + + heroCallSortList.Sort(CmpHeroID); + } + + int CmpHeroID(int idA, int idB) + { + HeroConfig heroA = HeroConfig.Get(idA); + HeroConfig heroB = HeroConfig.Get(idB); - + // 鎺掑簭瑙勫垯锛氭灏嗗搧璐紴姝﹀皢ID + if (heroA.Quality != heroB.Quality) + { + return heroA.Quality > heroB.Quality ? -1 : 1; + } + + + return heroA.HeroID.CompareTo(heroB.HeroID); + } + + #endregion + + } public struct WaitHeroFuncResponse -- Gitblit v1.8.0