From aa84cb62bebb9c8a4e586bcc1ec28eb7a16a8860 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 26 一月 2026 18:10:34 +0800
Subject: [PATCH] 422 子 【内政】命格系统 / 【内政】命格系统-客户端
---
Main/System/Hero/HeroInfo.cs | 14 ++++++-
Main/System/Mingge/MinggeWin.cs | 4 +-
Main/System/HeroFates/HeroFatesManager.cs | 4 +-
Main/System/HeroUI/HeroPosWin.cs | 3 +
Main/System/Mingge/MinggeEquipCell.cs | 2
Main/System/Mingge/MinggeEquipChangeCell.cs | 4 +
Main/System/Mingge/MinggeSmallTipWin.cs | 7 +++
Main/System/Battle/BattleField/StoryBattleField.cs | 23 +++++++++--
Main/System/ItemTip/ItemTipUtility.cs | 25 +++++-------
Main/System/FuncPreset/FuncPresetManager.cs | 9 ++--
Main/System/HeroUI/HeroUIManager.Reborn.cs | 2
Main/System/HeroUI/HeroTrainWin.cs | 2
12 files changed, 62 insertions(+), 37 deletions(-)
diff --git a/Main/System/Battle/BattleField/StoryBattleField.cs b/Main/System/Battle/BattleField/StoryBattleField.cs
index ea24d09..20d9f95 100644
--- a/Main/System/Battle/BattleField/StoryBattleField.cs
+++ b/Main/System/Battle/BattleField/StoryBattleField.cs
@@ -30,6 +30,8 @@
public StoryBattleState battleState;
+ int lastPresetID = 0;
+
public StoryBattleField() : base(string.Empty)
{
@@ -59,12 +61,9 @@
}
// LoadBattleMode();
-
-
-
-
-
+ lastPresetID = TeamManager.Instance.GetMainTeamID();
TeamManager.Instance.OnTeamChange += OnTeamChange;
+ FuncPresetManager.Instance.OnFuncPresetUseDataEvent += OnFuncPresetUseDataEvent;
}
protected override void LoadMap(int mapID)
@@ -80,6 +79,7 @@
{
base.Release();
TeamManager.Instance.OnTeamChange -= OnTeamChange;
+ FuncPresetManager.Instance.OnFuncPresetUseDataEvent -= OnFuncPresetUseDataEvent;
}
protected void LoadBattleMode()
@@ -149,6 +149,19 @@
}
}
+ void OnFuncPresetUseDataEvent(int type)
+ {
+ var presetID = TeamManager.Instance.GetMainTeamID();
+ if (presetID != lastPresetID)
+ {
+ lastPresetID = presetID;
+ if (battleState == StoryBattleState.Break)
+ {
+ ReloadTeam();
+ }
+ }
+ }
+
protected override void OnSettlement(JsonData turnFightStateData)
{
diff --git a/Main/System/FuncPreset/FuncPresetManager.cs b/Main/System/FuncPreset/FuncPresetManager.cs
index 94498a4..d722b9b 100644
--- a/Main/System/FuncPreset/FuncPresetManager.cs
+++ b/Main/System/FuncPreset/FuncPresetManager.cs
@@ -12,11 +12,10 @@
//瀵瑰簲 BattlePreSetType 鎴樻枟绫诲瀷 锛� 鍏ㄥ眬鏂规ID
Dictionary<int, int> battlePreSetDict = new Dictionary<int, int>();
- public event Action OnBattelePresetEvent;
//鎵�鏈夐璁炬柟妗堢殑淇濆瓨淇℃伅 鍏ㄥ眬鏂规ID 锛氬瓙鍔熻兘绫诲瀷锛堥厤琛級锛氬瓙鏂规ID
Dictionary<int, Dictionary<int, int>> m_FuncPresetSaveDict = new Dictionary<int, Dictionary<int, int>>();
- public event Action OnFuncPresetUseDataEvent;
+ public event Action<int> OnFuncPresetUseDataEvent; //0 鏇存崲瀛愭柟妗堬紝1 鏇存崲鍏ㄥ眬鏂规锛�2 瑙i攣/鏇存敼鍚�
public const int GlobalDefaultPresetID = 1; //榛樿鍏ㄥ眬鏂规ID
public const int FuncDefaultPresetID = 1; //榛樿瀛愬姛鑳芥柟妗圛D
@@ -127,7 +126,7 @@
}
}
- OnFuncPresetUseDataEvent?.Invoke();
+ OnFuncPresetUseDataEvent?.Invoke(2);
}
//姣忎釜鍏ㄥ眬鏂规鐨勫瓨鍌ㄤ俊鎭�
@@ -146,7 +145,7 @@
m_FuncPresetSaveDict[batPreset.BatPresetID][funcPreset.FuncPresetType] = funcPreset.FuncPresetID;
}
}
- OnFuncPresetUseDataEvent?.Invoke();
+ OnFuncPresetUseDataEvent?.Invoke(0);
}
//褰撳墠鎴樻枟鍔熻兘鐨勫叏灞�鏂规ID浣跨敤鎯呭喌
@@ -156,7 +155,7 @@
{
battlePreSetDict[netPack.BatPresetList[i].BatPresetType] = netPack.BatPresetList[i].BatPresetID;
}
- OnBattelePresetEvent?.Invoke();
+ OnFuncPresetUseDataEvent?.Invoke(1);
}
//鏍规嵁鎴樻枟鑾峰彇鍏ㄥ眬鏂规ID锛屽鏋滃彇涓嶅埌榛樿鏂规1
diff --git a/Main/System/Hero/HeroInfo.cs b/Main/System/Hero/HeroInfo.cs
index ce68229..36df488 100644
--- a/Main/System/Hero/HeroInfo.cs
+++ b/Main/System/Hero/HeroInfo.cs
@@ -49,14 +49,24 @@
get
{
var _list = itemHero.GetUseData(83);
- // 榛樿娌℃湁棰勮鐨勮瘽灏辨槸鐢熸晥鐨�
if (_list == null || _list.Count == 0)
- return true;
+ return false;
var id = FuncPresetManager.Instance.GetFuncPresetID((int)FuncPresetType.Team);
return _list.Contains(id);
}
}
+ //鍙鍦ㄩ璁句腑鍒欎唬琛ㄦ湁婵�娲伙紝浣嗕笉涓�瀹氭縺娲诲睘鎬�
+ public bool isActive
+ {
+ get
+ {
+ var _list = itemHero.GetUseData(83);
+ if (_list == null || _list.Count == 0)
+ return false;
+ return true;
+ }
+ }
public bool isLock
{
diff --git a/Main/System/HeroFates/HeroFatesManager.cs b/Main/System/HeroFates/HeroFatesManager.cs
index 9962472..6bbffef 100644
--- a/Main/System/HeroFates/HeroFatesManager.cs
+++ b/Main/System/HeroFates/HeroFatesManager.cs
@@ -240,8 +240,8 @@
//涓嶆槸鎵�闇�鍝佽川
if (item.Quality != fatesQuality)
continue;
- // 鐢熸晥涓殑姝﹀皢
- if (item.isAttrActive)
+ // 婵�娲讳腑鐨勬灏�
+ if (item.isActive)
continue;
// 鍦ㄤ换浣曢樀瀹逛腑涓婇樀
bool isInAnyTeam = item.IsInAnyTeam();
diff --git a/Main/System/HeroUI/HeroPosWin.cs b/Main/System/HeroUI/HeroPosWin.cs
index 1f8054f..c911e34 100644
--- a/Main/System/HeroUI/HeroPosWin.cs
+++ b/Main/System/HeroUI/HeroPosWin.cs
@@ -141,8 +141,9 @@
//鏂规鍙樻洿 鍙湁涓绘垬
mainFBBtn.SelectBtn();
}
- void OnFuncPresetUseDataEvent()
+ void OnFuncPresetUseDataEvent(int type)
{
+ HeroUIManager.Instance.selectTeamType = TeamManager.Instance.GetMainTeamID();
Display();
}
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index 741a254..6a9f393 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -420,7 +420,7 @@
bool CanDelete()
{
- if (hero.isAttrActive)
+ if (hero.isActive)
return false;
return HeroUIManager.Instance.IsTheSameHeroFullStar(hero.heroId);
diff --git a/Main/System/HeroUI/HeroUIManager.Reborn.cs b/Main/System/HeroUI/HeroUIManager.Reborn.cs
index 1a9c292..ad3aa62 100644
--- a/Main/System/HeroUI/HeroUIManager.Reborn.cs
+++ b/Main/System/HeroUI/HeroUIManager.Reborn.cs
@@ -139,7 +139,7 @@
foreach (var heroInfo in _list)
{
- if (heroInfo.isAttrActive)
+ if (heroInfo.isActive)
continue;
if (!fullStarHeroIDList.Contains(heroInfo.heroId))
diff --git a/Main/System/ItemTip/ItemTipUtility.cs b/Main/System/ItemTip/ItemTipUtility.cs
index df122a7..5ed511a 100644
--- a/Main/System/ItemTip/ItemTipUtility.cs
+++ b/Main/System/ItemTip/ItemTipUtility.cs
@@ -33,19 +33,9 @@
public BaseInfo baseInfo;
public BaseProperty baseProperty;
- public BaseProperty petMountBaseProperty;
- public SpiritWeaponProperty spiritWeaponProperty;
- public ShenProperty shenProperty;
- public LegendProperty legendProperty;
public SkillInfo skillInfo;
- public SuitInfo suitInfo;
- public StarInfo starInfo;
- public StrengthenProperty strengthenProperty;
- public GemInfo gemInfo;
- public TrainProperty trainProperty;
- public List<ItemOperateType> operates;
- public WingRefineMaterials refineMaterials;
public GetWay getWay;
+ public bool showAll;
}
public struct BaseInfo
@@ -341,7 +331,8 @@
}
}
- public static void Show(string guid, bool operatable = true)
+ // showAll 榛樿姝e父鍏ㄩ儴鏄剧ず锛屽懡鏍肩偣濂楄鐗规畩涓嶆樉绀虹墿鍝佷俊鎭�
+ public static void Show(string guid, bool _showAll = true)
{
var item = PackManager.Instance.GetItemByGuid(guid);
if (item == null)
@@ -368,10 +359,14 @@
}
break;
case TipType.Mingge:
- mainTipData = new TipData() { guid = guid };
+ mainTipData = new TipData()
+ {
+ guid = guid,
+ showAll = _showAll
+ };
break;
default:
- mainTipData = CreateItemData(guid, operatable);
+ mainTipData = CreateItemData(guid);
break;
}
@@ -699,7 +694,7 @@
// };
// }
- static TipData CreateItemData(string guid, bool operatable)
+ static TipData CreateItemData(string guid)
{
var item = PackManager.Instance.GetItemByGuid(guid);
if (item == null)
diff --git a/Main/System/Mingge/MinggeEquipCell.cs b/Main/System/Mingge/MinggeEquipCell.cs
index bec1b09..788e485 100644
--- a/Main/System/Mingge/MinggeEquipCell.cs
+++ b/Main/System/Mingge/MinggeEquipCell.cs
@@ -38,7 +38,7 @@
iconImage.SetActive(true);
int itemID = item.config.ID;
iconImage.SetItemSprite(itemID);
- if (packIndex <= 4 && skillImage != null)
+ if (equipIndex <= 4 && skillImage != null)
{
skillImage.SetActive(true);
var skillID = EquipModel.Instance.GetEquipSkillID(item);
diff --git a/Main/System/Mingge/MinggeEquipChangeCell.cs b/Main/System/Mingge/MinggeEquipChangeCell.cs
index 7875af7..9fa88de 100644
--- a/Main/System/Mingge/MinggeEquipChangeCell.cs
+++ b/Main/System/Mingge/MinggeEquipChangeCell.cs
@@ -157,7 +157,9 @@
var hasCnt = dict.ContainsKey(skillID) ? dict[skillID].Count : 0;
var oldSkillID = isNewEquip && oldEquip != null ? EquipModel.Instance.GetEquipSkillID(oldEquip) : 0;
var showCnt = isNewEquip ? (oldSkillID == skillID ? hasCnt : hasCnt + 1) : hasCnt;
- skillDesc.text = SkillConfig.Get(skillID).Description + " " + Language.Get("HeroFates11", showCnt, MinggeManager.Instance.maxSuiteSkillCount);
+
+ skillDesc.text = Language.Get("L1039", Language.Get($"MinggeSkillType_{skillID}")) +
+ SkillConfig.Get(skillID + showCnt - 1).Description + " " + Language.Get("HeroFates11", showCnt, MinggeManager.Instance.maxSuiteSkillCount);
}
}
diff --git a/Main/System/Mingge/MinggeSmallTipWin.cs b/Main/System/Mingge/MinggeSmallTipWin.cs
index 235c25b..da9b090 100644
--- a/Main/System/Mingge/MinggeSmallTipWin.cs
+++ b/Main/System/Mingge/MinggeSmallTipWin.cs
@@ -14,6 +14,7 @@
[SerializeField] List<TextEx> fightAttrValues;
[SerializeField] TextEx[] skillDesces;
+ [SerializeField] Transform topObj;
protected override void OnPreOpen()
{
@@ -49,6 +50,9 @@
DelayCloseWindow().Forget();
return;
}
+
+ topObj.SetActive(ItemTipUtility.mainTipData.showAll);
+
var equip = PackManager.Instance.GetItemByGuid(guid);
itemCell.Display(equip.guid);
@@ -100,7 +104,8 @@
skillDesces[i].SetActive(true);
skillDesces[i].colorType = i == hasCnt - 1 ? TextColType.lightYellow : TextColType.NavyGray;
var showCnt = Math.Min(hasCnt, i + 1);
- skillDesces[i].text = SkillConfig.Get(skillID).Description + " " + Language.Get("HeroFates11", showCnt, i + 1);
+ skillDesces[i].text = Language.Get("L1039", Language.Get($"MinggeSkillType_{skillID}")) +
+ SkillConfig.Get(skillID + i).Description + " " + Language.Get("HeroFates11", showCnt, i + 1);
}
}
}
diff --git a/Main/System/Mingge/MinggeWin.cs b/Main/System/Mingge/MinggeWin.cs
index 954cddc..9441da9 100644
--- a/Main/System/Mingge/MinggeWin.cs
+++ b/Main/System/Mingge/MinggeWin.cs
@@ -95,7 +95,7 @@
}
}
- void OnFuncPresetUseDataEvent()
+ void OnFuncPresetUseDataEvent(int type)
{
MinggeManager.Instance.RefrehMinggeAttrs();
Display();
@@ -266,7 +266,7 @@
if (index >= keys.Count)
return;
- ItemTipUtility.Show(dict[keys[index]][0]);
+ ItemTipUtility.Show(dict[keys[index]][0], false);
}
void AutoTY()
--
Gitblit v1.8.0