From 64f046bdca87c2dcf8427cd2a2154fe9c4fc9249 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期三, 23 七月 2025 12:03:10 +0800
Subject: [PATCH] 117 【武将】武将系统 - 调整背包事件
---
Main/System/KnapSack/PackManager.cs | 63 ++-----
Main/Utility/EnumHelper.cs | 6
Main/Config/ConfigManager.cs | 131 ++++++++++++++++
Main/System/HeroUI/HeroBaseWin.cs | 10
Main/System/HappyXB/HappyXBModel.cs | 4
Main/System/HeroUI/HeroUIManager.cs.meta | 11 +
Main/System/KnapSack/Logic/ItemLogicUtility.cs | 18 --
Main/System/PhantasmPavilion/PhantasmPavilionModel.cs | 4
Main/Utility/UIHelper.cs | 45 +++--
Main/System/KnapSack/VirtualPackManager.cs | 22 --
Main/System/Hero/HeroInfo.Properties.cs | 21 +
Main/System/Hero/HeroManager.cs | 22 --
Main/Config/PartialConfigs/PlayerPropertyConfig.cs | 2
Main/System/KnapSack/Logic/SinglePack.cs | 2
Main/Main.cs | 1
Main/System/HeroUI/HeroListWin.cs | 37 ++++
Main/System/HeroUI/HeroUIManager.cs | 40 +++++
17 files changed, 292 insertions(+), 147 deletions(-)
diff --git a/Main/Config/ConfigManager.cs b/Main/Config/ConfigManager.cs
index 3a81196..5731362 100644
--- a/Main/Config/ConfigManager.cs
+++ b/Main/Config/ConfigManager.cs
@@ -38,9 +38,52 @@
// 鍔犺浇閰嶇疆鏂囦欢
HashSet<Type> configTypes = new HashSet<Type>() {
+ typeof(ChatBubbleBoxConfig),
+ typeof(CTGConfig),
+ typeof(DailyLivenessRewardConfig),
+ typeof(DailyQuestConfig),
+ typeof(DailyQuestOpenTimeConfig),
+ typeof(DienstgradConfig),
+ typeof(DirtyNameConfig),
typeof(DirtyWordConfig),
+ typeof(EffectConfig),
typeof(EquipGSParamConfig),
- typeof(TitleStarUpConfig)
+ typeof(EquipPlaceMapConfig),
+ typeof(FamilyEmblemConfig),
+ typeof(FrameAnimationConfig),
+ typeof(FuncConfigConfig),
+ typeof(FuncOpenLVConfig),
+ typeof(FunctionTeamSetConfig),
+ typeof(GetItemWaysConfig),
+ typeof(GmCmdConfig),
+ typeof(HeroAwakeConfig),
+ typeof(HeroConfig),
+ typeof(HeroQualityAwakeConfig),
+ typeof(HeroQualityBreakConfig),
+ typeof(HeroQualityConfig),
+ typeof(HeroSkinConfig),
+ typeof(ItemConfig),
+ typeof(KickOutReasonConfig),
+ typeof(MainChapterConfig),
+ typeof(MainLevelConfig),
+ typeof(NPCConfig),
+ typeof(NPCLineupConfig),
+ typeof(OrderInfoConfig),
+ typeof(PlayerFaceConfig),
+ typeof(PlayerLVConfig),
+ typeof(PlayerPropertyConfig),
+ typeof(priorbundleConfig),
+ typeof(RealmConfig),
+ typeof(RealmLVUPTaskConfig),
+ typeof(RuleConfig),
+ typeof(SkillConfig),
+ typeof(TaskConfig),
+ typeof(TitleStarUpConfig),
+ typeof(TreasureCntAwardConfig),
+ typeof(TreasureItemLibConfig),
+ typeof(TreasureSetConfig),
+ typeof(TreeLVConfig),
+ typeof(XBGetItemConfig)
};
#if UNITY_EDITOR
@@ -190,12 +233,98 @@
public override void Release()
{
+ // 娓呯┖ ChatBubbleBoxConfig 瀛楀吀
+ ClearConfigDictionary<ChatBubbleBoxConfig>();
+ // 娓呯┖ CTGConfig 瀛楀吀
+ ClearConfigDictionary<CTGConfig>();
+ // 娓呯┖ DailyLivenessRewardConfig 瀛楀吀
+ ClearConfigDictionary<DailyLivenessRewardConfig>();
+ // 娓呯┖ DailyQuestConfig 瀛楀吀
+ ClearConfigDictionary<DailyQuestConfig>();
+ // 娓呯┖ DailyQuestOpenTimeConfig 瀛楀吀
+ ClearConfigDictionary<DailyQuestOpenTimeConfig>();
+ // 娓呯┖ DienstgradConfig 瀛楀吀
+ ClearConfigDictionary<DienstgradConfig>();
+ // 娓呯┖ DirtyNameConfig 瀛楀吀
+ ClearConfigDictionary<DirtyNameConfig>();
// 娓呯┖ DirtyWordConfig 瀛楀吀
ClearConfigDictionary<DirtyWordConfig>();
+ // 娓呯┖ EffectConfig 瀛楀吀
+ ClearConfigDictionary<EffectConfig>();
// 娓呯┖ EquipGSParamConfig 瀛楀吀
ClearConfigDictionary<EquipGSParamConfig>();
+ // 娓呯┖ EquipPlaceMapConfig 瀛楀吀
+ ClearConfigDictionary<EquipPlaceMapConfig>();
+ // 娓呯┖ FamilyEmblemConfig 瀛楀吀
+ ClearConfigDictionary<FamilyEmblemConfig>();
+ // 娓呯┖ FrameAnimationConfig 瀛楀吀
+ ClearConfigDictionary<FrameAnimationConfig>();
+ // 娓呯┖ FuncConfigConfig 瀛楀吀
+ ClearConfigDictionary<FuncConfigConfig>();
+ // 娓呯┖ FuncOpenLVConfig 瀛楀吀
+ ClearConfigDictionary<FuncOpenLVConfig>();
+ // 娓呯┖ FunctionTeamSetConfig 瀛楀吀
+ ClearConfigDictionary<FunctionTeamSetConfig>();
+ // 娓呯┖ GetItemWaysConfig 瀛楀吀
+ ClearConfigDictionary<GetItemWaysConfig>();
+ // 娓呯┖ GmCmdConfig 瀛楀吀
+ ClearConfigDictionary<GmCmdConfig>();
+ // 娓呯┖ HeroAwakeConfig 瀛楀吀
+ ClearConfigDictionary<HeroAwakeConfig>();
+ // 娓呯┖ HeroConfig 瀛楀吀
+ ClearConfigDictionary<HeroConfig>();
+ // 娓呯┖ HeroQualityAwakeConfig 瀛楀吀
+ ClearConfigDictionary<HeroQualityAwakeConfig>();
+ // 娓呯┖ HeroQualityBreakConfig 瀛楀吀
+ ClearConfigDictionary<HeroQualityBreakConfig>();
+ // 娓呯┖ HeroQualityConfig 瀛楀吀
+ ClearConfigDictionary<HeroQualityConfig>();
+ // 娓呯┖ HeroSkinConfig 瀛楀吀
+ ClearConfigDictionary<HeroSkinConfig>();
+ // 娓呯┖ ItemConfig 瀛楀吀
+ ClearConfigDictionary<ItemConfig>();
+ // 娓呯┖ KickOutReasonConfig 瀛楀吀
+ ClearConfigDictionary<KickOutReasonConfig>();
+ // 娓呯┖ MainChapterConfig 瀛楀吀
+ ClearConfigDictionary<MainChapterConfig>();
+ // 娓呯┖ MainLevelConfig 瀛楀吀
+ ClearConfigDictionary<MainLevelConfig>();
+ // 娓呯┖ NPCConfig 瀛楀吀
+ ClearConfigDictionary<NPCConfig>();
+ // 娓呯┖ NPCLineupConfig 瀛楀吀
+ ClearConfigDictionary<NPCLineupConfig>();
+ // 娓呯┖ OrderInfoConfig 瀛楀吀
+ ClearConfigDictionary<OrderInfoConfig>();
+ // 娓呯┖ PlayerFaceConfig 瀛楀吀
+ ClearConfigDictionary<PlayerFaceConfig>();
+ // 娓呯┖ PlayerLVConfig 瀛楀吀
+ ClearConfigDictionary<PlayerLVConfig>();
+ // 娓呯┖ PlayerPropertyConfig 瀛楀吀
+ ClearConfigDictionary<PlayerPropertyConfig>();
+ // 娓呯┖ priorbundleConfig 瀛楀吀
+ ClearConfigDictionary<priorbundleConfig>();
+ // 娓呯┖ RealmConfig 瀛楀吀
+ ClearConfigDictionary<RealmConfig>();
+ // 娓呯┖ RealmLVUPTaskConfig 瀛楀吀
+ ClearConfigDictionary<RealmLVUPTaskConfig>();
+ // 娓呯┖ RuleConfig 瀛楀吀
+ ClearConfigDictionary<RuleConfig>();
+ // 娓呯┖ SkillConfig 瀛楀吀
+ ClearConfigDictionary<SkillConfig>();
+ // 娓呯┖ TaskConfig 瀛楀吀
+ ClearConfigDictionary<TaskConfig>();
// 娓呯┖ TitleStarUpConfig 瀛楀吀
ClearConfigDictionary<TitleStarUpConfig>();
+ // 娓呯┖ TreasureCntAwardConfig 瀛楀吀
+ ClearConfigDictionary<TreasureCntAwardConfig>();
+ // 娓呯┖ TreasureItemLibConfig 瀛楀吀
+ ClearConfigDictionary<TreasureItemLibConfig>();
+ // 娓呯┖ TreasureSetConfig 瀛楀吀
+ ClearConfigDictionary<TreasureSetConfig>();
+ // 娓呯┖ TreeLVConfig 瀛楀吀
+ ClearConfigDictionary<TreeLVConfig>();
+ // 娓呯┖ XBGetItemConfig 瀛楀吀
+ ClearConfigDictionary<XBGetItemConfig>();
}
#if UNITY_EDITOR
diff --git a/Main/Config/PartialConfigs/PlayerPropertyConfig.cs b/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
index 4ea1bcb..722d71e 100644
--- a/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
+++ b/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
@@ -8,6 +8,8 @@
private static Dictionary<int, List<PlayerPropertyConfig>> m_PropCfgs = new Dictionary<int, List<PlayerPropertyConfig>>();
private static Dictionary<int, List<int>> outputDict = new Dictionary<int, List<int>>();
+ public static int[] baseAttrs = { 6, 7, 8 }; //鏀婚槻琛�
+
protected override void OnConfigParseCompleted()
{
List<PlayerPropertyConfig> list = null;
diff --git a/Main/Main.cs b/Main/Main.cs
index 8399ec0..e9763c0 100644
--- a/Main/Main.cs
+++ b/Main/Main.cs
@@ -70,6 +70,7 @@
managers.Add(OfficialRankManager.Instance);
managers.Add(RankModel.Instance);
managers.Add(PlayerMainDate.Instance);
+ managers.Add(HeroUIManager.Instance);
foreach (var manager in managers)
{
diff --git a/Main/System/HappyXB/HappyXBModel.cs b/Main/System/HappyXB/HappyXBModel.cs
index 5237198..9635842 100644
--- a/Main/System/HappyXB/HappyXBModel.cs
+++ b/Main/System/HappyXB/HappyXBModel.cs
@@ -92,7 +92,7 @@
{
PlayerDatas.Instance.playerDataRefreshEvent -= RefreshStoreScore;
FuncOpen.Instance.OnFuncStateChangeEvent -= UpdateFuncState;
- PackManager.Instance.refreshItemCountEvent -= RefreshXBTool;
+ PackManager.Instance.RefreshItemEvent -= RefreshXBTool;
isXBCoolTime = false;
XBNotifyParms.Clear();
xbTypeInfoDict.Clear();
@@ -108,7 +108,7 @@
USETOOLXBKey = StringUtility.Contact(playerId, "UseToolXB");
XBWarehouseRedPoint();
PlayerDatas.Instance.playerDataRefreshEvent += RefreshStoreScore;
- PackManager.Instance.refreshItemCountEvent += RefreshXBTool;
+ PackManager.Instance.RefreshItemEvent += RefreshXBTool;
FuncOpen.Instance.OnFuncStateChangeEvent += UpdateFuncState;
}
diff --git a/Main/System/Hero/HeroInfo.Properties.cs b/Main/System/Hero/HeroInfo.Properties.cs
index 645338b..cba6718 100644
--- a/Main/System/Hero/HeroInfo.Properties.cs
+++ b/Main/System/Hero/HeroInfo.Properties.cs
@@ -88,11 +88,11 @@
//璁$畻涓汉/鑱屼笟/绉嶆棌鍏绘垚灞炴�у姞鎴�
public void CalculateProperties()
{
-// 姝﹀皢鍗曚綋灞炴�э紝鏍规嵁缁ф壙姣斾緥锛屼粠鍏ㄤ綋灞炴�х户鎵垮緱鍒�
-// 渚嬪锛氭灏嗘敾鍑诲姏=
-// [锛堣澶囧熀纭�鍥哄畾鍊�+鍏跺畠妯″潡鐨勫浐瀹氬�硷級* 锛�1+鍒濆鍔犳垚%+姝﹀皢鍗囩骇鍔犳垚%+姝﹀皢绐佺牬鍔犳垚%+姝﹀皢鍚炲櫖鏄熺骇鍔犳垚%+鍥鹃壌鍔犳垚%锛塢
-// *
-// [ 缁ф壙姣斾緥*锛�1+缇佺粖鍔犳垚%+娼滆兘鍔犳垚%+澶╄祴鍔犳垚%+瑙夐啋鏁堟灉鍔犳垚%锛塢
+ // 姝﹀皢鍗曚綋灞炴�э紝鏍规嵁缁ф壙姣斾緥锛屼粠鍏ㄤ綋灞炴�х户鎵垮緱鍒�
+ // 渚嬪锛氭灏嗘敾鍑诲姏=
+ // [锛堣澶囧熀纭�鍥哄畾鍊�+鍏跺畠妯″潡鐨勫浐瀹氬�硷級* 锛�1+鍒濆鍔犳垚%+姝﹀皢鍗囩骇鍔犳垚%+姝﹀皢绐佺牬鍔犳垚%+姝﹀皢鍚炲櫖鏄熺骇鍔犳垚%+鍥鹃壌鍔犳垚%锛塢
+ // *
+ // [ 缁ф壙姣斾緥*锛�1+缇佺粖鍔犳垚%+娼滆兘鍔犳垚%+澶╄祴鍔犳垚%+瑙夐啋鏁堟灉鍔犳垚%锛塢
hp = GetProperties(HeroAttrType.hp);
attack = GetProperties(HeroAttrType.attack);
defense = GetProperties(HeroAttrType.defense);
@@ -112,9 +112,9 @@
protected int GetProperties(HeroAttrType attrType)
{
- return GetStableProperties(attrType)
+ return GetStableProperties(attrType)
* GetCultivationPercent(attrType)
- * GetInheritRate(attrType)
+ * GetInheritRate(attrType)
* GetInfluenceByInheritPercent(attrType);
}
@@ -170,4 +170,11 @@
counterAttackResist +
recoverResist;
}
+
+
+ //涓婇樀灞炴��:鏀婚槻琛�
+ public int GetGoBattleAddPer()
+ {
+ return qualityConfig.InitAddPer + qualityConfig.LVAddPer * heroLevel + qualityConfig.BreakLVAddPer * breakLevel + qualityConfig.StarAddPer * heroStar;
+ }
}
\ No newline at end of file
diff --git a/Main/System/Hero/HeroManager.cs b/Main/System/Hero/HeroManager.cs
index b6b3805..d116aab 100644
--- a/Main/System/Hero/HeroManager.cs
+++ b/Main/System/Hero/HeroManager.cs
@@ -26,7 +26,6 @@
{
base.Init();
- PackManager.Instance.refrechPackEvent += refrechPackEvent;
PackManager.Instance.ChangeItemEvent += ChangeHero;
PackManager.Instance.DeleteItemEvent += DeleteHero;
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent += OnBeforePlayerDataInitialize;
@@ -35,7 +34,6 @@
public override void Release()
{
base.Release();
- PackManager.Instance.refrechPackEvent -= refrechPackEvent;
PackManager.Instance.ChangeItemEvent -= ChangeHero;
PackManager.Instance.DeleteItemEvent -= DeleteHero;
DTC0102_tagCDBPlayer.beforePlayerDataInitializeEvent -= OnBeforePlayerDataInitialize;
@@ -47,13 +45,6 @@
heroInfoDict.Clear();
}
- void refrechPackEvent(PackType packType)
- {
- if (packType == PackType.Hero)
- {
- InitHerosInfo();
- }
- }
// isCreate bool锛歵rue浠h〃鍒涘缓 false 鍒锋柊瑙﹀彂
void ChangeHero(PackType packType, string guid, bool isCreate)
@@ -99,19 +90,6 @@
public List<HeroInfo> GetHeroList()
{
return heroInfoDict.Values.ToList();
- }
-
-
- void InitHerosInfo()
- {
- heroInfoDict.Clear();
- SinglePack heroPack = PackManager.Instance.GetSinglePack(PackType.Hero);
- Dictionary<int, ItemModel> heroes = heroPack.GetAllItems();
-
- foreach (ItemModel hero in heroes.Values)
- {
- ChangeHero(hero.packType, hero.guid, true);
- }
}
public List<HeroInfo> GetPowerfulHeroList()
diff --git a/Main/System/HeroUI/HeroBaseWin.cs b/Main/System/HeroUI/HeroBaseWin.cs
index 630301f..3efbd11 100644
--- a/Main/System/HeroUI/HeroBaseWin.cs
+++ b/Main/System/HeroUI/HeroBaseWin.cs
@@ -4,13 +4,14 @@
using UnityEngine.UI;
/// <summary>
-/// 姝﹀皢鍒楄〃
+/// 姝﹀皢鍩虹鐣岄潰
/// </summary>
public class HeroBaseWin : FunctionsBaseWin
{
[SerializeField] List<Image> funcSelectImgList;
[SerializeField] List<Image> funcUnSelectImgList;
+ [SerializeField] List<Text> titleNameList;
/// </summary>
protected override void InitComponent()
@@ -44,12 +45,14 @@
{
funcSelectImgList[i].SetActive(true);
funcUnSelectImgList[i].SetActive(false);
+ titleNameList[i].color = UIHelper.GetUIColor(TextColType.titleSelectColor);
}
else
{
funcSelectImgList[i].SetActive(false);
funcUnSelectImgList[i].SetActive(true);
+ titleNameList[i].color = UIHelper.GetUIColor(TextColType.titleUnSelectColor);
}
}
@@ -63,10 +66,11 @@
switch (functionOrder)
{
case 0:
- // 鎵撳紑涓婚〉鐣岄潰
currentSubUI = UIManager.Instance.OpenWindow<HeroListWin>();
break;
-
+ case 1:
+ //currentSubUI = UIManager.Instance.OpenWindow<HeroCollectionsWin>();
+ break;
default:
Debug.LogWarning("鏈煡鐨勬爣绛剧储寮�: " + functionOrder);
break;
diff --git a/Main/System/HeroUI/HeroListWin.cs b/Main/System/HeroUI/HeroListWin.cs
index 8e797ce..5f7eb94 100644
--- a/Main/System/HeroUI/HeroListWin.cs
+++ b/Main/System/HeroUI/HeroListWin.cs
@@ -31,26 +31,48 @@
/// </summary>
protected override void InitComponent()
{
-
+ heroPackBtn.onClick.AddListener(() =>
+ {
+ HeroUIManager.Instance.QueryUnLockHeroPack();
+ });
}
protected override void OnPreOpen()
{
heroListScroller.OnRefreshCell += OnRefreshCell;
+ PackManager.Instance.RefreshItemEvent += RefreshPakCount;
HeroManager.Instance.SortHeroList();
CreateScroller();
+ Refresh();
}
protected override void OnPreClose()
{
heroListScroller.OnRefreshCell -= OnRefreshCell;
+ PackManager.Instance.RefreshItemEvent -= RefreshPakCount;
}
public override void Refresh()
{
+ SinglePack singlePack = PackManager.Instance.GetSinglePack(PackType.Item);
+ if (singlePack == null || singlePack.GetAllItems().Count <= 0)
+ {
+ heroListEmpty.SetActive(true);
+ heroListScroller.SetActive(false);
+ }
+ else
+ {
+ heroListEmpty.SetActive(false);
+ heroListScroller.SetActive(true);
+ }
+ //涓婇樀灞炴��
+ for (int i = 0; i < attrOnList.Count; i++)
+ {
+ attrOnList[i].text = PlayerPropertyConfig.GetFullDescription(new Int2 (PlayerPropertyConfig.baseAttrs[i], 1 ));
+ }
}
void OnRefreshCell(ScrollerDataType type, CellView cell)
@@ -65,13 +87,24 @@
for (int i = 0; i < HeroManager.Instance.heroSortList.Count; i++)
{
if (i % 4 == 0)
- {
+ {
heroListScroller.AddCell(ScrollerDataType.Header, i);
}
}
heroListScroller.Restart();
}
+ void RefreshPakCount(PackType type, int index, int itemID)
+ {
+ SinglePack singlePack = PackManager.Instance.GetSinglePack(PackType.Item);
+ if (singlePack == null)
+ return;
+ int count = singlePack.GetAllItems().Count;
+
+ heroPackText.text = UIHelper.AppendColor(count > singlePack.unlockedGridCount ? TextColType.Red : TextColType.NavyBrown,
+ string.Format("{0}/{1}", count, singlePack.unlockedGridCount));
+
+ }
}
\ No newline at end of file
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
new file mode 100644
index 0000000..dd3f8e2
--- /dev/null
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -0,0 +1,40 @@
+锘縰sing System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Text;
+
+using UnityEngine;
+
+public class HeroUIManager : GameSystemManager<HeroUIManager>
+{
+
+
+ public void OnBeforePlayerDataInitialize()
+ {
+
+ }
+
+ public void OnPlayerLoginOk()
+ {
+ }
+
+ public override void Init()
+ {
+
+ }
+
+ public override void Release()
+ {
+
+ }
+
+ void ParseConfig()
+ {
+ }
+
+
+ public void QueryUnLockHeroPack()
+ {
+ //瑙i攣鏇村鐨勬灏嗚儗鍖�
+ }
+}
diff --git a/Main/System/HeroUI/HeroUIManager.cs.meta b/Main/System/HeroUI/HeroUIManager.cs.meta
new file mode 100644
index 0000000..31f11d5
--- /dev/null
+++ b/Main/System/HeroUI/HeroUIManager.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9fea3ff7a48170a49bf7449f19ccea8e
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/System/KnapSack/Logic/ItemLogicUtility.cs b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
index 0513ad9..ac55fb5 100644
--- a/Main/System/KnapSack/Logic/ItemLogicUtility.cs
+++ b/Main/System/KnapSack/Logic/ItemLogicUtility.cs
@@ -475,25 +475,7 @@
// }
}
- public event Action<PackType, string> PickItemEvent; //鎹¤捣鐨勭墿鍝�
- //鐢ㄤ簬杩囨护閬撳叿椋樺叆琛ㄧ幇 鍦ㄤ笉鎯冲嚭鐜扮墿鍝侀鍔ㄧ殑鐣岄潰 寮�鍚晫闈㈢殑鏃跺�欒缃畉rue 锛屽叧闂晫闈㈣缃甪alse
- public bool hidePickItem = false;
- public void RefreshPickItem(PackType type, string itemIDStr)
- {
- if (hidePickItem)
- return;
-
- if (!DTC0403_tagPlayerLoginLoadOK.finishedLogin) return;
-
- //淇敼鍚庝紶鐨勬槸鐗╁搧id瀛楃涓�
- if (type != PackType.Item && type != PackType.DogzItem && type != PackType.GatherSoul && type != PackType.RunePack && type != PackType.default1) return;
-
- if (PickItemEvent != null)
- {
- PickItemEvent(type, itemIDStr);
- }
- }
Dictionary<int, ItemModel> RealmBetterDict = new Dictionary<int, ItemModel>();
// public Dictionary<int, ItemModel> CheckBetterEquipByRealm()
diff --git a/Main/System/KnapSack/Logic/SinglePack.cs b/Main/System/KnapSack/Logic/SinglePack.cs
index ab4d294..c597917 100644
--- a/Main/System/KnapSack/Logic/SinglePack.cs
+++ b/Main/System/KnapSack/Logic/SinglePack.cs
@@ -6,7 +6,7 @@
public class SinglePack
{
public readonly PackType type;
- public int unlockedGridCount { get; private set; }
+ public int unlockedGridCount { get; private set; } //宸插紑鍚儗鍖呮牸瀛愭暟
private Dictionary<int, ItemModel> items = new Dictionary<int, ItemModel>(); //key 鐗╁搧浣嶇疆绱㈠紩
private Dictionary<int, List<int>> itemIDs = new Dictionary<int, List<int>>(); //key 鐗╁搧ID锛氱墿鍝佷綅缃储寮�
public SinglePack(PackType type)
diff --git a/Main/System/KnapSack/PackManager.cs b/Main/System/KnapSack/PackManager.cs
index 8651002..3aff3c2 100644
--- a/Main/System/KnapSack/PackManager.cs
+++ b/Main/System/KnapSack/PackManager.cs
@@ -161,12 +161,17 @@
}
public event Action<PackType> refrechPackEvent; //鍒锋柊鏁翠釜鑳屽寘鏁版嵁
- public event Action<PackType, string, bool> ChangeItemEvent; //鐗╁搧鍒锋柊锛屽彲鑳芥壒閲忓垱寤烘敞鎰忔晥鐜�; bool锛歵rue浠h〃鍒涘缓 false 鍒锋柊
- public event Action<PackType, string> DeleteItemEvent; //鍒犻櫎鐗╁搧锛屽彲鑳芥壒閲忓垹闄ゆ敞鎰忔晥鐜�
- public event Action<PackType, int, int> refreshItemCountEvent; // 鎱庣敤浼氬崱锛堝崟涓級鏈�鏂扮墿鍝佹暟閲忓埛鏂�(鏃х殑寮冪敤)鍦ㄥ緱鍒版柊鐗╁搧銆佺墿鍝佹暟閲忕殑鏀瑰彉锛屾竻鐞嗚鐗╁搧鏃跺潎浼氳Е鍙� int 浣嶇疆绱㈠紩 int鐗╁搧id
- public event Action<PackType> gridRefreshEvent; //鑳屽寘绌烘牸鍒锋柊
- public event Action<PackType, int, int> itemCntAddEvent; //鐗╁搧鏁伴噺澧炲姞 int 浣嶇疆绱㈠紩 int鐗╁搧id
- public event Action<PackType, int, int> itemCntReduceEvent; //鐗╁搧鏁伴噺鍑忓皯鐨勬敼鍙� int 浣嶇疆绱㈠紩 int鐗╁搧id
+
+ //鐗╁搧锛堝垱寤猴級鍒锋柊锛屽彲鑳芥壒閲忓垱寤烘敞鎰忔晥鐜�; bool锛歵rue浠h〃鍒涘缓 false 鍒锋柊; 娉ㄦ剰0707鐗╁搧鏁伴噺鍒锋柊涓嶅寘鍚湪姝や簨浠�
+ public event Action<PackType, string, bool> ChangeItemEvent; // 鑳屽寘绫诲瀷锛孏UID锛屾槸鍚﹀垱寤�
+
+ //鍒犻櫎鐗╁搧锛屽彲鑳芥壒閲忓垹闄ゆ敞鎰忔晥鐜�
+ public event Action<PackType, string> DeleteItemEvent; // 鑳屽寘绫诲瀷锛孏UID
+
+ // 鍗曠墿鍝佸埛鏂� 鍦ㄥ緱鍒版柊鐗╁搧銆佺墿鍝佹暟閲忕殑鏀瑰彉锛屾竻鐞嗚鐗╁搧鏃跺潎浼氳Е鍙� ; 浣�0725鏁翠釜鑳屽寘鍒锋柊涓嶈Е鍙戯紝濡傛灉鏈夐渶瑕佸崟鐙暟閲忓埛鏂颁簨浠跺彟澶栧鐞�
+ // 瑙﹀彂姣旇緝棰戠箒锛岀晫闈娇鐢ㄦ椂鍙互鍋氫釜姹囨�诲悗寤惰繜鍒锋柊
+ public event Action<PackType, int, int> RefreshItemEvent; //鑳屽寘绫诲瀷锛屼綅缃储寮曪紝鐗╁搧id
+ public event Action<PackType> gridRefreshEvent; //鑳屽寘鍙敤鏍煎瓙鏁板埛鏂�
public event Action<int, int> useItemSuccessEvent; //鐗╁搧浣跨敤鎴愬姛 int 浣嶇疆绱㈠紩 int鐗╁搧id
public event Action<int> refreshItemDayUseCountEvent; //鍒锋柊鐗╁搧姣忔棩浣跨敤鏁伴噺
@@ -196,7 +201,7 @@
{
var itemInfo = new ItemInfo(packInfo.ItemInfo[i]);
var item = playerPackDict[packType].UpdateItem(itemInfo);
- AddItemGUIDDict(item, false);
+ AddItemGUIDDict(item, true);
if (isPlayBetterEquipEffect)
{
@@ -240,15 +245,11 @@
var item = playerPackDict[type].UpdateItem(itemInfo);
AddItemGUIDDict(item, showNewItem);
- if (refreshItemCountEvent != null)
+ if (RefreshItemEvent != null)
{
- refreshItemCountEvent(type, itemInfo.index, itemInfo.itemId);
+ RefreshItemEvent(type, itemInfo.index, itemInfo.itemId);
}
- if (itemCntAddEvent != null)
- {
- itemCntAddEvent(type, itemInfo.index, itemInfo.itemId);
- }
// if (type == PackType.Equip)
// {
@@ -297,32 +298,12 @@
ItemModel itemModel = singlePack.GetItemByIndex(refresh.ItemIndex);
if (itemModel != null)
{
- bool isAddItemCount = false;
- if (refresh.ItemCount > itemModel.count)
- {
- isAddItemCount = true;
- }
+
itemModel.RefreshCount((int)refresh.ItemCount);
- if (isAddItemCount)
+ if (RefreshItemEvent != null)
{
- if (itemCntAddEvent != null)
- {
- itemCntAddEvent(type, itemModel.gridIndex, itemModel.itemId);
- }
- ItemLogicUtility.Instance.RefreshPickItem(type, itemModel.itemId.ToString());
- }
- else
- {
- if (itemCntReduceEvent != null)
- {
- itemCntReduceEvent(type, itemModel.gridIndex, itemModel.itemId);
- }
- }
-
- if (refreshItemCountEvent != null)
- {
- refreshItemCountEvent(type, itemModel.gridIndex, itemModel.itemId);
+ RefreshItemEvent(type, itemModel.gridIndex, itemModel.itemId);
}
}
@@ -348,8 +329,6 @@
DeleteItemDictByGUID(type, guid);
}
}
-
-
}
public void RemoveItem(H0709_tagClearItem clearItem)
@@ -375,15 +354,11 @@
DeleteItemDictByGUID(type, itemModel.guid);
singlePack.RemoveItem(clearItem.ItemIndex);
- if (refreshItemCountEvent != null)
+ if (RefreshItemEvent != null)
{
- refreshItemCountEvent(type, clearItem.ItemIndex, itemId);
+ RefreshItemEvent(type, clearItem.ItemIndex, itemId);
}
- if (itemCntReduceEvent != null)
- {
- itemCntReduceEvent(type, clearItem.ItemIndex, itemId);
- }
}
UpdatePackRedpoint(type);
diff --git a/Main/System/KnapSack/VirtualPackManager.cs b/Main/System/KnapSack/VirtualPackManager.cs
index a88250e..623bfb6 100644
--- a/Main/System/KnapSack/VirtualPackManager.cs
+++ b/Main/System/KnapSack/VirtualPackManager.cs
@@ -219,32 +219,11 @@
public void UpdateAutoItemCountRefresh(HA206_tagMCAutoItemCountRefresh netPack)
{
- ShowRewardWin(netPack);//vNetData涓璉temCount浼犵殑鏄鐗囨�绘暟锛岄渶瑕佸湪noPackItemCountDict鍐欏叆鏁版嵁涔嬪墠璁$畻宸��
for (int i = 0; i < netPack.Count; i++)
{
noPackItemCountDict[(int)netPack.ItemCountList[i].ItemID] = (int)netPack.ItemCountList[i].ItemCount;
}
OnNoPackItemCountRefresh?.Invoke();
- }
-
- void ShowRewardWin(HA206_tagMCAutoItemCountRefresh vNetData)
- {
- getA206Count += 1;
- if (ItemLogicUtility.Instance.hidePickItem)
- return;
- // if (ModelCenter.Instance.GetModel<GatheringSoulModel>().isOpenXBWin)
- // return;
- if (getA206Count <= 1 && !isFrist)
- return;
-
- for (int i = 0; i < vNetData.ItemCountList.Length; i++)
- {
- int itemID = (int)vNetData.ItemCountList[i].ItemID;
- int itemCount = (int)vNetData.ItemCountList[i].ItemCount;
- if (noPackItemCountDict.ContainsKey(itemID) && noPackItemCountDict[itemID] > itemCount)
- return;
- ItemLogicUtility.Instance.RefreshPickItem(PackType.Item, itemID.ToString());
- }
}
@@ -292,7 +271,6 @@
}
item.ParsePackItem(items[i].ItemPlace, items[i].ItemData);
- ItemLogicUtility.Instance.RefreshPickItem(packType, item.id.ToString());
}
}
diff --git a/Main/System/PhantasmPavilion/PhantasmPavilionModel.cs b/Main/System/PhantasmPavilion/PhantasmPavilionModel.cs
index f181461..7b8a461 100644
--- a/Main/System/PhantasmPavilion/PhantasmPavilionModel.cs
+++ b/Main/System/PhantasmPavilion/PhantasmPavilionModel.cs
@@ -79,7 +79,7 @@
public override void Init()
{
PlayerDatas.Instance.playerDataRefreshEvent += OnPlayerDataRefreshEvent;
- PackManager.Instance.refreshItemCountEvent += OnRefreshItemCountEvent;
+ PackManager.Instance.RefreshItemEvent += OnRefreshItemCountEvent;
GlobalTimeEvent.Instance.secondEvent += CheckRedPoint;
InitHandler();
InitTable();
@@ -89,7 +89,7 @@
public override void Release()
{
PlayerDatas.Instance.playerDataRefreshEvent -= OnPlayerDataRefreshEvent;
- PackManager.Instance.refreshItemCountEvent -= OnRefreshItemCountEvent;
+ PackManager.Instance.RefreshItemEvent -= OnRefreshItemCountEvent;
GlobalTimeEvent.Instance.fiveSecondEvent -= CheckRedPoint;
}
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index 5370a2b..767adfe 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -1082,9 +1082,9 @@
{
None = 0,
White = 1,
- Blue = 2,
- Purple = 3,
- Orange = 4,
+ titleSelectColor = 2,
+ titleUnSelectColor = 3,
+
Red = 5,
Pink = 6,
/// <summary>
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index 2ed1ccc..b3bdcd3 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -644,12 +644,10 @@
case TextColType.None:
case TextColType.White:
return bright ? s_BrightWhiteColor : s_DarkWhiteColor; // s_BrightWhiteColor 鏄寒搴曠伆鑹�
- case TextColType.Blue:
- return bright ? s_BrightBlueColor : s_DarkBlueColor;
- case TextColType.Purple:
- return bright ? s_BrightPurpleColor : s_DarkPurpleColor;
- case TextColType.Orange:
- return bright ? s_BrightOrangeColor : s_DarkOrangeColor;
+ case TextColType.titleSelectColor:
+ return new Color32(114, 157, 228, 255);
+ case TextColType.titleUnSelectColor:
+ return new Color32(127, 65, 57, 255);
case TextColType.Red:
return bright ? s_BrightRedColor : s_DarkRedColor;
case TextColType.Pink:
@@ -784,12 +782,10 @@
case TextColType.None:
case TextColType.White:
return StringUtility.Contact("<color=#", bright ? "686868" : "f7f7f7", ">", msg, "</color>");
- case TextColType.Blue:
- return StringUtility.Contact("<color=#", bright ? "006be3" : "31cefb", ">", msg, "</color>");
- case TextColType.Purple:
- return StringUtility.Contact("<color=#", bright ? "da48d5" : "ec4bf6", ">", msg, "</color>");
- case TextColType.Orange:
- return StringUtility.Contact("<color=#", bright ? "ff6701" : "f8983b", ">", msg, "</color>");
+ case TextColType.titleSelectColor:
+ return StringUtility.Contact("<color=#7F4139>", msg, "</color>");
+ case TextColType.titleUnSelectColor:
+ return StringUtility.Contact("<color=#6E5C60>", msg, "</color>");
case TextColType.Red:
return StringUtility.Contact("<color=#", bright ? "ea261e" : "ea261e", ">", msg, "</color>");
case TextColType.Pink:
@@ -873,28 +869,37 @@
{
switch (itemColor)
{
+
case 0:
+ return AppendColor(TextColType.Gray, msg, bright);
case 1:
return AppendColor(TextColType.White, msg, bright);
case 2:
- return AppendColor(TextColType.Blue, msg, bright);
+ return AppendColor(TextColType.itemjingliang, msg, bright);
case 3:
- return AppendColor(TextColType.Purple, msg, bright);
+ return AppendColor(TextColType.itemxiyou, msg, bright);
case 4:
- return AppendColor(TextColType.Orange, msg, bright);
+ return AppendColor(TextColType.itemshishi, msg, bright);
case 5:
- return AppendColor(TextColType.Red, msg, bright);
+ return AppendColor(TextColType.itemchuanqi, msg, bright);
case 6:
+ return AppendColor(TextColType.itemshenhua, msg, bright);
case 7:
+ return AppendColor(TextColType.itemwuxia, msg, bright);
case 8:
- return AppendColor(TextColType.Pink, msg, bright);
+ return AppendColor(TextColType.itemanjin, msg, bright);
case 9:
- return AppendColor(TextColType.Green, msg, bright);
+ return AppendColor(TextColType.itemjueyi, msg, bright);
+ case 10:
+ return AppendColor(TextColType.itemyuanzu, msg, bright);
+ case 11:
+ return AppendColor(TextColType.itembuxiu, msg, bright);
+ case 12:
+ return AppendColor(TextColType.itemyonghen, msg, bright);
+
}
return msg;
}
-
-
public static Color GetPropertyColor(int property)
{
--
Gitblit v1.8.0