From 5a2fad3286d66058f5fdce63a29922f9992019d9 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期四, 12 三月 2026 21:13:29 +0800
Subject: [PATCH] 500 子 【武将】武将时装 / 【武将】武将时装-客户端
---
Main/Config/PartialConfigs/HeroConfig.cs.meta | 2
Main/System/Battle/BattleConst.cs | 6
Main/System/HeroUI/HeroSkinWin.cs.meta | 2
Main/System/HeroUI/HeroCardCell.cs | 2
Main/System/PlayerProfile/RenameWin.cs | 4
Main/System/Battle/BattleField/PriviewBattleField.cs.meta | 2
Main/System/HappyXB/HeroCallResultWin.cs | 2
Main/System/Store/SkinStoreWin.cs | 191 ++++++++
Main/Utility/OperationLogCollect.cs | 106 ----
Main/ResModule/UILoader.cs | 1
Main/System/FirstCharge/HeroShowLHWin.cs | 2
Main/System/HeroUI/HeroUIManager.Collect.cs | 102 ++++
Main/System/HeroUI/HeroTrainBaseWin.cs | 77 +++
Main/Utility/DeviceUtility.cs | 2
Main/System/Battle/BattleFieldFactory.cs | 3
Main/System/Main/HeroFightingCardCell.cs | 2
Main/System/Settlement/BattleSettlementManager.cs | 3
Main/System/Main/HomeWin.cs | 2
Main/System/ItemTip/OwnMoneyCell.cs | 8
Main/System/Battle/PreviewBattleWin.cs | 58 ++
Main/SDK/SDKUtils.cs | 1
Main/System/HeroUI/HeroTrainWin.cs | 45 +
Main/System/Hero/HeroInfo.Skin.cs | 54 ++
Main/System/HeroUI/HeroTrainBaseWin.cs.meta | 2
Main/System/ItemTip/ItemTipWayWin.cs | 4
Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs | 25 -
Main/System/HeroUI/HeroSkinCell.cs.meta | 2
Main/Config/PartialConfigs/HeroConfig.cs | 29 +
Main/System/HeroUI/HeroSkinCell.cs | 44 +
Main/System/HeroFates/HeroFatesIHItem.cs | 2
Main/System/Main/FightPowerManager.cs | 10
Main/System/Battle/PreviewBattleWin.cs.meta | 2
Main/System/HeroUI/HeroBestWin.cs | 2
Main/System/Store/SkinStoreWin.cs.meta | 2
Main/Config/PartialConfigs/HeroSkinAttrConfig.cs | 18
Main/System/UIBase/UIBase.cs | 16
/dev/null | 11
Main/Config/PartialConfigs/HeroSkinAttrConfig.cs.meta | 2
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs | 1
Main/System/HeroUI/HeroSkinWin.cs | 282 ++++++++++++
Main/System/Battle/BattleField/PriviewBattleField.cs | 75 +++
Main/System/Store/StoreBaseWin.cs | 4
Main/System/HeroUI/HeroListWin.cs | 2
Main/System/HeroUI/HeroUIManager.cs | 133 +++++
44 files changed, 1,147 insertions(+), 198 deletions(-)
diff --git a/Main/Config/PartialConfigs/HeroConfig.cs b/Main/Config/PartialConfigs/HeroConfig.cs
new file mode 100644
index 0000000..c690a16
--- /dev/null
+++ b/Main/Config/PartialConfigs/HeroConfig.cs
@@ -0,0 +1,29 @@
+锘縰sing System.Collections.Generic;
+
+public partial class HeroConfig : ConfigBase<int, HeroConfig>
+{
+ static Dictionary<int, int> skinIDToHeroIDDict = new Dictionary<int, int>();
+
+ protected override void OnConfigParseCompleted()
+ {
+ if (PlayerCanUse == 0) return;
+ for (int i = 0; i < SkinIDList.Length; i++)
+ {
+ skinIDToHeroIDDict.Add(SkinIDList[i], HeroID);
+ }
+ }
+
+ public static int GetHeroIDBySkinID(int skinID)
+ {
+ if (skinIDToHeroIDDict.ContainsKey(skinID))
+ {
+ return skinIDToHeroIDDict[skinID];
+ }
+ return 0;
+ }
+}
+
+
+
+
+
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/Config/PartialConfigs/HeroConfig.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/Config/PartialConfigs/HeroConfig.cs.meta
index 6660680..215732b 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/Config/PartialConfigs/HeroConfig.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 602823eff16549445a1e5b1d324a9953
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs b/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs
new file mode 100644
index 0000000..5edee3b
--- /dev/null
+++ b/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs
@@ -0,0 +1,18 @@
+锘縰sing System.Collections.Generic;
+
+public partial class HeroSkinAttrConfig : ConfigBase<int, HeroSkinAttrConfig>
+{
+
+ public static List<int> itemIdList = new List<int>();
+
+ protected override void OnConfigParseCompleted()
+ {
+ itemIdList.Add(NeedItemID);
+ }
+
+}
+
+
+
+
+
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/Config/PartialConfigs/HeroSkinAttrConfig.cs.meta
index 6660680..f364ff8 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/Config/PartialConfigs/HeroSkinAttrConfig.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 09344e2dfddc7e14f97bc871ecb8630a
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs b/Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs
index 19afb39..a363d5a 100644
--- a/Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs
+++ b/Main/Core/GameEngine/Launch/BuiltInAssetCopyTask.cs
@@ -125,31 +125,6 @@
firstLaunch = true;
UnityEngine.Debug.Log("寮�濮嬫嫹璐漛uiltin璧勬簮");
SDKUtils.Instance.CopyAsset(1);
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin_assetbundle");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin_assetbundle.manifest");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/musics");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/musics.manifest");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/prefabs");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/prefabs.manifest");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/sprites");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/sprites.manifest");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/animationclips");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/animationclips.manifest");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/materials");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/materials.manifest");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/scriptableobjects");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/scriptableobjects.manifest");
-
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/font");
- //ynmbxxjUtil.Instance.CopyOneAsset("builtin/font.manifest");
-
- //foreach (var config in ConfigInitiator.builtinConfig)
- //{
- // ynmbxxjUtil.Instance.CopyOneAsset("config/" + config);
- //}
-
- //AssetDeCompressTask.Decompress(ResourcesPath.Instance.ExternalStorePath);
- //LocalSave.SetString("BuiltInAssetCopyCompleted_Android", VersionConfig.Get().version);
}
else
UnityEngine.Debug.Log("builtin璧勬簮宸茬粡鎷疯礉杩囦簡");
diff --git a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
index cd1d7ef..9f8d865 100644
--- a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
+++ b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -196,6 +196,7 @@
catch (Exception ex)
{
Debug.LogError(ex.Message + "\r\n" + ex.StackTrace);
+ OperationLogCollect.Instance.BugReportSys(ex.ToString(), "10001");
Debug.LogErrorFormat("灏佸寘鏄惁涓篘ull:{0};", _package == null);
if (_package != null)
{
diff --git a/Main/ResModule/UILoader.cs b/Main/ResModule/UILoader.cs
index 4cdbc95..1aab864 100644
--- a/Main/ResModule/UILoader.cs
+++ b/Main/ResModule/UILoader.cs
@@ -66,6 +66,7 @@
var iconConfig = IconConfig.Get(_iconKey);
if (iconConfig == null)
{
+ Debug.LogError("icon琛ㄦ湭閰嶇疆 " + _iconKey);
return null;
}
return ResManager.Instance.LoadAsset<Texture2D>(StringUtility.Concat(ResourcesPath.UI_TEXTURE_SUFFIX, "/" + iconConfig.folder), iconConfig.sprite);
diff --git a/Main/SDK/SDKUtils.cs b/Main/SDK/SDKUtils.cs
index 9c94b88..c95de9c 100644
--- a/Main/SDK/SDKUtils.cs
+++ b/Main/SDK/SDKUtils.cs
@@ -132,7 +132,6 @@
public void Init()
{
- ynmbxxjUtil.Instance.Init(); // sdk涓存椂鐢紝鍚庣画鏂板仛SDK鍚庡垹闄�
Device = new DeviceInfo();
string uid = LocalSave.GetString("Device_uniqueID");
//Debug.Log(Math.Abs(System.Environment.TickCount));
diff --git a/Main/SDK/ynmbxxjUtil.cs b/Main/SDK/ynmbxxjUtil.cs
deleted file mode 100644
index 1a8b98d..0000000
--- a/Main/SDK/ynmbxxjUtil.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-锘�// sdk涓存椂鐢紝鍚庣画鏂板仛SDK鍚庡垹闄�
-public class ynmbxxjUtil : SingletonMonobehaviour<ynmbxxjUtil>
-{
- public void HandleMsgWithSDK(string jsonString)
- {
- SDKUtils.Instance.HandleMsgWithSDK(jsonString);
- }
-
- public void Init()
- { }
-}
diff --git a/Main/System/Battle/BattleConst.cs b/Main/System/Battle/BattleConst.cs
index daa8f69..7d5e8f9 100644
--- a/Main/System/Battle/BattleConst.cs
+++ b/Main/System/Battle/BattleConst.cs
@@ -13,6 +13,7 @@
typeof(BoneFieldBattleWin),
typeof(TianziBillboradBattleWin),
typeof(WarlordPavilionBattleWin),
+ typeof(PreviewBattleWin),
};
// 鎴樺満鍚嶇О
@@ -22,6 +23,7 @@
public const string BoneBattleField = "BoneBattleField";
public const string TianziBillboradBattleField = "TianziBillboradBattleField";
public const string WarlordPavilionBattleField = "WarlordPavilionBattleField";
+ public const string PriviewBattleField = "PriviewBattleField"; //棰勮鎴樻枟
public static Dictionary<string, string> battleNameToWinName = new Dictionary<string, string>()
{
@@ -31,8 +33,10 @@
{ BoneBattleField, "BoneFieldBattleWin" },
{ TianziBillboradBattleField, "TianziBillboradBattleWin" },
{ WarlordPavilionBattleField, "WarlordPavilionBattleWin" },
+ { PriviewBattleField, "PreviewBattleWin" },
};
+ // 绱㈠紩閰嶇疆鐢�
public static Dictionary<string, int> FieldNameToIndex = new Dictionary<string, int>()
{
{ StoryBossBattleField, 1 },
@@ -40,6 +44,7 @@
{ BoneBattleField, 3},
{ TianziBillboradBattleField, 4 },
{ WarlordPavilionBattleField, 5 },
+ { PriviewBattleField, 6 },
};
//鍜� CreateBattleField 閲岀殑瀵瑰簲
@@ -51,6 +56,7 @@
{30010, BoneBattleField},
{30020, TianziBillboradBattleField},
{30030, WarlordPavilionBattleField},
+ {30000, PriviewBattleField},
};
//pvp鎴樻枟鐨勬垬鍦猴紝涓嶅湪杩欎釜鍒楄〃鐨勮涓簆ve绫诲瀷鐨勬垬鍦�
diff --git a/Main/System/Battle/BattleField/PriviewBattleField.cs b/Main/System/Battle/BattleField/PriviewBattleField.cs
new file mode 100644
index 0000000..5e496a9
--- /dev/null
+++ b/Main/System/Battle/BattleField/PriviewBattleField.cs
@@ -0,0 +1,75 @@
+using LitJson;
+using System.Collections.Generic;
+using System.Linq;
+
+public class PriviewBattleField : BattleField
+{
+ public PriviewBattleField(string _guid) : base(_guid)
+ {
+
+ }
+
+ public override void Init(int MapID, int FuncLineID, JsonData _extendData,
+ List<TeamBase> _redTeamList, List<TeamBase> _blueTeamList, byte turnMax)
+ {
+ base.Init(MapID, FuncLineID, extendData, _redTeamList, _blueTeamList, turnMax);
+
+ SetBattleMode(BattleMode.Record);
+ }
+
+ public override void AutoSetBattleMode()
+ {
+ SetBattleMode(BattleMode.Record);
+ }
+
+ public override void TurnFightState(int TurnNum, int State,
+ uint FuncLineID, JsonData extendData)
+ {
+ base.TurnFightState(TurnNum, State, FuncLineID, extendData);
+
+ }
+
+ protected override void OnSettlement(JsonData turnFightStateData)
+ {
+ base.OnSettlement(turnFightStateData);
+ }
+
+ public override void WhaleFall()
+ {
+ AutoFightModel.Instance.isPause = false;
+ Destroy();
+ UIManager.Instance.CloseWindow<PreviewBattleWin>();
+ }
+
+ public override void Run()
+ {
+ if (operationAgent == null)
+ {
+ //闃茶寖寮傚父
+ return;
+ }
+ base.Run();
+ }
+
+ public override void DistributeNextPackage()
+ {
+ if (IsBattleFinish)
+ return;
+
+ // 涓嶈璋冪敤base鐨勫嚱鏁�
+ BattleManager.Instance.DistributeNextReportPackage(guid);
+ }
+
+ public override void ShowWindow(HB424_tagSCTurnFightInit vNetData)
+ {
+ PreviewBattleWin fsBattleWin = UIManager.Instance.GetUI<PreviewBattleWin>();// as FullScreenBattleWin;
+ if (null == fsBattleWin)
+ {
+ fsBattleWin = UIManager.Instance.OpenWindow<PreviewBattleWin>();
+ }
+ fsBattleWin.SetBattleField(this);
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/System/Battle/BattleField/PriviewBattleField.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/Battle/BattleField/PriviewBattleField.cs.meta
index 6660680..9a93844 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/System/Battle/BattleField/PriviewBattleField.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 6a4e30cb7df89504c9c8cea06c35eed2
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Battle/BattleFieldFactory.cs b/Main/System/Battle/BattleFieldFactory.cs
index d752c89..6861958 100644
--- a/Main/System/Battle/BattleFieldFactory.cs
+++ b/Main/System/Battle/BattleFieldFactory.cs
@@ -32,6 +32,9 @@
case 30030:
battleField = new WarlordPavilionBattleField(guid);
break;
+ case 30000:
+ battleField = new PriviewBattleField(guid);
+ break;
default:
break;
}
diff --git a/Main/System/Battle/PreviewBattleWin.cs b/Main/System/Battle/PreviewBattleWin.cs
new file mode 100644
index 0000000..fcb8c9d
--- /dev/null
+++ b/Main/System/Battle/PreviewBattleWin.cs
@@ -0,0 +1,58 @@
+锘�
+public class PreviewBattleWin : BaseBattleWin
+{
+ string openUI = "";
+ protected override void OnPreOpen()
+ {
+ base.OnPreOpen();
+ UIManager.Instance.CloseWindow<MainWin>();
+ if (UIManager.Instance.IsOpened<HeroTrainBaseWin>())
+ {
+ UIManager.Instance.CloseWindow<HeroTrainBaseWin>();
+ openUI = "HeroTrainBaseWin";
+ }
+
+ }
+
+ protected override void OnPreClose()
+ {
+ base.OnPreClose();
+ if (!UIManager.Instance.IsOpened<MainWin>())
+ UIManager.Instance.OpenWindow<MainWin>();
+
+ if (openUI == "HeroTrainBaseWin")
+ {
+ UIManager.Instance.OpenWindow<HeroTrainBaseWin>(2);
+ }
+ }
+
+ protected override void OnClose()
+ {
+ base.OnClose();
+
+ TryPass();
+ }
+ protected override void OnClickPass()
+ {
+ battleField.ForceFinish();
+ TryPass();
+ }
+
+
+ private void TryPass()
+ {
+ CloseWindow();
+ BattleSettlementManager.Instance.WinShowOver(BattleConst.PriviewBattleField);
+ }
+ protected override void OnCreateBattleField(string guid, BattleField field)
+ {
+ if (field is PriviewBattleField)
+ {
+ SetBattleField(field);
+ }
+ }
+
+ protected override void RefreshSpecific()
+ {
+ }
+}
\ No newline at end of file
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/System/Battle/PreviewBattleWin.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/Battle/PreviewBattleWin.cs.meta
index 6660680..9c773e5 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/System/Battle/PreviewBattleWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 36a7f5e58370f5341838eb150f483bd1
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/FirstCharge/HeroShowLHWin.cs b/Main/System/FirstCharge/HeroShowLHWin.cs
index 4607237..8c3dd53 100644
--- a/Main/System/FirstCharge/HeroShowLHWin.cs
+++ b/Main/System/FirstCharge/HeroShowLHWin.cs
@@ -56,7 +56,7 @@
roleLHModelTween.Play();
roleLHModelTween2.SetStartState();
roleLHModelTween2.Play();
- bgTexture.SetTexture2D("countryBG" + hero.Country);
+ bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinIDList[0], hero.Country));
HeroUIManager.Instance.PlayerLHSound(hero.SkinIDList[0]);
}
diff --git a/Main/System/HappyXB/HeroCallResultWin.cs b/Main/System/HappyXB/HeroCallResultWin.cs
index f29f37f..50c7e93 100644
--- a/Main/System/HappyXB/HeroCallResultWin.cs
+++ b/Main/System/HappyXB/HeroCallResultWin.cs
@@ -337,7 +337,7 @@
roleLHModelTween2.SetStartState();
roleLHModelTween2.Play();
- bgTexture.SetTexture2D("countryBG" + hero.Country);
+ bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinIDList[0], hero.Country));
}
void RefreshHeroInfo(int heroID)
diff --git a/Main/System/Hero/HeroInfo.Skin.cs b/Main/System/Hero/HeroInfo.Skin.cs
index 3f329fa..8d1b20e 100644
--- a/Main/System/Hero/HeroInfo.Skin.cs
+++ b/Main/System/Hero/HeroInfo.Skin.cs
@@ -1,9 +1,10 @@
+using System;
using System.Collections.Generic;
using UnityEngine;
public partial class HeroInfo
{
- // 78 # 鑻遍泟浣跨敤鐨勭毊鑲ょ储寮�
+ // 78 # 鑻遍泟浣跨敤鐨勭毊鑲ょ储寮� (褰㈣薄)
public int SkinIndex
{
get
@@ -25,12 +26,59 @@
// 鐨偆閰嶇疆
public HeroSkinConfig skinConfig
- {
+ {
get
{
return HeroSkinConfig.Get(SkinID);
}
}
-
+ //灞炴�х敓鏁堢殑鐨偆绱㈠紩
+ public int SkinAttrIndex
+ {
+ get
+ {
+ if (itemHero == null)
+ return 0;
+ return itemHero.GetUseDataFirstValue(82);
+ }
+ }
+
+ public int SkinAttrID
+ {
+ get
+ {
+ return heroConfig.SkinIDList[SkinAttrIndex];
+ }
+ }
+
+
+ public int GetHeroSkinValue(int attrType)
+ {
+ var cfg = HeroSkinAttrConfig.Get(SkinAttrID);
+ if (cfg == null)
+ return 0;
+ var index = Array.IndexOf(cfg.WearAttrIDList, attrType);
+ if (index == -1)
+ return 0;
+ return cfg.WearAttrValueList[index];
+ }
+
+ public int GetHeroSkinPer(int attrType)
+ {
+ var cfg = HeroSkinAttrConfig.Get(SkinAttrID);
+ if (cfg == null)
+ return 0;
+
+ var _type = 0;
+ if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrType))
+ {
+ _type = PlayerPropertyConfig.baseAttr2perDict[attrType];
+ }
+
+ var index = Array.IndexOf(cfg.WearAttrIDList, _type);
+ if (index == -1)
+ return 0;
+ return cfg.WearAttrValueList[index];
+ }
}
\ No newline at end of file
diff --git a/Main/System/HeroFates/HeroFatesIHItem.cs b/Main/System/HeroFates/HeroFatesIHItem.cs
index 0149e13..9cbcbbf 100644
--- a/Main/System/HeroFates/HeroFatesIHItem.cs
+++ b/Main/System/HeroFates/HeroFatesIHItem.cs
@@ -48,7 +48,7 @@
}
HeroInfo heroInfo = nowMaxStarHeroDict[heroId];
HeroUIManager.Instance.selectHeroGuid = heroInfo.itemHero.guid;
- UIManager.Instance.OpenWindow<HeroTrainWin>();
+ UIManager.Instance.OpenWindow<HeroTrainBaseWin>();
}
else
{
diff --git a/Main/System/HeroUI/HeroBestWin.cs b/Main/System/HeroUI/HeroBestWin.cs
index 147b2ce..6cf32b1 100644
--- a/Main/System/HeroUI/HeroBestWin.cs
+++ b/Main/System/HeroUI/HeroBestWin.cs
@@ -133,8 +133,8 @@
public void Display()
{
heroConfig = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID);
- bgTexture.SetTexture2D("countryBG" + heroConfig.Country);
int skinID = heroConfig.SkinIDList[0];
+ bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(skinID, heroConfig.Country));
roleLhModel.Create(skinID, 1, motionName: "", isLh: true);
roleXsModel.Create(skinID, 1);
jobImg.SetSprite(HeroUIManager.Instance.GetJobIconName(heroConfig.Class));
diff --git a/Main/System/HeroUI/HeroCardCell.cs b/Main/System/HeroUI/HeroCardCell.cs
index e59a19f..3e5f1ca 100644
--- a/Main/System/HeroUI/HeroCardCell.cs
+++ b/Main/System/HeroUI/HeroCardCell.cs
@@ -92,7 +92,7 @@
heroCardBtn.AddListener(() =>
{
HeroUIManager.Instance.selectHeroGuid = guid;
- UIManager.Instance.OpenWindow<HeroTrainWin>(funcState == 3 ? 1 : 0);
+ UIManager.Instance.OpenWindow<HeroTrainBaseWin>(funcState == 3 ? 1 : 0);
});
}
}
diff --git a/Main/System/HeroUI/HeroListWin.cs b/Main/System/HeroUI/HeroListWin.cs
index e31e90e..b7b1e8b 100644
--- a/Main/System/HeroUI/HeroListWin.cs
+++ b/Main/System/HeroUI/HeroListWin.cs
@@ -88,7 +88,7 @@
private void OnCloseWindow(UIBase closeUI)
{
//鍏朵粬姝﹀皢鍔熻兘浜х敓鏁版嵁鍙樺寲锛岄渶瑕佸埛鏂版灏嗗垪琛�
- if (closeUI is HeroTrainWin ||
+ if (closeUI is HeroTrainBaseWin ||
closeUI is HeroCallWin ||
closeUI is HeroDeleteWin ||
closeUI is HeroPosWin)
diff --git a/Main/System/HeroUI/HeroSkinCell.cs b/Main/System/HeroUI/HeroSkinCell.cs
new file mode 100644
index 0000000..8a0b450
--- /dev/null
+++ b/Main/System/HeroUI/HeroSkinCell.cs
@@ -0,0 +1,44 @@
+锘縰sing System;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+public class HeroSkinCell : CellView
+{
+ [SerializeField] Image skinImage;
+ [SerializeField] Image skinFrame;
+ [SerializeField] Image skinAttrOnImg;
+ [SerializeField] Image skinRoleOnImg;
+ [SerializeField] Text skinName;
+ [SerializeField] Image unselectImg;
+ [SerializeField] Image ungetImg;
+ [SerializeField] Image fakeRed;
+ [SerializeField] Button cardBtn;
+
+ public void Display(int heroID, int index, bool isHero)
+ {
+ var skinID = HeroConfig.Get(heroID).SkinIDList[index];
+ var skinConfig = HeroSkinConfig.Get(skinID);
+ skinImage.SetOrgSprite(skinConfig.CardPic, "HeroSkinCard");
+ skinFrame.SetSprite("HeroSkinFrame" + skinConfig.Quality);
+ skinName.text = skinConfig.SkinName == "" ? Language.Get("HeroSkin2") : skinConfig.SkinName;
+ var hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid);
+ if (!isHero)
+ {
+ skinAttrOnImg.SetActive(false);
+ skinRoleOnImg.SetActive(false);
+ }
+ else
+ {
+ //鍒嗙┛鎴� 鍜屽舰璞★紝閫変腑鍚屼竴涓椂绌挎埓浼樺厛
+ skinAttrOnImg.SetActive(hero.SkinAttrIndex == index);
+ skinRoleOnImg.SetActive(hero.SkinIndex != hero.SkinAttrIndex && hero.SkinIndex == index);
+ }
+ unselectImg.SetActive(HeroUIManager.Instance.selectSkinIndex != index);
+ ungetImg.SetActive(!HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID));
+ fakeRed.SetActive(HeroUIManager.Instance.HeroSkinStateForRedpoint(skinID) > 0);
+ cardBtn.AddListener(()=>
+ {
+ HeroUIManager.Instance.selectSkinIndex = index;
+ });
+ }
+}
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/System/HeroUI/HeroSkinCell.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/HeroUI/HeroSkinCell.cs.meta
index 6660680..605e2a9 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/System/HeroUI/HeroSkinCell.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 834258ed4bb79f9468a4f083e753317f
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/HeroUI/HeroSkinWin.cs b/Main/System/HeroUI/HeroSkinWin.cs
new file mode 100644
index 0000000..3840239
--- /dev/null
+++ b/Main/System/HeroUI/HeroSkinWin.cs
@@ -0,0 +1,282 @@
+using System;
+using UnityEngine;
+using UnityEngine.UI;
+
+
+/// <summary>
+/// 姝﹀皢鐨偆
+/// </summary>
+public class HeroSkinWin : UIBase
+{
+ [SerializeField] RawImage bgTexture;
+ [SerializeField] Button showFuncBtn; //鍙樉绀虹珛缁樻椂鐐瑰嚮锛屾樉绀哄姛鑳�
+ [SerializeField] Transform funcForm;
+ [SerializeField] UIHeroController roleLhModel; //灞曠ず鑻遍泟绔嬬粯
+ [SerializeField] UIHeroController roleXsModel; //鍍忕礌
+ [SerializeField] Button seeLhBtn; //鏌ョ湅绔嬬粯
+ [SerializeField] Button previewFightBtn; //棰勮鎴樻枟
+ [SerializeField] Button shopBtn; //鍟嗗簵
+ [SerializeField] Button changeClothBtn; //鍙洿鎹㈡湇瑁呭瑙�
+ [SerializeField] Text nameText;
+ [SerializeField] Text skinNameText;
+ // [SerializeField] Text skinLVText;
+ //灞炴�у尯
+ [SerializeField] Text[] onAttrText; //绌挎埓灞炴��
+ [SerializeField] Text[] allAttrText; //鍏ㄤ綋鍔犳垚
+ [SerializeField] Transform attrObj;
+
+ [SerializeField] ScrollerController skinScroller;
+ [SerializeField] Button unlockBtn;
+ [SerializeField] Image itemIcon;
+ [SerializeField] Text itemCountText;
+ [SerializeField] Button putonBtn;
+ [SerializeField] GameObject putonYetObj;
+ [SerializeField] Button showGetObj;
+ [SerializeField] GameObject showNormalObj;
+
+
+ HeroConfig heroConfig;
+ int heroID;
+ int skinID;
+ public HeroInfo hero;
+
+ protected override void InitComponent()
+ {
+ showFuncBtn.AddListener(() =>
+ {
+ funcForm.SetActive(true);
+ if (hero != null)
+ {
+ UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 1;
+ }
+ });
+ seeLhBtn.AddListener(() =>
+ {
+ funcForm.SetActive(false);
+ if (hero != null)
+ {
+ UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 0;
+ }
+ });
+ previewFightBtn.AddListener(() =>
+ {
+ var config = HeroConfig.Get(heroID);
+ int index = Array.IndexOf(config.SkinIDList, skinID);
+ BattleManager.Instance.SendTurnFight(30000, valueList: new uint[] { (uint)heroID, (uint)index });
+ });
+ shopBtn.AddListener(() =>
+ {
+ UIManager.Instance.OpenWindow<StoreBaseWin>(1);
+ });
+ unlockBtn.AddListener(() =>
+ {
+ UnLockSkin();
+ });
+ putonBtn.AddListener(() =>
+ {
+ if (hero == null)
+ {
+ return;
+ }
+ HeroUIManager.Instance.SendSkinOP(heroID, skinID, 4, hero.itemHero.gridIndex);
+ });
+
+ showGetObj.AddListener(() =>
+ {
+ showGetObj.SetActive(false);
+ showNormalObj.SetActive(true);
+ });
+ }
+
+ int activeSkinID;
+ protected override void OnPreOpen()
+ {
+ activeSkinID = 0;
+ skinScroller.OnRefreshCell += OnRefreshCell;
+ if (functionOrder == 0)
+ {
+ //浠h〃浠庡煿鍏荤晫闈㈡墦寮�
+ hero = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid);
+ heroConfig = hero.heroConfig;
+ HeroUIManager.Instance.selectSkinIndex = hero.SkinIndex;
+ }
+ else
+ {
+ //浠庡浘閴寸晫闈㈡墦寮�
+ heroConfig = HeroConfig.Get(HeroUIManager.Instance.selectForPreviewHeroID);
+ HeroUIManager.Instance.selectSkinIndex = 0;
+ }
+ heroID = heroConfig.HeroID;
+
+ HeroUIManager.Instance.OnSkinIndexChanged += OnSkinIndexChanged;
+ HeroUIManager.Instance.OnHeroCollectEvent += OnHeroCollectEvent;
+ PackManager.Instance.RefreshItemEvent += OnRefreshItemEvent;
+
+ showGetObj.SetActive(false);
+ showNormalObj.SetActive(true);
+
+ Display();
+ CreateScroller();
+ }
+
+ protected override void OnPreClose()
+ {
+ hero = null;
+ skinScroller.OnRefreshCell -= OnRefreshCell;
+ HeroUIManager.Instance.OnSkinIndexChanged -= OnSkinIndexChanged;
+ HeroUIManager.Instance.OnHeroCollectEvent -= OnHeroCollectEvent;
+ PackManager.Instance.RefreshItemEvent -= OnRefreshItemEvent;
+ }
+
+ public void Display()
+ {
+ skinID = heroConfig.SkinIDList[HeroUIManager.Instance.selectSkinIndex];
+ bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(skinID, heroConfig.Country));
+ roleLhModel.Create(skinID, 1, motionName: "", isLh: true);
+ roleXsModel.Create(skinID, 1);
+ HeroUIManager.Instance.PlayerLHSound(skinID);
+ nameText.text = heroConfig.Name;
+ skinNameText.text = HeroSkinConfig.Get(skinID).SkinName;
+ RefreshAttr();
+ ShowBtns();
+ }
+
+
+
+ void RefreshAttr()
+ {
+ var cfg = HeroSkinAttrConfig.Get(skinID);
+ if (cfg == null)
+ {
+ attrObj.SetActive(false);
+ return;
+ }
+ attrObj.SetActive(true);
+ string format = "{0}" + UIHelper.AppendColor(TextColType.Green, "+{1}", false);
+ for (int i = 0; i < onAttrText.Length; i++)
+ {
+ if (i < cfg.WearAttrIDList.Length)
+ {
+ onAttrText[i].text = PlayerPropertyConfig.GetFullDescription(cfg.WearAttrIDList[i], cfg.WearAttrValueList[i], format);
+ }
+ else
+ {
+ onAttrText[i].text = "";
+ }
+ }
+
+ for (int i = 0; i < allAttrText.Length; i++)
+ {
+ if (i < cfg.RoleAttrIDList.Length)
+ {
+ allAttrText[i].text = PlayerPropertyConfig.GetFullDescription(cfg.RoleAttrIDList[i], cfg.RoleAttrValueList[i], format);
+ }
+ else
+ {
+ allAttrText[i].text = "";
+ }
+ }
+
+ }
+
+ void CreateScroller()
+ {
+ skinScroller.Refresh();
+ for (int i = 0; i < heroConfig.SkinIDList.Length; i++)
+ {
+ skinScroller.AddCell(ScrollerDataType.Header, i);
+ }
+ skinScroller.Restart();
+ if (HeroUIManager.Instance.selectSkinIndex > 2)
+ {
+ skinScroller.JumpIndex(HeroUIManager.Instance.selectSkinIndex - 1);
+ }
+ }
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as HeroSkinCell;
+ _cell.Display(heroID, cell.index, hero != null);
+ }
+
+ void OnSkinIndexChanged()
+ {
+ Display();
+ skinScroller.m_Scorller.RefreshActiveCellViews();
+ }
+
+ void OnHeroCollectEvent()
+ {
+ if (activeSkinID == skinID && HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID))
+ {
+ showGetObj.SetActive(true);
+ showNormalObj.SetActive(false);
+ Display();
+ skinScroller.m_Scorller.RefreshActiveCellViews();
+ activeSkinID = 0;
+ return;
+ }
+ }
+
+ void OnRefreshItemEvent(PackType type, int index, int itemID)
+ {
+ if (type == PackType.Hero)
+ {
+ ShowBtns();
+ skinScroller.m_Scorller.RefreshActiveCellViews();
+ }
+ }
+
+ void UnLockSkin()
+ {
+ var cfg = HeroSkinAttrConfig.Get(skinID);
+ if (cfg == null)
+ {
+ return;
+ }
+ if (!ItemLogicUtility.CheckItemCount(PackType.Item, cfg.NeedItemID, 1, 2))
+ {
+ return;
+ }
+ activeSkinID = skinID;
+ HeroUIManager.Instance.SendSkinOP(heroID, skinID, 1);
+ }
+
+ void ShowBtns()
+ {
+ if (hero == null)
+ {
+ putonBtn.SetActive(false);
+ putonYetObj.SetActive(false);
+ shopBtn.SetActive(false);
+ changeClothBtn.SetActive(false);
+ }
+
+ if (!HeroUIManager.Instance.IsHeroSkinActive(heroID, skinID))
+ {
+ var cfg = HeroSkinAttrConfig.Get(skinID);
+ if (cfg == null)
+ {
+ unlockBtn.SetActive(false);
+ }
+ else
+ {
+ unlockBtn.SetActive(true);
+ int itemID = cfg.NeedItemID;
+ itemIcon.SetItemSprite(itemID);
+ itemCountText.text = UIHelper.ShowUseItem(PackType.Item, itemID, 1, bright:false);
+ }
+ putonBtn.SetActive(false);
+ putonYetObj.SetActive(false);
+ return;
+ }
+ unlockBtn.SetActive(false);
+
+ if (hero == null) return;
+
+ putonBtn.SetActive(hero.SkinAttrID != skinID);
+ putonYetObj.SetActive(hero.SkinAttrID == skinID);
+
+
+ }
+}
\ No newline at end of file
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/System/HeroUI/HeroSkinWin.cs.meta
similarity index 83%
rename from Main/SDK/ynmbxxjUtil.cs.meta
rename to Main/System/HeroUI/HeroSkinWin.cs.meta
index 6660680..9ecb7a6 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/System/HeroUI/HeroSkinWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 43e5706b2aee0df459589c7482f9d8ad
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/HeroUI/HeroTrainBaseWin.cs b/Main/System/HeroUI/HeroTrainBaseWin.cs
new file mode 100644
index 0000000..4f7f020
--- /dev/null
+++ b/Main/System/HeroUI/HeroTrainBaseWin.cs
@@ -0,0 +1,77 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+// 姝﹀皢鍔熻兘鐣岄潰
+public class HeroTrainBaseWin : OneLevelWin
+{
+
+
+ protected override void OpenSubUIByTabIndex()
+ {
+ ShowSkinBtn();
+ switch (functionOrder)
+ {
+ case 0:
+
+ //鍩瑰吇
+ if (UIManager.Instance.IsOpened<HeroTrainWin>())
+ {
+ UIManager.Instance.CloseWindow<HeroTrainWin>();
+ }
+ currentSubUI = UIManager.Instance.OpenWindow<HeroTrainWin>();
+
+ if (GetSortingOrder() < currentSubUI.GetSortingOrder())
+ {
+ SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
+ }
+ break;
+ case 1:
+ //绐佺牬
+ if (UIManager.Instance.IsOpened<HeroTrainWin>())
+ {
+ UIManager.Instance.CloseWindow<HeroTrainWin>();
+ }
+ currentSubUI = UIManager.Instance.OpenWindow<HeroTrainWin>(1);
+
+ if (GetSortingOrder() < currentSubUI.GetSortingOrder())
+ {
+ SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
+ }
+ break;
+ case 2:
+ //鐨偆
+ currentSubUI = UIManager.Instance.OpenWindow<HeroSkinWin>();
+
+ if (GetSortingOrder() < currentSubUI.GetSortingOrder())
+ {
+ SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
+ }
+ break;
+ default:
+ Debug.LogWarning("鏈煡鐨勬爣绛剧储寮�: " + functionOrder);
+ break;
+ }
+
+ }
+
+ //鏈夌殑姝﹀皢娌℃湁鐨偆
+ public void ShowSkinBtn()
+ {
+ if (string.IsNullOrEmpty(HeroUIManager.Instance.selectHeroGuid))
+ {
+ return;
+ }
+ var config = HeroManager.Instance.GetHero(HeroUIManager.Instance.selectHeroGuid).heroConfig;
+ tabButtons[2].SetActive(config.SkinIDList.Length > 1);
+ }
+
+ void LateUpdate()
+ {
+ if (currentSubUI == null) return;
+ if (GetSortingOrder() < currentSubUI.GetSortingOrder())
+ {
+ SetSortingOrder(currentSubUI.GetSortingOrder() + 1);
+ }
+ }
+}
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/System/HeroUI/HeroTrainBaseWin.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/HeroUI/HeroTrainBaseWin.cs.meta
index 6660680..78cc2ad 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/System/HeroUI/HeroTrainBaseWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 0b3eddca22f174c448766192183bd9a2
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/HeroUI/HeroTrainWin.cs b/Main/System/HeroUI/HeroTrainWin.cs
index a02047c..0efe6d3 100644
--- a/Main/System/HeroUI/HeroTrainWin.cs
+++ b/Main/System/HeroUI/HeroTrainWin.cs
@@ -104,8 +104,7 @@
// 鍖哄垎绐佺牬鍜屽煿鍏绘ā鍧�
[SerializeField] HeroLVBreakCell heroLVBreakCell; //瀵瑰簲鍩瑰吇鐨� allAttrScroll 鍜� attrBtn
- [SerializeField] GroupButtonEx trainMainButton; //鍩瑰吇鍏ュ彛鎸夐挳
- [SerializeField] GroupButtonEx breakMainButton; //绐佺牬鍏ュ彛鎸夐挳
+
//鍏ュ彛浼孩鐐圭敤鍥剧墖浠f浛
[SerializeField] Image trainMainRedImg;
[SerializeField] Image breakMainRedImg;
@@ -124,10 +123,12 @@
showFuncBtn.AddListener(() =>
{
funcForm.SetActive(true);
+ UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 1;
});
seeLhBtn.AddListener(() =>
{
funcForm.SetActive(false);
+ UIManager.Instance.GetUI<HeroTrainBaseWin>().GetCanvasGroup().alpha = 0;
});
closeBtn.AddListener(CloseWindow);
rightBtn.AddListener(() =>
@@ -205,25 +206,24 @@
freezeTipGo.SetActive(!freezeTipGo.activeSelf);
});
- trainMainButton.AddListener(() =>
- {
- functionOrder = 0;
- DisplayTrainOrBreak(hero);
- ForceRefreshLayout();
- });
-
- breakMainButton.AddListener(() =>
- {
- functionOrder = 1;
- DisplayTrainOrBreak(hero);
- unfoldState = false;
- RefreshFoldState();
- });
}
protected override void OnPreOpen()
{
+ if (functionOrder == 0)
+ {
+ DisplayTrainOrBreak(hero);
+ ForceRefreshLayout();
+ }
+ else if (functionOrder == 1)
+ {
+ DisplayTrainOrBreak(hero);
+ unfoldState = false;
+ RefreshFoldState();
+ }
+
+
PackManager.Instance.RefreshItemLockEvent += RefreshItemLockEvent;
HeroManager.Instance.onHeroChangeEvent += RefreshHeroEvent;
UIManager.Instance.OnCloseWindow += OnCloseWindow;
@@ -264,7 +264,7 @@
public void Display()
{
- bgTexture.SetTexture2D("countryBG" + hero.heroConfig.Country);
+ bgTexture.SetTexture2D(HeroUIManager.Instance.GetBGName(hero.SkinID, hero.heroConfig.Country));
roleLhModel.Create(hero.SkinID, 1, motionName: "", isLh: true);
roleXsModel.Create(hero.SkinID, 1);
@@ -393,11 +393,18 @@
{
resultIndex = 0;
}
- guid = HeroUIManager.Instance.heroSortList[resultIndex];
+ guid = HeroUIManager.Instance.selectHeroGuid = HeroUIManager.Instance.heroSortList[resultIndex];
hero = HeroManager.Instance.GetHero(guid);
Display();
HeroUIManager.Instance.PlayerLHSound(hero.SkinID);
+
+ //鎺у埗涓�绾у姛鑳界晫闈㈢殑鐨偆鎸夐挳
+ var ui = UIManager.Instance.GetUI<HeroTrainBaseWin>();
+ if (ui != null)
+ {
+ ui.ShowSkinBtn();
+ }
}
@@ -947,7 +954,6 @@
heroLVBreakCell.SetActive(false);
allAttrScroll.SetActive(true);
attrBtn.SetActive(true);
- trainMainButton.SelectBtn();
}
else
{
@@ -956,7 +962,6 @@
attrBtn.SetActive(false);
heroLVBreakCell.Display(hero);
- breakMainButton.SelectBtn();
}
}
diff --git a/Main/System/HeroUI/HeroUIManager.Collect.cs b/Main/System/HeroUI/HeroUIManager.Collect.cs
index 11caa2a..2345890 100644
--- a/Main/System/HeroUI/HeroUIManager.Collect.cs
+++ b/Main/System/HeroUI/HeroUIManager.Collect.cs
@@ -30,8 +30,9 @@
heroCollectInfoDic[(int)netPack.HeroInfoList[i].HeroID] = netPack.HeroInfoList[i];
}
// allHeroBookPer = GetHeroCollectBookPer();
- OnHeroCollectEvent?.Invoke();
UpdateHeroBookRedpoint();
+ RefreshAllSkinAttr();
+ OnHeroCollectEvent?.Invoke();
}
@@ -143,15 +144,13 @@
}
- //鍒嗕负0鏈幏寰椼��1鍙縺娲汇��2甯歌銆�3绐佺牬鍗囩骇銆�4銆佹槦鍗囩骇銆�5宸叉弧绾�
+ //鍒嗕负0鏈幏寰椼��1鍙縺娲汇��2甯歌銆侊紙3绐佺牬鍗囩骇銆�4銆佹槦鍗囩骇銆�5宸叉弧绾� 搴熷純鍔熻兘淇濈暀閫昏緫锛�
public int GetHeroBookState(int heroID, int quality)
{
int funcState = 0;
HB122_tagSCHeroInfo.tagSCHero colData;
TryGetHeroBookInfo(heroID, out colData);
- // int maxBreakLV = colData.BookBreakLVH; //鍘嗗彶鏈�楂樼獊鐮寸瓑绾�
- // int maxStarLV = colData.BookStarLVH; //鍘嗗彶鏈�楂樻槦绾�
if (colData.BookInitState == 0)
{
@@ -220,5 +219,100 @@
// }
// return config.BookInitAddPer + heroData.BookStarLV * config.BookStarAddPer + heroData.BookBreakLV * config.BookBreakLVAddPer;
// }
+
+ #region 鐨偆
+ //绛栧垝鍘婚櫎浜嗗崌鏄熷姛鑳�
+ //灞炴�у垎绌挎埓(姝﹀皢涓綋)鍜屽叏浣�
+ public Dictionary<int, long> allSkinAttrDic = new Dictionary<int, long>();
+ int m_selectSkinIndex = 0;
+ public event Action OnSkinIndexChanged;
+ public int selectSkinIndex
+ {
+ get { return m_selectSkinIndex; }
+ set
+ {
+ m_selectSkinIndex = value;
+ OnSkinIndexChanged?.Invoke();
+ }
+ }
+
+ //鍏ㄤ綋灞炴��
+ public void RefreshAllSkinAttr()
+ {
+ allSkinAttrDic.Clear();
+ foreach (var config in HeroSkinAttrConfig.GetValues())
+ {
+ var heroID = HeroConfig.GetHeroIDBySkinID(config.SkinID);
+ if (!IsHeroSkinActive(heroID, config.SkinID))
+ {
+ continue;
+ }
+ for (int i = 0; i < config.RoleAttrIDList.Length; i++)
+ {
+ if (!allSkinAttrDic.ContainsKey(config.RoleAttrIDList[i]))
+ {
+ allSkinAttrDic[config.RoleAttrIDList[i]] = 0;
+ }
+ allSkinAttrDic[config.RoleAttrIDList[i]] += config.RoleAttrValueList[i];
+ }
+ }
+
+ }
+
+ public bool IsHeroSkinActive(int heroID, int skinID)
+ {
+ //榛樿鐨偆杩斿洖true
+ if (HeroConfig.Get(heroID).SkinIDList[0] == skinID)
+ {
+ return true;
+ }
+ HB122_tagSCHeroInfo.tagSCHero colData;
+ TryGetHeroBookInfo(heroID, out colData);
+
+ if (colData != null && colData.SkinList != null)
+ {
+ foreach (var data in colData.SkinList)
+ {
+ if (data.SkinID != skinID)
+ {
+ continue;
+ }
+ return data.State == 1;
+ }
+ }
+
+ return false;
+ }
+
+ public long GetSkinAttrValue(int attrID)
+ {
+ allSkinAttrDic.TryGetValue(attrID, out long value);
+ return value;
+ }
+
+ public int GetSkinAttrPer(int attrID)
+ {
+ if (PlayerPropertyConfig.baseAttr2perDict.ContainsKey(attrID))
+ {
+ var pertype = PlayerPropertyConfig.baseAttr2perDict[attrID];
+ allSkinAttrDic.TryGetValue(pertype, out long value);
+ return (int)(value);
+ }
+ return 0;
+ }
+
+ //鎿嶄綔 1-婵�娲伙紱2-閫夋嫨褰㈣薄锛�4-閫夋嫨灞炴��
+ public void SendSkinOP(int heroID, int skinID, int opType, int itemIndex = 0)
+ {
+ var pack = new CB236_tagCSHeroSkinOP();
+ pack.HeroID = (uint)heroID;
+ pack.SkinID = (uint)skinID;
+ pack.OPType = (byte)opType;
+ pack.ItemIndex = (ushort)itemIndex;
+ GameNetSystem.Instance.SendInfo(pack);
+
+ }
+
+ #endregion
}
diff --git a/Main/System/HeroUI/HeroUIManager.cs b/Main/System/HeroUI/HeroUIManager.cs
index 467e440..7487e73 100644
--- a/Main/System/HeroUI/HeroUIManager.cs
+++ b/Main/System/HeroUI/HeroUIManager.cs
@@ -111,6 +111,7 @@
void OnLoginLoadOK()
{
UpdateHeroCardRedpoint();
+ UpdateHeroCardSkinRedpoint();
}
private void OnHeroChangeEvent(HeroInfo hero)
@@ -177,6 +178,17 @@
}
#region 姝﹀皢UI甯哥敤鎺ュ彛
+
+ //鑾峰緱姝﹀皢鑳屾櫙鍥剧墖鍚嶏紝濡傛灉娌℃湁閰嶇疆榛樿鐢ㄩ樀钀ュ浘
+ public string GetBGName(int skinID, int conutry)
+ {
+ var config = HeroSkinConfig.Get(skinID);
+ if (config != null && !string.IsNullOrEmpty(config.BG))
+ {
+ return config.BG;
+ }
+ return "countryBG" + conutry;
+ }
public string GetCountryName(int index)
{
return RichTextMsgReplaceConfig.GetRichReplace("Country", index);
@@ -488,7 +500,7 @@
{
continue;
}
-
+
heroCallSortList.Add(item);
}
}
@@ -573,7 +585,7 @@
}
return 0;
}
-
+
#region 绾㈢偣
@@ -585,6 +597,8 @@
Redpoint heroEatRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 8);
//鏂版爣璇嗙殑绾㈢偣 鎵�鏈夋灏嗙粺涓�涓�
Redpoint newMarkRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 9);
+ //鎵�鏈夋灏嗙殑鐨偆鍔熻兘涓�涓孩鐐�
+ Redpoint skinRedPoint = new Redpoint(MainRedDot.HeroCardRedpoint, MainRedDot.HeroCardRedpoint * 10 + 7);
void InitHeroOnTeamRedpointList()
{
heroOnTeamRedpointList.Clear();
@@ -653,6 +667,26 @@
}
+ //姝﹀皢鍒楄〃鐨勭毊鑲ょ孩鐐癸紝鍥鹃壌鐨偆绾㈢偣鍙﹀鍑芥暟鍒锋柊
+ void UpdateHeroCardSkinRedpoint()
+ {
+ skinRedPoint.state = RedPointState.None;
+ var _list = HeroManager.Instance.GetHeroList();
+ foreach (var hero in _list)
+ {
+ if (!hero.isAttrActive)
+ {
+ continue;
+ }
+
+ if (HeroAllSkinStateForRedpoint(hero.heroId) == 1)
+ {
+ skinRedPoint.state = RedPointState.Simple;
+ break;
+ }
+ }
+ }
+
void InitHerosData()
{
@@ -692,6 +726,12 @@
{
return true;
}
+
+ if (HeroAllSkinStateForRedpoint(heroID, true) == 2)
+ {
+ return true;
+ }
+
return false;
}
@@ -709,6 +749,13 @@
redpoint.state = RedPointState.Simple;
continue;
}
+
+ if (HeroAllSkinStateForRedpoint(heroID, true) == 2)
+ {
+ redpoint.state = RedPointState.Simple;
+ continue;
+ }
+
redpoint.state = RedPointState.None;
}
}
@@ -732,6 +779,12 @@
{
refreshRedPoint = true;
}
+
+ if (HeroSkinAttrConfig.itemIdList.Contains(itemID))
+ {
+ UpdateHeroCardSkinRedpoint();
+ }
+
}
void OnTeamChangeEvent(int teamType)
@@ -741,7 +794,83 @@
refreshRedPoint = true;
}
}
+
+
+ //鍗曟灏嗙孩鐐� 鍙敤浜庣晫闈㈡墦寮�鐨勬椂鍊欑嫭绔嬩娇鐢�
+ public Redpoint trainRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 1);
+ public Redpoint breakRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 2);
+ public Redpoint skinRedpoint = new Redpoint(MainRedDot.HeroCardRedpoint * 100 + 3);
+
+
+ // public void UpdateHeroCardRedpoint()
+ // {
+ // trainRedpoint.state = RedPointState.None;
+ // breakRedpoint.state = RedPointState.None;
+ // skinRedpoint.state = RedPointState.None;
+ // }
+
+ //鎸囧畾鐨偆绾㈢偣鐘舵�� 0-鏃� 1-鏈夋灏嗙孩鐐瑰奖鍝嶆灏嗗垪琛ㄧ孩鐐癸紙鍋囩孩鐐癸級 2-鏃犳灏嗙孩鐐瑰奖鍝嶅浘閴寸晫闈㈢孩鐐�
+ public int HeroSkinStateForRedpoint(int skinID, bool isBook = false)
+ {
+ HeroSkinAttrConfig skinAttrConfig = HeroSkinAttrConfig.Get(skinID);
+ if (skinAttrConfig == null)
+ {
+ return 0;
+ }
+ var heroID = HeroConfig.GetHeroIDBySkinID(skinAttrConfig.SkinID);
+ HB122_tagSCHeroInfo.tagSCHero colData;
+ TryGetHeroBookInfo(heroID, out colData);
+
+ if (colData != null && colData.SkinList != null)
+ {
+ foreach (var data in colData.SkinList)
+ {
+ if (data.State != 0 && data.SkinID == skinAttrConfig.SkinID && data.Star >= skinAttrConfig.StarMax)
+ {
+ //婊℃槦
+ return 0;
+ }
+ }
+ }
+ if (PackManager.Instance.GetItemCountByID(PackType.Item, skinAttrConfig.NeedItemID) == 0)
+ {
+ return 0;
+ }
+ if (!isBook)
+ {
+ //闈炲浘閴磋皟鐢ㄧ殑鏃跺��
+ return 1;
+ }
+ if (HeroManager.Instance.GetHeroByID(heroID) != null)
+ {
+ return 1;
+ }
+ return 2;
+ }
+
+ //鎸囧畾姝﹀皢鐨勬墍鏈夌毊鑲ょ孩鐐圭姸鎬� 0-鏃� 1-鏈夋灏嗙孩鐐瑰奖鍝嶆灏嗗垪琛ㄧ孩鐐癸紙鍋囩孩鐐癸級 2-鏃犳灏嗙孩鐐瑰奖鍝嶅浘閴寸晫闈㈢孩鐐�
+ int HeroAllSkinStateForRedpoint(int heroID, bool isBook = false)
+ {
+ var config = HeroConfig.Get(heroID);
+ for (int i = 0; i < config.SkinIDList.Length; i++)
+ {
+ var state = HeroSkinStateForRedpoint(config.SkinIDList[i], isBook);
+ if (isBook && state == 2)
+ {
+ return state;
+ }
+ else if (!isBook && state == 1)
+ {
+ return state;
+ }
+ }
+ return 0;
+ }
+
+
#endregion
+
+
}
#region 绛夊緟鏈嶅姟绔搷搴�
diff --git a/Main/System/ItemTip/ItemTipWayWin.cs b/Main/System/ItemTip/ItemTipWayWin.cs
index 83e601e..ff5f6ea 100644
--- a/Main/System/ItemTip/ItemTipWayWin.cs
+++ b/Main/System/ItemTip/ItemTipWayWin.cs
@@ -112,11 +112,11 @@
RechargeManager.Instance.selectTabIndex = index;
if (UIManager.Instance.IsOpened<StoreBaseWin>())
{
- UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1);
+ UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2);
}
else
{
- UIManager.Instance.OpenWindow<StoreBaseWin>(1);
+ UIManager.Instance.OpenWindow<StoreBaseWin>(2);
}
break;
case 3:
diff --git a/Main/System/ItemTip/OwnMoneyCell.cs b/Main/System/ItemTip/OwnMoneyCell.cs
index 6b3daa7..d94f028 100644
--- a/Main/System/ItemTip/OwnMoneyCell.cs
+++ b/Main/System/ItemTip/OwnMoneyCell.cs
@@ -27,11 +27,11 @@
RechargeManager.Instance.selectTabIndex = 1;
if (UIManager.Instance.IsOpened<StoreBaseWin>())
{
- UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1);
+ UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2);
}
else
{
- UIManager.Instance.OpenWindow<StoreBaseWin>(1);
+ UIManager.Instance.OpenWindow<StoreBaseWin>(2);
}
}
}
@@ -43,11 +43,11 @@
RechargeManager.Instance.selectTabIndex = 0;
if (UIManager.Instance.IsOpened<StoreBaseWin>())
{
- UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1);
+ UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2);
}
else
{
- UIManager.Instance.OpenWindow<StoreBaseWin>(1);
+ UIManager.Instance.OpenWindow<StoreBaseWin>(2);
}
}
}
diff --git a/Main/System/Main/FightPowerManager.cs b/Main/System/Main/FightPowerManager.cs
index d85302a..52588bc 100644
--- a/Main/System/Main/FightPowerManager.cs
+++ b/Main/System/Main/FightPowerManager.cs
@@ -365,9 +365,10 @@
var heroLVValue = hero.GetHeroLVValue(attrType);
//姝﹀皢鐨偆
- var skinValue = 0;
- var skinPer = 0;
- var heroSkinValue = 0;
+ var skinValue = HeroUIManager.Instance.GetSkinAttrValue(attrType);
+ var skinPer = HeroUIManager.Instance.GetSkinAttrPer(attrType);
+ var heroSkinValue = hero.GetHeroSkinValue(attrType);
+ var heroSkinPer = hero.GetHeroSkinPer(attrType);
double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+skinValue+dingjungeValue+minggeValue)*(1+lineupHaloPer+realmPer+gubaoPer+hjgPer+horsePer+beautyPer+fatesPer+skinPer+cardPer+minggePer)*(inheritPer+fetterPer+starTalentPer+breakLVPer+awakeTalentPer)*(1+dingjungePer)+heroSelfValue+heroLVValue+heroSkinValue;
@@ -411,7 +412,8 @@
var fetterValue = hero.GetFetterAttrValue(attrType);
//姝﹀皢鐨偆
- var heroSkinValue = 0;
+ var heroSkinValue = hero.GetHeroSkinValue(attrType);
+ var heroSkinPer = hero.GetHeroSkinPer(attrType);
double value = (lvValue+equipValue+realmValue+gubaoValue+hjgValue+horseValue+beautyValue+fatesValue+dingjungeValue+minggeValue)+(heroSelfValue+heroSkinValue+lineupHaloValue+starTalentValue+breakLVValue+awakeTalentValue)+fetterValue;
diff --git a/Main/System/Main/HeroFightingCardCell.cs b/Main/System/Main/HeroFightingCardCell.cs
index e5ca285..1a797c7 100644
--- a/Main/System/Main/HeroFightingCardCell.cs
+++ b/Main/System/Main/HeroFightingCardCell.cs
@@ -139,7 +139,7 @@
{
HeroUIManager.Instance.SortHeroList();
HeroUIManager.Instance.selectHeroGuid = guid;
- UIManager.Instance.OpenWindow<HeroTrainWin>();
+ UIManager.Instance.OpenWindow<HeroTrainBaseWin>();
}
void ClickEmpty()
diff --git a/Main/System/Main/HomeWin.cs b/Main/System/Main/HomeWin.cs
index e86eca8..1ffcdf5 100644
--- a/Main/System/Main/HomeWin.cs
+++ b/Main/System/Main/HomeWin.cs
@@ -658,7 +658,7 @@
private void OnCloseWindow(UIBase closeUI)
{
//鍏朵粬姝﹀皢鍔熻兘浜х敓鏁版嵁鍙樺寲锛岄渶瑕佸埛鏂版灏嗗垪琛�
- if (closeUI is HeroTrainWin)
+ if (closeUI is HeroTrainBaseWin)
{
DisplayCard(TeamManager.Instance.GetMainTeamID());
}
diff --git a/Main/System/PlayerProfile/RenameWin.cs b/Main/System/PlayerProfile/RenameWin.cs
index e758684..2f42bf4 100644
--- a/Main/System/PlayerProfile/RenameWin.cs
+++ b/Main/System/PlayerProfile/RenameWin.cs
@@ -35,11 +35,11 @@
RechargeManager.Instance.selectTabIndex = 1;
if (UIManager.Instance.IsOpened<StoreBaseWin>())
{
- UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(1);
+ UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2);
}
else
{
- UIManager.Instance.OpenWindow<StoreBaseWin>(1);
+ UIManager.Instance.OpenWindow<StoreBaseWin>(2);
}
}
});
diff --git a/Main/System/Settlement/BattleSettlementManager.cs b/Main/System/Settlement/BattleSettlementManager.cs
index 29bfb86..35e7a8f 100644
--- a/Main/System/Settlement/BattleSettlementManager.cs
+++ b/Main/System/Settlement/BattleSettlementManager.cs
@@ -100,6 +100,9 @@
UIManager.Instance.OpenWindow<WarlordPavilionFailWin>();
}
break;
+ case BattleConst.PriviewBattleField:
+ UIManager.Instance.CloseWindow<PreviewBattleWin>();
+ break;
default:
if (isWin)
{
diff --git a/Main/System/Store/SkinStoreWin.cs b/Main/System/Store/SkinStoreWin.cs
new file mode 100644
index 0000000..cf09006
--- /dev/null
+++ b/Main/System/Store/SkinStoreWin.cs
@@ -0,0 +1,191 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+public class SkinStoreWin : UIBase
+{
+ [SerializeField] OwnMoneyCell ownMoneyCellWithShop;
+ //鏈夊埛鏂板姛鑳界殑鍟嗗簵
+ [SerializeField] GameObject refreshGo;
+ [SerializeField] Image refreshMoneyIcon;
+ [SerializeField] Text refreshMoneyText;
+ [SerializeField] Button refreshButton;
+
+ [SerializeField] GroupButtonEx normalShopBtn;
+ [SerializeField] GroupButtonEx guildShopBtn;
+ [SerializeField] GroupButtonEx heroShopBtn;
+
+ [SerializeField] ScrollerController scroller;
+
+
+ protected override void InitComponent()
+ {
+ refreshButton.AddListener(RefreshStore);
+ normalShopBtn.AddListener(() => { OnSelectStoreFuncType(1); });
+ guildShopBtn.AddListener(() => { OnSelectStoreFuncType(2); });
+ heroShopBtn.AddListener(() => { OnSelectStoreFuncType(3); });
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ scroller.OnRefreshCell += OnRefreshCell;
+ StoreModel.Instance.RefreshShopEvent += Display;
+ StoreModel.Instance.RefreshBuyShopLimitEvent += Display;
+ GuildManager.Instance.EnterOrQuitGuildEvent += EnterOrQuitGuildEvent;
+
+ Display();
+ }
+
+ protected override void OnPreClose()
+ {
+ scroller.OnRefreshCell -= OnRefreshCell;
+ StoreModel.Instance.RefreshShopEvent -= Display;
+ StoreModel.Instance.RefreshBuyShopLimitEvent -= Display;
+ GuildManager.Instance.EnterOrQuitGuildEvent -= EnterOrQuitGuildEvent;
+ StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal;
+ }
+
+ void Display()
+ {
+ if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Normal)
+ {
+ normalShopBtn.SelectBtn();
+ }
+ else if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Guild)
+ {
+ guildShopBtn.SelectBtn();
+ }
+ else if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Hero)
+ {
+ heroShopBtn.SelectBtn();
+ }
+
+ guildShopBtn.SetColorful(null, PlayerDatas.Instance.fairyData.HasFairy);
+ guildShopBtn.isLock = !PlayerDatas.Instance.fairyData.HasFairy;
+
+ ShowMoney();
+ CreateScroller();
+ }
+
+ void EnterOrQuitGuildEvent(bool isEnter)
+ {
+ if (!isEnter && StoreModel.Instance.selectStoreFuncType == StoreFunc.Guild)
+ {
+ StoreModel.Instance.selectStoreFuncType = StoreFunc.Normal;
+ }
+ Display();
+ }
+
+ void CreateScroller()
+ {
+ if (!StoreModel.Instance.storeTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
+ {
+ return;
+ }
+
+ scroller.Refresh();
+ int jumpIndex = -1;
+ var list = StoreModel.Instance.storeTypeDict[(int)StoreModel.Instance.selectStoreFuncType];
+ for (int i = 0; i < list.Count; i++)
+ {
+ if (i % 3 == 0)
+ {
+ scroller.AddCell(ScrollerDataType.Header, i);
+ }
+ if (jumpIndex == -1 && list[i].shopId == StoreModel.Instance.jumpShopID)
+ {
+ jumpIndex = i / 3;
+ }
+ }
+ scroller.Restart();
+ scroller.lockType = EnhanceLockType.KeepVertical;
+ if (StoreModel.Instance.jumpShopID != 0)
+ {
+ scroller.JumpIndex(jumpIndex);
+ StoreModel.Instance.jumpShopID = 0;
+ }
+ }
+
+
+ void OnRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as StoreLineCell;
+ _cell.Display(cell.index);
+ }
+
+
+ void ShowMoney()
+ {
+ if (!StoreModel.Instance.shopMoneyTypeDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
+ {
+ return;
+ }
+ var moneyType = StoreModel.Instance.shopMoneyTypeDict[(int)StoreModel.Instance.selectStoreFuncType];
+ ownMoneyCellWithShop.moneyType = moneyType;
+ ownMoneyCellWithShop.Display(true);
+
+ if (StoreModel.Instance.selectStoreFuncType == StoreFunc.Hero)
+ {
+ refreshGo.SetActive(true);
+ refreshMoneyIcon.SetIconWithMoneyType(StoreModel.Instance.heroSoulRefreshMoneyType);
+
+ if (StoreModel.Instance.shopRefreshCntDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
+ {
+ if (StoreModel.Instance.shopRefreshCntDict[(int)StoreModel.Instance.selectStoreFuncType] >=
+ StoreModel.Instance.heroSoulRefreshFreeCount)
+ {
+ refreshMoneyText.text = StoreModel.Instance.heroSoulRefreshMoney.ToString();
+ }
+ else
+ {
+ refreshMoneyText.text = Language.Get("L1127");
+ }
+ }
+ else
+ {
+ refreshMoneyText.text = Language.Get("L1127");
+ }
+ }
+ else
+ {
+ refreshGo.SetActive(false);
+ }
+ }
+
+ void RefreshStore()
+ {
+ if (StoreModel.Instance.selectStoreFuncType != StoreFunc.Hero)
+ {
+ return;
+ }
+ var useCnt = 0;
+ if (StoreModel.Instance.shopRefreshCntDict.ContainsKey((int)StoreModel.Instance.selectStoreFuncType))
+ {
+ if (StoreModel.Instance.shopRefreshCntDict[(int)StoreModel.Instance.selectStoreFuncType] >=
+ StoreModel.Instance.heroSoulRefreshFreeCount)
+ {
+ useCnt = StoreModel.Instance.heroSoulRefreshMoney;
+ }
+ }
+
+ if (UIHelper.CheckMoneyCount(StoreModel.Instance.heroSoulRefreshMoneyType, useCnt, 2))
+ {
+ StoreModel.Instance.RefreshStore((int)StoreFunc.Hero);
+ }
+ }
+
+ void OnSelectStoreFuncType(int index)
+ {
+ if (index == 2)
+ {
+ if (!PlayerDatas.Instance.fairyData.HasFairy)
+ {
+ SysNotifyMgr.Instance.ShowTip("NoGuild");
+ return;
+ }
+ }
+ StoreModel.Instance.selectStoreFuncType = (StoreFunc)index;
+ Display();
+ }
+}
diff --git a/Main/SDK/ynmbxxjUtil.cs.meta b/Main/System/Store/SkinStoreWin.cs.meta
similarity index 83%
copy from Main/SDK/ynmbxxjUtil.cs.meta
copy to Main/System/Store/SkinStoreWin.cs.meta
index 6660680..04a3853 100644
--- a/Main/SDK/ynmbxxjUtil.cs.meta
+++ b/Main/System/Store/SkinStoreWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: d69a5f50b06dc814ea13cb20acd59e3a
+guid: 08c36714c5911864e87b2fa0f2d78eeb
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Store/StoreBaseWin.cs b/Main/System/Store/StoreBaseWin.cs
index 732b9e3..31f6f58 100644
--- a/Main/System/Store/StoreBaseWin.cs
+++ b/Main/System/Store/StoreBaseWin.cs
@@ -14,6 +14,10 @@
currentSubUI = UIManager.Instance.OpenWindow<StoreWin>();
break;
case 1:
+ //鏃惰
+ currentSubUI = UIManager.Instance.OpenWindow<SkinStoreWin>();
+ break;
+ case 2:
// 鍏呭�肩晫闈�
currentSubUI = UIManager.Instance.OpenWindow<RechargeWin>();
break;
diff --git a/Main/System/UIBase/UIBase.cs b/Main/System/UIBase/UIBase.cs
index 6d1fddb..0444e74 100644
--- a/Main/System/UIBase/UIBase.cs
+++ b/Main/System/UIBase/UIBase.cs
@@ -128,6 +128,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨処nitComponentInternal鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
try
@@ -137,6 +138,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨処nitComponent鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
// 淇濆瓨鍘熷鍊肩敤浜庡姩鐢�
@@ -307,6 +309,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凮nPreOpen鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
StopCurrentAnimation();
@@ -328,6 +331,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凮nOpen鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
ApplyClickEmptySpaceClose();
@@ -345,6 +349,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凬extFrameAfterOpen鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
});
}
@@ -370,6 +375,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凮nPreClose鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
StopCurrentAnimation();
@@ -391,6 +397,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凮nClose鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
if (closeAnimationType == UIAnimationType.None)
@@ -402,6 +409,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凜ompleteClose鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
}
// 鍚﹀垯鍦ㄥ姩鐢诲畬鎴愬悗绂佺敤娓告垙瀵硅薄锛堝湪PlayCloseAnimation涓鐞嗭級
@@ -486,6 +494,11 @@
public bool IsRaycastLocationValid(Vector2 sp, Camera eventCamera)
{
return raycastTarget;
+ }
+
+ public CanvasGroup GetCanvasGroup()
+ {
+ return canvasGroup;
}
#region 鍔ㄧ敾鏂规硶
@@ -670,6 +683,7 @@
catch (System.Exception e)
{
Debug.LogError($"鎾斁鎵撳紑鍔ㄧ敾鏃跺嚭閿�: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
// 鍑洪敊鏃剁‘淇漊I鍙骞跺彲浜や簰
if (canvasGroup != null)
@@ -793,6 +807,7 @@
catch (Exception e)
{
Debug.LogError($"{uiName}鐣岄潰鐨凜ompleteClose鎶ラ敊: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
}
}
});
@@ -802,6 +817,7 @@
catch (System.Exception e)
{
Debug.LogError($"鎾斁鍏抽棴鍔ㄧ敾鏃跺嚭閿�: {e.StackTrace}");
+ OperationLogCollect.Instance.BugReportSys(e.ToString(), "10002");
// 鍑洪敊鏃剁洿鎺ュ畬鎴愬叧闂�
isAnimating = false;
diff --git a/Main/Utility/DeviceUtility.cs b/Main/Utility/DeviceUtility.cs
index 518f4d6..c84cdc7 100644
--- a/Main/Utility/DeviceUtility.cs
+++ b/Main/Utility/DeviceUtility.cs
@@ -144,7 +144,7 @@
switch (Application.platform)
{
case RuntimePlatform.Android:
- _memory = 0; //TODO YL collect device memory //ynmbxxjUtil.Instance.Device.totalMemory;
+ _memory = 0;
break;
case RuntimePlatform.IPhonePlayer:
_memory = IsLowMemory() ? 1 : 2 * 1024;
diff --git a/Main/Utility/OperationLogCollect.cs b/Main/Utility/OperationLogCollect.cs
index f80ac79..0b105ab 100644
--- a/Main/Utility/OperationLogCollect.cs
+++ b/Main/Utility/OperationLogCollect.cs
@@ -6,108 +6,7 @@
public class OperationLogCollect : Singleton<OperationLogCollect>
-
{
-// const string url = "http://xssgcenter.secondworld.net.cn:11000/event_receiver?";
-
-// public void RecordLauchEvent(int _step)
-// {
-// return;
-// #if !UNITY_EDITOR
-// if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
-// {
-// var tables = new Dictionary<string, string>();
-// tables["OperatorID"] = VersionConfig.Get().appId;
-// tables["RegionName"] = "data";
-// tables["EventID"] = 9001.ToString();
-// tables["ProductID"] = VersionConfig.Get().gameId;
-// tables["Device"] = SystemInfo.deviceName;
-// tables["DeviceFlag"] = ynmbxxjUtil.Instance.Device.uniqueID;
-// tables["IP"] = DeviceUtility.GetIp();
-// tables["DeviceFlag"] = DeviceUtility.GetDeviceUniquenessIdentify();
-// tables["Flag"] = "1001";
-// tables["Time"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
-// tables["Step"] = _step.ToString();
-
-// HttpRequest.Instance.RequestHttpGet(StringUtility.Concat(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
-// }
-// #endif
-// }
-
-// public void RecordEvent(int _step, uint coin = 0)
-// {
-// return;
-// #if !UNITY_EDITOR
-// if (VersionConfig.Get().versionAuthority == VersionAuthority.Release)
-// {
-// var tables = new Dictionary<string, string>();
-// tables["OperatorID"] = VersionConfig.Get().appId;
-// tables["RegionName"] = "data";
-// tables["AccountID"] = ynmbxxjUtil.Instance.FreePlatformInfo == null ? "" : ynmbxxjUtil.Instance.FreePlatformInfo.account;
-// tables["EventID"] = 9001.ToString();
-// tables["ProductID"] = VersionConfig.Get().gameId;
-// tables["Device"] = SystemInfo.deviceName;
-// tables["IP"] = DeviceUtility.GetIp();
-// tables["DeviceFlag"] = ynmbxxjUtil.Instance.Device.uniqueID;
-// tables["Flag"] = VersionConfig.Get().clientPackageFlag;
-// tables["Time"] = System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
-// tables["Step"] = _step.ToString();
-
-// if (coin != 0)
-// {
-// tables["Level"] = coin.ToString();
-// }
-
-// string _content = StringUtility.Concat(url, HttpRequest.HashtablaToString(tables));
-// HttpRequest.Instance.RequestHttpGet(_content, HttpRequest.defaultHttpContentType);
-// }
-// #endif
-// }
-
-// bool recordedDeviceDetail = false;
-// public void RecordDeviceDetails()
-// {
-// return;
-// #if !UNITY_EDITOR
-// if (VersionConfig.Get().versionAuthority != VersionAuthority.Release)
-// {
-// return;
-// }
-
-// if (!recordedDeviceDetail)
-// {
-// var tables = new Dictionary<string, string>();
-// tables["OperatorID"] = VersionConfig.Get().appId;
-// tables["RegionName"] = StringUtility.Concat("s" + ServerListCenter.Instance.currentServer.region_flag);
-// tables["EventID"] = 1102.ToString();
-// tables["ProductID"] = VersionConfig.Get().gameId;
-// tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
-// tables["IP"] = DeviceUtility.GetIp();
-// tables["AccountID"] = ModelCenter.Instance.GetModel<LoginModel>().sdkLoginResult.account;
-// tables["SessionID"] = "";
-
-// var device = new Dictionary<string, string>();
-// device["IMEI"] = DeviceUtility.GetDeviceUniquenessIdentify();
-// device["DeviceFlag"] = ynmbxxjUtil.Instance.Device.uniqueID;
-// #if UNITY_ANDROID
-// device["IMEI2"] = ynmbxxjUtil.Instance.Device.uniqueID;
-// #endif
-// device["Brand"] = DeviceUtility.GetDeviceName();
-// device["MI5"] = DeviceUtility.GetDeviceModel();
-// tables["Device"] = JsonMapper.ToJson(device);
-
-// var runtime = new Dictionary<string, string>();
-// runtime["os_version"] = DeviceUtility.GetDeviceOSLevel();
-// tables["Runtime"] = JsonMapper.ToJson(runtime);
-// tables["Version"] = StringUtility.Concat(VersionConfig.Get().version, "_", VersionConfig.Get().buildIndex);
-
-// HttpRequest.Instance.RequestHttpGet(StringUtility.Concat(url, HttpRequest.HashtablaToString(tables)), HttpRequest.defaultHttpContentType);
-// }
-
-// recordedDeviceDetail = true;
-// #endif
-// }
-
const string bugReportUrl = "http://xssgcenter.secondworld.net.cn:11000/center/eventreport.php?";
@@ -142,7 +41,8 @@
}
- public void BugReportSys( string _content)
+ //10000 鎴樺満鎶ラ敊, 10001 灏佸寘閿欒, 10002 鐣岄潰鎿嶄綔
+ public void BugReportSys(string _content, string sid = "10000")
{
#if !UNITY_EDITOR
try
@@ -150,7 +50,7 @@
var tables = new Dictionary<string, string>();
tables["OperatorID"] = VersionConfig.Get().appId;
tables["RegionName"] = "data";
- tables["RegionID"] = "10000";
+ tables["RegionID"] = sid;
tables["EventID"] = 9002.ToString();
tables["ProductID"] = VersionConfig.Get().gameId;
tables["Time"] = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
--
Gitblit v1.8.0