From e02229f889ece3799768e766b8d2ae5ce97a63ad Mon Sep 17 00:00:00 2001
From: yyl <yyl>
Date: 星期三, 19 十一月 2025 10:02:59 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts
---
Main/Utility/EnumHelper.cs | 1
Main/Config/ConfigManager.cs | 2
Main/System/Main/FightPowerManager.cs | 94 +++---
Main/System/Equip/BlessLVADWin.cs | 50 ++++
Main/System/Equip/BlessLVManager.cs | 64 ++++-
Main/System/Invest/InvestModel.cs | 270 +++++-----------------
Main/System/Redpoint/MainRedDot.cs | 9
/dev/null | 11
Main/System/Recharge/PrivilegeCardWin.cs | 133 +++++++++++
Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB121_tagMCTreeInfo.cs | 3
Main/System/Recharge/PrivilegeCardWin.cs.meta | 2
Main/System/Equip/BlessLVADWin.cs.meta | 2
Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs | 2
Main/System/Equip/BlessLVWin.cs | 13
Main/Core/NetworkPackage/ServerPack/HB1_Role/HB121_tagMCTreeInfo.cs | 14
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs.meta | 2
Main/Config/PartialConfigs/PlayerPropertyConfig.cs | 4
Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs | 23 +
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs | 12 +
Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs.meta | 2
20 files changed, 397 insertions(+), 316 deletions(-)
diff --git a/Main/Config/ConfigManager.cs b/Main/Config/ConfigManager.cs
index fb2b405..24f2c12 100644
--- a/Main/Config/ConfigManager.cs
+++ b/Main/Config/ConfigManager.cs
@@ -58,7 +58,6 @@
typeof(HeroQualityLVConfig),
typeof(HorseClassConfig),
typeof(HorseSkinConfig),
- typeof(InvestConfig),
typeof(ItemCompoundConfig),
typeof(ItemConfig),
typeof(LLMJConfig),
@@ -273,7 +272,6 @@
// 娓呯┖ HorseSkinConfig 瀛楀吀
ClearConfigDictionary<HorseSkinConfig>();
// 娓呯┖ InvestConfig 瀛楀吀
- ClearConfigDictionary<InvestConfig>();
// 娓呯┖ ItemCompoundConfig 瀛楀吀
ClearConfigDictionary<ItemCompoundConfig>();
// 娓呯┖ ItemConfig 瀛楀吀
diff --git a/Main/Config/Configs/InvestConfig.cs b/Main/Config/Configs/InvestConfig.cs
deleted file mode 100644
index 3df8136..0000000
--- a/Main/Config/Configs/InvestConfig.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-锘�//--------------------------------------------------------
-// [Author]: YYL
-// [ Date ]: 2025骞�8鏈�22鏃�
-//--------------------------------------------------------
-
-using System.Collections.Generic;
-using System;
-using UnityEngine;
-using LitJson;
-
-public partial class InvestConfig : ConfigBase<int, InvestConfig>
-{
- static InvestConfig()
- {
- // 璁块棶杩囬潤鎬佹瀯閫犲嚱鏁�
- visit = true;
- }
-
- public int id;
- public int type;
- public int needDay;
- public int needLV;
- public int needNPCID;
- public Dictionary<int, int[][]> award;
- public string info;
-
- public override int LoadKey(string _key)
- {
- int key = GetKey(_key);
- return key;
- }
-
- public override void LoadConfig(string input)
- {
- try {
- string[] tables = input.Split('\t');
- int.TryParse(tables[0],out id);
-
- int.TryParse(tables[1],out type);
-
- int.TryParse(tables[2],out needDay);
-
- int.TryParse(tables[3],out needLV);
-
- int.TryParse(tables[4],out needNPCID);
-
- award = ConfigParse.ParseIntArray2Dict(tables[5]);
-
- info = tables[6];
- }
- catch (Exception exception)
- {
- Debug.LogError(exception);
- }
- }
-}
diff --git a/Main/Config/PartialConfigs/PlayerPropertyConfig.cs b/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
index 2b83244..5a65d14 100644
--- a/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
+++ b/Main/Config/PartialConfigs/PlayerPropertyConfig.cs
@@ -107,12 +107,12 @@
}
//largeNumFormat 澶ф暟鍊兼牸寮忥細0 榛樿鍘熸暟鍊� 1 鎸変竾鎴栬��(K)鏄剧ず 2 鎸�6浣嶆暟浠ヤ笂锛堟墠杞崲澶ф暟鍊硷紝鏍规嵁鎯呭喌鍙粺涓�璋冩暣锛�
- public static string GetValueDescription(int id, long value, int largeNumFormat = 1)
+ public static string GetValueDescription(int id, long value, int largeNumFormat = 2)
{
return GetValueDescriptionEx(id, value, largeNumFormat);
}
- public static string GetValueDescriptionEx(int id, long value, int largeNumFormat = 1)
+ public static string GetValueDescriptionEx(int id, long value, int largeNumFormat = 2)
{
var config = Get(id);
if (config == null)
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs
deleted file mode 100644
index 18c2b36..0000000
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using UnityEngine;
-using System.Collections;
-
-// A3 38 鎶曡祫鐞嗚储淇℃伅 #tagMCInvestInfo
-
-public class DTCA338_tagMCInvestInfo : DtcBasic {
- public override void Done(GameNetPackBasic vNetPack)
- {
- base.Done(vNetPack);
- HA338_tagMCInvestInfo vNetData = vNetPack as HA338_tagMCInvestInfo;
- InvestModel.Instance.UpdateInvestInfo(vNetData);
- }
-}
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta
deleted file mode 100644
index 092f615..0000000
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagMCInvestInfo.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 642095ebf906d974e8bfb5c7d45d7fc8
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs
new file mode 100644
index 0000000..0780d2d
--- /dev/null
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs
@@ -0,0 +1,12 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 38 鎶曡祫淇℃伅 #tagSCInvestInfo
+
+public class DTCA338_tagSCInvestInfo : DtcBasic {
+ public override void Done(GameNetPackBasic vNetPack) {
+ base.Done(vNetPack);
+ HA338_tagSCInvestInfo vNetData = vNetPack as HA338_tagSCInvestInfo;
+ InvestModel.Instance.UpdateInvestInfo(vNetData);
+ }
+}
diff --git a/Main/Config/Configs/InvestConfig.cs.meta b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs.meta
similarity index 83%
rename from Main/Config/Configs/InvestConfig.cs.meta
rename to Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs.meta
index a037ded..98af857 100644
--- a/Main/Config/Configs/InvestConfig.cs.meta
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HA3_Function/DTCA338_tagSCInvestInfo.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: ff3d77591e2aeaa438955b2b6322cfba
+guid: 6691147a9486d0c4fb11244f78333c35
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB121_tagMCTreeInfo.cs b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB121_tagMCTreeInfo.cs
index de37929..f350e13 100644
--- a/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB121_tagMCTreeInfo.cs
+++ b/Main/Core/NetworkPackage/DTCFile/ServerPack/HB1_Role/DTCB121_tagMCTreeInfo.cs
@@ -4,8 +4,7 @@
// B1 21 浠欐爲淇℃伅 #tagMCTreeInfo
public class DTCB121_tagMCTreeInfo : DtcBasic {
- public override void Done(GameNetPackBasic vNetPack)
- {
+ public override void Done(GameNetPackBasic vNetPack) {
base.Done(vNetPack);
HB121_tagMCTreeInfo vNetData = vNetPack as HB121_tagMCTreeInfo;
BlessLVManager.Instance.UpdateBlessLVInfo(vNetData);
diff --git a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
index ffb3fa8..9fd86d4 100644
--- a/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
+++ b/Main/Core/NetworkPackage/DataToCtl/PackageRegedit.cs
@@ -98,7 +98,7 @@
Register(typeof(HB125_tagSCPlayerHeroInfo), typeof(DTCB125_tagSCPlayerHeroInfo));
Register(typeof(HA814_tagMCMakeItemAnswer), typeof(DTCA814_tagMCMakeItemAnswer));
Register(typeof(HB122_tagSCHeroInfo), typeof(DTCB122_tagSCHeroInfo));
- Register(typeof(HA338_tagMCInvestInfo), typeof(DTCA338_tagMCInvestInfo));
+ Register(typeof(HA338_tagSCInvestInfo), typeof(DTCA338_tagSCInvestInfo));
Register(typeof(HB121_tagMCTreeInfo), typeof(DTCB121_tagMCTreeInfo));
Register(typeof(HA720_tagMCCreateRoleAwardState), typeof(DTCA720_tagMCCreateRoleAwardState));
Register(typeof(HB405_tagMCAddExp), typeof(DTCB405_tagMCAddExp));
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs
deleted file mode 100644
index e6b07b8..0000000
--- a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-using UnityEngine;
-using System.Collections;
-
-// A3 38 鎶曡祫鐞嗚储淇℃伅 #tagMCInvestInfo
-
-public class HA338_tagMCInvestInfo : GameNetPackBasic {
- public byte InvestType; // 鎶曡祫绫诲瀷
- public ushort CurDay; // 褰撳墠澶╂暟锛屾姇璧勭涓�澶╀负1
- public byte ValueCount;
- public uint[] RewardValue; //棰嗗璁板綍鍊硷紝鎸夋姇璧勫洖鎶ョ储寮曚綅璁板綍鏄惁宸查鍙�
- public uint[] ProgressValue; //鎶曡祫鐩稿叧鍙鍙栬繘搴﹁褰曞��: 9鐧诲綍鎶曡祫-璁板綍宸茬櫥褰曞ぉ鏁帮紱11Boss鎶曡祫-鎸夊洖鎶ョ储寮曚綅璁板綍鏄惁宸插嚮鏉�璇oss
-
- public HA338_tagMCInvestInfo () {
- _cmd = (ushort)0xA338;
- }
-
- public override void ReadFromBytes (byte[] vBytes) {
- TransBytes (out InvestType, vBytes, NetDataType.BYTE);
- TransBytes (out CurDay, vBytes, NetDataType.WORD);
- TransBytes (out ValueCount, vBytes, NetDataType.BYTE);
- TransBytes (out RewardValue, vBytes, NetDataType.DWORD, ValueCount);
- TransBytes (out ProgressValue, vBytes, NetDataType.DWORD, ValueCount);
- }
-
-}
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta
deleted file mode 100644
index 45a88d7..0000000
--- a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagMCInvestInfo.cs.meta
+++ /dev/null
@@ -1,11 +0,0 @@
-fileFormatVersion: 2
-guid: 9e48c8be42d2313489b38b738ddf52c6
-MonoImporter:
- externalObjects: {}
- serializedVersion: 2
- defaultReferences: []
- executionOrder: 0
- icon: {instanceID: 0}
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs
new file mode 100644
index 0000000..01b619c
--- /dev/null
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs
@@ -0,0 +1,23 @@
+using UnityEngine;
+using System.Collections;
+
+// A3 38 鎶曡祫淇℃伅 #tagSCInvestInfo
+
+public class HA338_tagSCInvestInfo : GameNetPackBasic {
+ public byte InvestType; // 鎶曡祫绫诲瀷
+ public uint InvestBuyTime; // 鎶曡祫璐拱鏃堕棿鎴筹紝姘镐箙鐨勯�氳繃璇ユ椂闂村垽鏂槸鍚︽湁鏁堟垨宸茶繃澶╂暟锛屼换鎰忕被鍨嬪潎鏈夎鍊硷紝杩囨湡娌℃湁閲嶇疆锛屽墠绔嚜宸卞垽鏂�
+ public uint InvestEndTime; // 鎶曡祫鍒版湡鏃堕棿鎴筹紝闈炴案涔呯殑閫氳繃璇ユ椂闂村垽鏂埌鏈熸椂闂达紝鏈夊ぉ鏁伴檺鍒剁殑鎵嶆湁鍊�
+ public byte AwardState; // 浠婃棩鏄惁宸查鍙栧鍔�
+
+ public HA338_tagSCInvestInfo () {
+ _cmd = (ushort)0xA338;
+ }
+
+ public override void ReadFromBytes (byte[] vBytes) {
+ TransBytes (out InvestType, vBytes, NetDataType.BYTE);
+ TransBytes (out InvestBuyTime, vBytes, NetDataType.DWORD);
+ TransBytes (out InvestEndTime, vBytes, NetDataType.DWORD);
+ TransBytes (out AwardState, vBytes, NetDataType.BYTE);
+ }
+
+}
diff --git a/Main/Config/Configs/InvestConfig.cs.meta b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs.meta
similarity index 83%
copy from Main/Config/Configs/InvestConfig.cs.meta
copy to Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs.meta
index a037ded..2a5bb8c 100644
--- a/Main/Config/Configs/InvestConfig.cs.meta
+++ b/Main/Core/NetworkPackage/ServerPack/HA3_Function/HA338_tagSCInvestInfo.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: ff3d77591e2aeaa438955b2b6322cfba
+guid: 6cb173a2eae27ba4f9194108916e9b48
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB121_tagMCTreeInfo.cs b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB121_tagMCTreeInfo.cs
index 89ad806..63ed2a7 100644
--- a/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB121_tagMCTreeInfo.cs
+++ b/Main/Core/NetworkPackage/ServerPack/HB1_Role/HB121_tagMCTreeInfo.cs
@@ -1,14 +1,14 @@
-using UnityEngine;
-using System.Collections;
-
+using UnityEngine;
+using System.Collections;
+
// B1 21 浠欐爲淇℃伅 #tagMCTreeInfo
public class HB121_tagMCTreeInfo : GameNetPackBasic {
public byte TreeLV; // 褰撳墠浠欐爲绛夌骇
public byte LVUPState; // 0-闈炲崌绾т腑锛�1-鍗囩骇涓�
public uint LVUPRemainTime; // 鍗囩骇鍓╀綑鏃堕棿锛岀锛涘綋鍗囩骇涓笖鍊掕鏃朵负0鏃跺彲鍙戦�丅223鎵ц鍗囩骇鍖呰繘琛屽崌绾�
- public byte FreeTimeCnt; // 浠婃棩宸插厤璐瑰噺鏃舵鏁�
- public uint FreeTimeLast; // 涓婃鍏嶈垂鍑忔椂鏃堕棿鎴�
+ public byte Energy; // 褰撳墠绱鍏呰兘娆℃暟
+ public uint EnergyTimeLast; // 涓婃鑾峰緱鍏呰兘娆℃暟鏃堕棿鎴�
public HB121_tagMCTreeInfo () {
_cmd = (ushort)0xB121;
@@ -18,8 +18,8 @@
TransBytes (out TreeLV, vBytes, NetDataType.BYTE);
TransBytes (out LVUPState, vBytes, NetDataType.BYTE);
TransBytes (out LVUPRemainTime, vBytes, NetDataType.DWORD);
- TransBytes (out FreeTimeCnt, vBytes, NetDataType.BYTE);
- TransBytes (out FreeTimeLast, vBytes, NetDataType.DWORD);
+ TransBytes (out Energy, vBytes, NetDataType.BYTE);
+ TransBytes (out EnergyTimeLast, vBytes, NetDataType.DWORD);
}
}
diff --git a/Main/System/Equip/BlessLVADWin.cs b/Main/System/Equip/BlessLVADWin.cs
new file mode 100644
index 0000000..534e71d
--- /dev/null
+++ b/Main/System/Equip/BlessLVADWin.cs
@@ -0,0 +1,50 @@
+锘�
+using System;
+
+using UnityEngine;
+using UnityEngine.UI;
+
+
+public class BlessLVADWin : UIBase
+{
+ [SerializeField] Text moneyText;
+ [SerializeField] Image moneyTypeImg;
+ [SerializeField] Button adBtn;
+ [SerializeField] Button useMoneyBtn;
+
+
+
+
+ protected override void InitComponent()
+ {
+ adBtn.AddListener(OnAD);
+ useMoneyBtn.AddListener(OnUseMoney);
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ moneyText.text = UIHelper.ShowUseMoney(BlessLVManager.Instance.freeEnergyMoneyType, BlessLVManager.Instance.freeEnergyMoney);
+ moneyTypeImg.SetIconWithMoneyType(BlessLVManager.Instance.freeEnergyMoneyType);
+ }
+
+
+ void OnAD()
+ {
+ AdsManager.Instance.SendGetReward(4);
+ CloseWindow();
+ }
+
+ void OnUseMoney()
+ {
+ CloseWindow();
+ if (UIHelper.CheckMoneyCount(BlessLVManager.Instance.freeEnergyMoneyType, BlessLVManager.Instance.freeEnergyMoney, 2))
+ {
+ var pack = new CA504_tagCMPlayerGetReward();
+ pack.RewardType = 82;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+ }
+}
+
+
diff --git a/Main/Config/Configs/InvestConfig.cs.meta b/Main/System/Equip/BlessLVADWin.cs.meta
similarity index 83%
copy from Main/Config/Configs/InvestConfig.cs.meta
copy to Main/System/Equip/BlessLVADWin.cs.meta
index a037ded..0ab3da3 100644
--- a/Main/Config/Configs/InvestConfig.cs.meta
+++ b/Main/System/Equip/BlessLVADWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: ff3d77591e2aeaa438955b2b6322cfba
+guid: 199b4612be93c4e4098abc71de6cdb64
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Equip/BlessLVManager.cs b/Main/System/Equip/BlessLVManager.cs
index d20c137..3b31a00 100644
--- a/Main/System/Equip/BlessLVManager.cs
+++ b/Main/System/Equip/BlessLVManager.cs
@@ -9,17 +9,22 @@
public int m_TreeLV { get; private set; } // 褰撳墠浠欐爲绛夌骇
public int m_LVUPState { get; private set; } // 0-闈炲崌绾т腑锛�1-鍗囩骇涓�
public int m_LVUPRemainTime { get; private set; } // 鍗囩骇鍓╀綑鏃堕棿锛岀锛涘綋鍗囩骇涓笖鍊掕鏃朵负0鏃跺彲鍙戦�丅223鎵ц鍗囩骇鍖呰繘琛屽崌绾�
- public int m_FreeTimeCnt { get; private set; } // 浠婃棩宸插厤璐瑰噺鏃舵鏁�
- public int m_FreeTimeLast { get; private set; } // 涓婃鍏嶈垂鍑忔椂鏃堕棿鎴�
+ public int m_Energy; // 褰撳墠绱鍏呰兘娆℃暟
+ public int m_EnergyTimeLast; // 涓婃鑾峰緱鍏呰兘娆℃暟鏃堕棿鎴�
+
public event Action OnBlessLVUpdateEvent;
int m_LVPackTime; //鏀跺寘鏃堕棿鐢ㄤ簬璁$畻鍓╀綑鏃堕棿m_LVUPRemainTime
public int upgradeTreeMoneyType; //鍗囩骇浠欐爲娑堣�楃殑璐у竵绫诲瀷
public int timeUpTreeItemID; //鍔犻�熶粰鏍戝崌绾х殑閬撳叿ID
public int timeUpTreeItemSubTime; //鍑忓皯浠欐爲鍗囩骇鏃堕棿鐨勯亾鍏峰噺灏戠殑鏃堕棿
- public int dayFreeMaxTimes; //姣忔棩鍏嶈垂鍗囩骇娆℃暟
- public int freeTimeCD; //鍏嶈垂鍑忓皯鏃堕棿鐨勫喎鍗碈D 鍒�
- public int freeSubTime; //鍏嶈垂鍑忓皯鐨勬椂闂� 鍒�
+
+ int freeEnergyMax; //鍏呰兘娆℃暟涓婇檺锛岀壒鏉冮澶栨鏁板湪 InvestPower 閰嶇疆
+ public int freeEnergyCD; //鍏呰兘CD锛屽垎閽燂紝x鍒嗛挓鑾峰緱1涓兘閲�
+ public int freeEnergySubTreeTime; //棰嗗彇鍏呰兘濂栧姳鍑忓皯绁濈鍗囩骇鏃堕棿 鍒嗛挓
+ public int freeEnergyMoneyType; //鍙秷鑰楄揣甯侀鍙栧厖鑳藉鍔憋紝 璐у竵绫诲瀷|璐у竵鍊硷紝涔熷彲骞垮憡棰嗗彇锛屼簩閫変竴
+ public int freeEnergyMoney;
+
public int lastTreeLV; //涓婁竴娆℃爲鐨勭瓑绾� 鐢ㄤ簬鎵撳紑鐣岄潰鐨勬椂鍊欐挱鏀句笅鍗囩骇鐗规晥
@@ -28,6 +33,8 @@
m_TreeLV = 0;
m_LVUPState = 0;
m_LVUPRemainTime = 0;
+ m_Energy = 0;
+ m_EnergyTimeLast = 0;
m_LVPackTime = 0;
DTC0403_tagPlayerLoginLoadOK.playerLoginOkEvent += OnPlayerLoginOK;
GlobalTimeEvent.Instance.fiveSecondEvent += OnTimeEvent;
@@ -56,9 +63,15 @@
var arr = config.Numerical2.Split('|');
timeUpTreeItemID = int.Parse(arr[0]);
timeUpTreeItemSubTime = int.Parse(arr[1]);
- dayFreeMaxTimes = int.Parse(config.Numerical3);
- freeTimeCD = int.Parse(config.Numerical4);
- freeSubTime = int.Parse(config.Numerical5);
+
+ config = FuncConfigConfig.Get("TreeEnergy");
+ freeEnergyMax = int.Parse(config.Numerical2);
+ freeEnergyCD = int.Parse(config.Numerical3);
+ freeEnergySubTreeTime = int.Parse(config.Numerical4);
+ arr = config.Numerical5.Split('|');
+ freeEnergyMoneyType = int.Parse(arr[0]);
+ freeEnergyMoney = int.Parse(arr[1]);
+
}
public void UpdateBlessLVInfo(HB121_tagMCTreeInfo netPack)
@@ -66,8 +79,8 @@
m_TreeLV = netPack.TreeLV;
m_LVUPState = netPack.LVUPState;
m_LVUPRemainTime = (int)netPack.LVUPRemainTime;
- m_FreeTimeCnt = netPack.FreeTimeCnt;
- m_FreeTimeLast = (int)netPack.FreeTimeLast;
+ m_Energy = netPack.Energy;
+ m_EnergyTimeLast = (int)netPack.EnergyTimeLast;
m_LVPackTime = TimeUtility.AllSeconds;
if (lastTreeLV == 0)
{
@@ -85,11 +98,15 @@
return m_LVUPRemainTime - (TimeUtility.AllSeconds - m_LVPackTime);
}
+ public int GetMaxEnergyCnt()
+ {
+ return freeEnergyMax;
+ }
+
+ //鍏呰兘鏃堕棿鍊掕鏃�, 鐢ㄤ簬瀹㈡埛绔富鍔ㄩ鍙� 鎴栬�� 鍙湁浠�0鍒�1鎵嶆樉绀虹敤
public int GetFreeRemainTime()
{
- if (m_LVUPState == 0)
- return 0;
- return m_FreeTimeLast + freeTimeCD * 60 - TimeUtility.AllSeconds;
+ return freeEnergyCD * 60 - (TimeUtility.AllSeconds - m_EnergyTimeLast);
}
Redpoint redpointTree = new Redpoint(MainRedDot.BlessLVRedpoint);
@@ -122,7 +139,7 @@
{
redpointTreeItem.state = RedPointState.Simple;
}
- if (m_FreeTimeCnt < dayFreeMaxTimes && GetFreeRemainTime() <= 0)
+ if (m_Energy > 0)
{
redpointTreeFree.state = RedPointState.Simple;
}
@@ -156,10 +173,29 @@
AutoUpgrade();
}
+ SendGetFreeEnergy();
+
UpdateTreeRedpoint();
}
+ public void SendGetFreeEnergy()
+ {
+ if (m_Energy >= GetMaxEnergyCnt())
+ {
+ return;
+ }
+ if (GetFreeRemainTime() > 0)
+ {
+ return;
+ }
+
+ var pack = new CA504_tagCMPlayerGetReward();
+ pack.RewardType = 82;
+ pack.DataEx = 1;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+
//瑁呭鍝佽川鐨勮捣濮嬭〃鐜�,鏈�灏�1
public int GetStartEquipQuality()
diff --git a/Main/System/Equip/BlessLVWin.cs b/Main/System/Equip/BlessLVWin.cs
index 64ceb5f..9c3d647 100644
--- a/Main/System/Equip/BlessLVWin.cs
+++ b/Main/System/Equip/BlessLVWin.cs
@@ -17,6 +17,7 @@
[SerializeField] Button timeUpBtn; //鍔犻�熸椂闂存寜閽�
[SerializeField] Button freeBtn;
[SerializeField] Text freeLeftTime;
+ [SerializeField] Text energyCntText;
[SerializeField] Transform upgradeWaiteState; //寰呭崌绾�
[SerializeField] Image processImg; //杩涘害
@@ -41,9 +42,7 @@
freeBtn.AddListener(() =>
{
- var pack = new CA504_tagCMPlayerGetReward();
- pack.RewardType = 82;
- GameNetSystem.Instance.SendInfo(pack);
+ UIManager.Instance.OpenWindow<BlessLVADWin>();
});
}
@@ -131,26 +130,26 @@
itemCntTxt.text = itemCnt + "/" + needCount;
itemCntTxt.color = itemCnt >= needCount ? UIHelper.GetUIColor(TextColType.Green, true) : UIHelper.GetUIColor(TextColType.Red, true);
- if (BlessLVManager.Instance.m_FreeTimeCnt < BlessLVManager.Instance.dayFreeMaxTimes)
+ if (BlessLVManager.Instance.m_Energy == 0)
{
+ freeBtn.interactable = false;
var freeeRemainTime = BlessLVManager.Instance.GetFreeRemainTime();
if (freeeRemainTime > 0)
{
freeLeftTime.text = TimeUtility.SecondsToHMS(freeeRemainTime);
- freeBtn.interactable = false;
}
else
{
freeLeftTime.text = "";
- freeBtn.interactable = true;
}
}
else
{
freeLeftTime.text = "";
- freeBtn.interactable = false;
+ freeBtn.interactable = true;
}
+ energyCntText.text = Language.Get("BlessTree9", BlessLVManager.Instance.m_Energy, BlessLVManager.Instance.GetMaxEnergyCnt());
}
void CreateScroller()
diff --git a/Main/System/Invest/InvestModel.cs b/Main/System/Invest/InvestModel.cs
index a1f8f9c..1634716 100644
--- a/Main/System/Invest/InvestModel.cs
+++ b/Main/System/Invest/InvestModel.cs
@@ -6,36 +6,24 @@
public class InvestModel : GameSystemManager<InvestModel>
{
- // public ILOpenServerActivityProxy activity;
-
- public const int FuncID = 25;
+ public const int monthCardType = 1; // 鏈堝崱
+ public const int foreverCardType = 2; //姘镐箙鍗� 鏉冮檺
//鎶曡祫瀵瑰簲濂栧姳
- Dictionary<int, Dictionary<int, List<Item>>> m_InvestItems = new Dictionary<int, Dictionary<int, List<Item>>>();
+ Dictionary<int, int[][]> m_InvestItems = new Dictionary<int, int[][]>();
//鎶曡祫瀵瑰簲鍏呭�糏D
Dictionary<int, int[]> m_InvestRechargeIds = new Dictionary<int, int[]>();
//鎶曡祫瀵瑰簲璐拱鎯呭喌
Dictionary<int, InvestInfo> m_InvestInfos = new Dictionary<int, InvestInfo>();
- //{鎶曡祫绫诲瀷锛歔棰嗗彇澶╋紝褰撳墠澶} 澶╀粠1寮�濮�
- Dictionary<int, List<List<int>>> m_InvestSingleInfos = new Dictionary<int, List<List<int>>>();
- //鎶曡祫瀵瑰簲鐨勭孩鐐�
- Dictionary<int, Redpoint> m_Redpoints = new Dictionary<int, Redpoint>();
//鎶曡祫绫诲瀷
public List<int> investTypes = new List<int>();
- //姘镐箙鍗� 鏉冮檺
- public const int foreverCardType = 12; //鎶曡祫绫诲瀷
- public const int monthCardType = 7; // 鏈堝崱7
-
-
-
- public event Action onSelectUpdate;
public event Action<int> onInvestUpdate;
public const int redpointID = 20931;
- public Redpoint redpoint = new Redpoint(MainRedDot.REDPOINT_OPENSERVER, redpointID);
+ public Redpoint redpoint = new Redpoint(redpointID);
public override void Init()
@@ -60,14 +48,13 @@
public bool IsOpen()
{
- return FuncOpen.Instance.IsFuncOpen(FuncID);
+ return FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.PrivilegeCard);
}
public void OnBeforePlayerDataInitialize()
{
m_InvestInfos.Clear();
- m_InvestSingleInfos.Clear();
}
public void OnPlayerLoginOk()
@@ -78,49 +65,16 @@
void ParseConfig()
{
- investTypes.Clear();
var funcConfig = FuncConfigConfig.Get("InvestCost");
- m_InvestRechargeIds = ConfigParse.ParseIntArrayDict(funcConfig.Numerical3);
- //m_Redpoints
+ m_InvestRechargeIds = ConfigParse.ParseIntArrayDict(funcConfig.Numerical1);
+
+ funcConfig = FuncConfigConfig.Get("InvestDay");
+ m_InvestItems = ConfigParse.ParseIntArray2Dict(funcConfig.Numerical3);
investTypes = m_InvestRechargeIds.Keys.ToList();
-
investTypes.Sort();
- var configs = InvestConfig.GetValues();
- for (int i = 0; i < configs.Count; i++)
- {
- var config = configs[i];
- if (!investTypes.Contains(config.type))
- {
- continue;
- }
-
- Dictionary<int, List<Item>> dict;
- if (!m_InvestItems.TryGetValue(config.type, out dict))
- {
- dict = new Dictionary<int, List<Item>>();
- m_InvestItems.Add(config.type, dict);
- }
-
- List<Item> items;
- if (!dict.TryGetValue(config.id, out items))
- {
- items = new List<Item>();
- dict.Add(config.id, items);
- }
-
- var itemArray = config.award[1]; //1鏆傛椂绾﹀畾鏈堝崱 姘镐箙鍗★紝鍏朵粬鐨勮嚜瀹氫箟鍚庣画鍐嶅畾
- for (int j = 0; j < itemArray.Length; j++)
- {
- items.Add(new Item()
- {
- id = itemArray[j][0],
- countEx = itemArray[j][1],
- bind = itemArray[j][2],
- });
- }
- }
+
}
public OrderInfoConfig GetOrderInfoId(int type)
@@ -144,113 +98,70 @@
}
- public int GetInvestPassDays(int type)
- {
- return m_InvestInfos.ContainsKey(type) ? m_InvestInfos[type].days : 0;
- }
+ // public int GetInvestPassDays(int type)
+ // {
+ // return m_InvestInfos.ContainsKey(type) ? m_InvestInfos[type].days : 0;
+ // }
- //鑾峰緱鍗曟姇璧勭殑鎬绘敹鐩�
- public long GetTotalIncome(int type)
- {
- long income = 0;
- if (m_InvestItems.ContainsKey(type))
- {
- var keyList = m_InvestItems[type].Keys.ToList();
- for (int i = 0; i < keyList.Count; i++)
- {
- var items = m_InvestItems[type][keyList[i]];
- for (var j = 0; j < items.Count; j++)
- {
- var item = items[j];
- if (item.id == 20 || item.id == 30)
- income += item.countEx;
- }
- }
- }
- return income;
- }
//id 涓鸿〃閲岀殑ID
//0-鏈姇璧� 1-鏈揪鎴� 2-鍙鍙� 3-宸查鍙�
public int GetSingleInvestState(int type, int id)
{
- if (IsInvested(type))
- {
- var day = GetInvestPassDays(type);
- if (m_InvestItems.ContainsKey(type)
- && m_InvestItems[type].ContainsKey(id))
- {
- if (IsRewardGot(type, id))
- {
- return 3;
- }
- var config = InvestConfig.Get(id);
+ // if (IsInvested(type))
+ // {
+ // var day = GetInvestPassDays(type);
+ // if (m_InvestItems.ContainsKey(type)
+ // && m_InvestItems[type].ContainsKey(id))
+ // {
+ // if (IsRewardGot(type, id))
+ // {
+ // return 3;
+ // }
+ // var config = InvestConfig.Get(id);
- if (!m_InvestSingleInfos.ContainsKey(type))
- {
- return 0;
- }
+ // if (!m_InvestSingleInfos.ContainsKey(type))
+ // {
+ // return 0;
+ // }
- var index = id % 100;
- //姣忎釜鏁版寜浣嶅瓨31涓縺娲荤储寮�
- var listIndex = index / 31;
- var bitIndex = index % 31;
+ // var index = id % 100;
+ // //姣忎釜鏁版寜浣嶅瓨31涓縺娲荤储寮�
+ // var listIndex = index / 31;
+ // var bitIndex = index % 31;
- return day < config.needDay ? 1 : 2;
- }
- }
+ // return day < config.needDay ? 1 : 2;
+ // }
+ // }
return 0;
}
-
- public bool TryGetItems(int type, int id, out List<Item> items)
- {
- items = null;
- if (m_InvestItems.ContainsKey(type))
- {
- return m_InvestItems[type].TryGetValue(id, out items);
- }
- return false;
- }
-
- public List<int> GetIdsByType(int type)
- {
- if (m_InvestItems.ContainsKey(type))
- {
- return m_InvestItems[type].Keys.ToList();
- }
- return null;
- }
-
//鍒ゆ柇鏄惁璐拱浜嗘姇璧�
public bool IsInvested(int type)
{
- return m_InvestInfos.ContainsKey(type) && m_InvestInfos[type].money > 0;
+ if (!m_InvestInfos.ContainsKey(type))
+ {
+ return false;
+ }
+ if (type == 1)
+ {
+ //鏈堝崱 闄愭椂绫诲瀷鐨勬姇璧� 鏈埌鏈熷氨绠楁姇璧�
+ return m_InvestInfos[type].InvestEndTime > 0 && m_InvestInfos[type].InvestEndTime < TimeUtility.AllSeconds;
+ }
+
+ //姘镐箙绫诲瀷鐨勬姇璧� 鍙璐拱浜嗗氨绠楁姇璧�
+ return m_InvestInfos[type].InvestBuyTime > 0;
}
- //濂栧姳鏄惁宸查鍙�
- public bool IsRewardGot(int type, int id)
- {
- if (m_InvestSingleInfos.ContainsKey(type))
- {
- var index = id % 100;
- //姣忎釜鏁版寜浣嶅瓨31涓縺娲荤储寮�
- var listIndex = index / 31;
- var bitIndex = index % 31;
- return ((int)Math.Pow(2, bitIndex) & m_InvestSingleInfos[type][1][listIndex]) != 0;
- }
- return false;
- }
private void OnFuncStateChangeEvent(int id)
{
- if (id == FuncID)
+ if (id == (int)FuncOpenEnum.PrivilegeCard)
{
- // activity.StateUpdate(id);
UpdateRedpoint();
}
@@ -262,7 +173,7 @@
{
var pak = new CA541_tagCMGetInvestReward();
pak.InvestType = (byte)type;
- pak.RewardIndex = (byte)(id % 100);
+ pak.RewardIndex = (byte)id;
GameNetSystem.Instance.SendInfo(pak);
}
@@ -272,7 +183,7 @@
RechargeManager.Instance.CTG(GetOrderInfoId(type));
}
- public void UpdateInvestInfo(HA338_tagMCInvestInfo package)
+ public void UpdateInvestInfo(HA338_tagSCInvestInfo package)
{
if (!investTypes.Contains(package.InvestType))
{
@@ -281,26 +192,12 @@
m_InvestInfos[package.InvestType] = new InvestInfo()
{
- days = (int)package.CurDay,
- money = package.CurDay >= 1 ? 1 : 0,
+ InvestBuyTime = (int)package.InvestBuyTime,
+ InvestEndTime = (int)package.InvestEndTime,
+ AwardState = package.AwardState
};
- List<List<int>> singleInfos;
- if (!m_InvestSingleInfos.TryGetValue(package.InvestType, out singleInfos))
- {
- singleInfos = new List<List<int>>();
- m_InvestSingleInfos.Add(package.InvestType, singleInfos);
- }
- singleInfos.Clear();
- singleInfos.Add(new List<int>());
- singleInfos.Add(new List<int>());
- singleInfos.Add(new List<int>());
- singleInfos[0].Add((int)package.CurDay);
- for (int i = 0; i < package.ValueCount; i++)
- {
- singleInfos[1].Add((int)package.RewardValue[i]);
- singleInfos[2].Add((int)package.ProgressValue[i]);
- }
+
UpdateRedpoint();
if (onInvestUpdate != null)
@@ -311,67 +208,20 @@
void UpdateRedpoint()
{
- List<int> redpointTypes = new List<int>();
- if (IsOpen())
+ if (!IsOpen())
{
- for (var i = 0; i < investTypes.Count; i++)
- {
- var type = investTypes[i];
- if (!IsInvested(type))
- {
- continue;
- }
- var keyList = m_InvestItems[type].Keys.ToList();
- for (int j = 0; j < keyList.Count; j++)
- {
- var id = keyList[j];
- if (GetSingleInvestState(type, id) == 2)
- {
- redpointTypes.Add(type);
- break;
- }
- }
- }
+ return;
}
- var redList = m_Redpoints.Keys.ToList();
- for (int j = 0; j < redList.Count; j++)
- {
- var type = redList[j];
- m_Redpoints[type].state = redpointTypes.Contains(type) ? RedPointState.Simple : RedPointState.None;
- }
}
- //宸茬粡璐拱骞堕鍙栨墍鏈夌墿鍝�
- public bool IsFinish()
- {
- for (int i = 0; i < investTypes.Count; i++)
- {
- int type = investTypes[i];
- //蹇界暐姘镐箙鍗�
- if (type == foreverCardType)
- continue;
- var idsList = GetIdsByType(type);
- if (idsList.IsNullOrEmpty())
- continue;
- for (int j = 0; j < idsList.Count; j++)
- {
- int id = idsList[j];
- if (GetSingleInvestState(type, id) != 3)
- {
- return false;
- }
- }
- }
- return true;
- }
-
public struct InvestInfo
{
- public int money;
- public int days;
+ public int InvestBuyTime; // 鎶曡祫璐拱鏃堕棿鎴筹紝姘镐箙鐨勯�氳繃璇ユ椂闂村垽鏂槸鍚︽湁鏁堟垨宸茶繃澶╂暟锛屼换鎰忕被鍨嬪潎鏈夎鍊硷紝杩囨湡娌℃湁閲嶇疆锛屽墠绔嚜宸卞垽鏂�
+ public int InvestEndTime; // 鎶曡祫鍒版湡鏃堕棿鎴筹紝闈炴案涔呯殑閫氳繃璇ユ椂闂村垽鏂埌鏈熸椂闂达紝鏈夊ぉ鏁伴檺鍒剁殑鎵嶆湁鍊�
+ public int AwardState; // 浠婃棩鏄惁宸查鍙栧鍔�
}
}
diff --git a/Main/System/Main/FightPowerManager.cs b/Main/System/Main/FightPowerManager.cs
index 3dd3a0c..65d802d 100644
--- a/Main/System/Main/FightPowerManager.cs
+++ b/Main/System/Main/FightPowerManager.cs
@@ -221,54 +221,54 @@
#region 灞炴�у叕寮�
// 鍗曞熀纭�灞炴�ц绠�
- public double GetPropertyVaule(int attrType, HeroInfo hero, string formula)
- {
- propertyVariables.Clear();
- propertyVariables["lvValue"] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0;
- propertyVariables["equipValue"] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0;
- propertyVariables["bookValue"] = 0;
- propertyVariables["bookPer"] = GetBookPer(attrType) / 10000.0f;
- propertyVariables["realmValue"] = officialAttrs.ContainsKey(attrType) ? officialAttrs[attrType] : 0;
- propertyVariables["realmPer"] = GetOfficialPer(attrType) / 10000.0f;
- propertyVariables["gubaoValue"] = 0;
- propertyVariables["gubaoPer"] = 0;
- propertyVariables["hjgValue"] = 0;
- propertyVariables["hjgPer"] = 0;
- propertyVariables["horseValue"] = 0;
- propertyVariables["horsePer"] = 0;
+// public double GetPropertyVaule(int attrType, HeroInfo hero, string formula)
+// {
+// propertyVariables.Clear();
+// propertyVariables["lvValue"] = lvAttrs.ContainsKey(attrType) ? lvAttrs[attrType] : 0;
+// propertyVariables["equipValue"] = equipAttrs.ContainsKey(attrType) ? equipAttrs[attrType] : 0;
+// propertyVariables["bookValue"] = 0;
+// propertyVariables["bookPer"] = GetBookPer(attrType) / 10000.0f;
+// propertyVariables["realmValue"] = officialAttrs.ContainsKey(attrType) ? officialAttrs[attrType] : 0;
+// propertyVariables["realmPer"] = GetOfficialPer(attrType) / 10000.0f;
+// propertyVariables["gubaoValue"] = 0;
+// propertyVariables["gubaoPer"] = 0;
+// propertyVariables["hjgValue"] = 0;
+// propertyVariables["hjgPer"] = 0;
+// propertyVariables["horseValue"] = 0;
+// propertyVariables["horsePer"] = 0;
- //锛侊紒锛佸崟姝﹀皢鎴樺姏棰勮鐨勮瘽闇�瑕佹帓闄ら槦浼嶅奖鍝嶆垬鍔涳紝鍙畻姝﹀皢鑷韩鐨勪笂闃靛睘鎬�
- propertyVariables["lineupInitAddPer"] = GetLineUpPer(attrType, "lineupInitAddPer") / 10000.0f;
- propertyVariables["lineupLVAddPer"] = GetLineUpPer(attrType, "lineupLVAddPer") / 10000.0f;
- propertyVariables["lineupBreakLVAddPer"] = GetLineUpPer(attrType, "lineupBreakLVAddPer") / 10000.0f;
- propertyVariables["lineupStarAddPer"] = GetLineUpPer(attrType, "lineupStarAddPer") / 10000.0f;
+// //锛侊紒锛佸崟姝﹀皢鎴樺姏棰勮鐨勮瘽闇�瑕佹帓闄ら槦浼嶅奖鍝嶆垬鍔涳紝鍙畻姝﹀皢鑷韩鐨勪笂闃靛睘鎬�
+// propertyVariables["lineupInitAddPer"] = GetLineUpPer(attrType, "lineupInitAddPer") / 10000.0f;
+// propertyVariables["lineupLVAddPer"] = GetLineUpPer(attrType, "lineupLVAddPer") / 10000.0f;
+// propertyVariables["lineupBreakLVAddPer"] = GetLineUpPer(attrType, "lineupBreakLVAddPer") / 10000.0f;
+// propertyVariables["lineupStarAddPer"] = GetLineUpPer(attrType, "lineupStarAddPer") / 10000.0f;
- //闃靛鍏夌幆 涓夊洿鐧惧垎姣斿姞鎴�
- propertyVariables["lineupHaloValue"] = countryAttrs.ContainsKey(attrType) ? countryAttrs[attrType] : 0;
- propertyVariables["lineupHaloPer"] = GetCountryPer(attrType) / 10000.0f;
+// //闃靛鍏夌幆 涓夊洿鐧惧垎姣斿姞鎴�
+// propertyVariables["lineupHaloValue"] = countryAttrs.ContainsKey(attrType) ? countryAttrs[attrType] : 0;
+// propertyVariables["lineupHaloPer"] = GetCountryPer(attrType) / 10000.0f;
- //姝﹀皢灞炴��
- propertyVariables["inheritPer"] = hero.GetInheritAttrPer(attrType) / 10000.0f;
- propertyVariables["heroSelfValue"] = hero.GetSelfAddValue(attrType);
- propertyVariables["heroSelfPer"] = hero.GetSelfAddPer(attrType) / 10000.0f;
- propertyVariables["starTalentValue"] = hero.GetTalentAttrValue(attrType);
- propertyVariables["starTalentPer"] = hero.GetTalentAttrPer(attrType) / 10000.0f;
- propertyVariables["breakLVValue"] = hero.GetBreakAttrValue(attrType);
- propertyVariables["breakLVPer"] = hero.GetBreakAttrPer(attrType) / 10000.0f;
- propertyVariables["awakeTalentValue"] = hero.GetAwakeAttrValue(attrType);
- propertyVariables["awakeTalentPer"] = hero.GetAwakeAttrPer(attrType) / 10000.0f;
- propertyVariables["fetterValue"] = hero.GetFetterAttrValue(attrType);
- propertyVariables["fetterPer"] = hero.GetFetterAttrPer(attrType) / 10000.0f;
+// //姝﹀皢灞炴��
+// propertyVariables["inheritPer"] = hero.GetInheritAttrPer(attrType) / 10000.0f;
+// propertyVariables["heroSelfValue"] = hero.GetSelfAddValue(attrType);
+// propertyVariables["heroSelfPer"] = hero.GetSelfAddPer(attrType) / 10000.0f;
+// propertyVariables["starTalentValue"] = hero.GetTalentAttrValue(attrType);
+// propertyVariables["starTalentPer"] = hero.GetTalentAttrPer(attrType) / 10000.0f;
+// propertyVariables["breakLVValue"] = hero.GetBreakAttrValue(attrType);
+// propertyVariables["breakLVPer"] = hero.GetBreakAttrPer(attrType) / 10000.0f;
+// propertyVariables["awakeTalentValue"] = hero.GetAwakeAttrValue(attrType);
+// propertyVariables["awakeTalentPer"] = hero.GetAwakeAttrPer(attrType) / 10000.0f;
+// propertyVariables["fetterValue"] = hero.GetFetterAttrValue(attrType);
+// propertyVariables["fetterPer"] = hero.GetFetterAttrPer(attrType) / 10000.0f;
-#if UNITY_EDITOR
- //鎺掗櫎鍊间负0鐨勫睘鎬ц緭鍑�
- // var tmpPropertyVariables = propertyVariables.Where(x => x.Value > 0).ToDictionary(x => x.Key, x => x.Value);
- // if (!tmpPropertyVariables.IsNullOrEmpty())
- // propertyStrForDebug += $"灞炴�D {attrType} - {JsonMapper.ToJson(tmpPropertyVariables)}";
-#endif
- return JaceCalculator.Calculate(formula, propertyVariables);
- }
+// #if UNITY_EDITOR
+// //鎺掗櫎鍊间负0鐨勫睘鎬ц緭鍑�
+// // var tmpPropertyVariables = propertyVariables.Where(x => x.Value > 0).ToDictionary(x => x.Key, x => x.Value);
+// // if (!tmpPropertyVariables.IsNullOrEmpty())
+// // propertyStrForDebug += $"灞炴�D {attrType} - {JsonMapper.ToJson(tmpPropertyVariables)}";
+// #endif
+// return JaceCalculator.Calculate(formula, propertyVariables);
+// }
public double GetPropertyVaule(int attrType, HeroInfo hero, int type)
{
@@ -442,15 +442,15 @@
{
if (useFormulaType == 0)
fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, 0), 3);
- else
- fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, propertyFormula), 3);
+ // else
+ // fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, propertyFormula), 3);
}
else
{
if (useFormulaType == 0)
fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, 1), 3);
- else
- fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, fightPropertyFormula), 3);
+ // else
+ // fightPowerVariables[config.Parameter] = Math.Round(GetPropertyVaule(config.ID, hero, fightPropertyFormula), 3);
}
}
diff --git a/Main/System/Recharge/PrivilegeCardWin.cs b/Main/System/Recharge/PrivilegeCardWin.cs
new file mode 100644
index 0000000..16606a1
--- /dev/null
+++ b/Main/System/Recharge/PrivilegeCardWin.cs
@@ -0,0 +1,133 @@
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+
+//鐗规潈鍗�
+public class PrivilegeCardWin : UIBase
+{
+
+ [SerializeField] GroupButtonEx djqBtn;
+ [SerializeField] GroupButtonEx goldBtn;
+
+ [SerializeField] ScrollerController djqScroller;
+ [SerializeField] ScrollerController goldScroller;
+ [SerializeField] Transform djqInfo;
+
+ List<int> _list = new List<int>();
+ protected override void InitComponent()
+ {
+ djqBtn.AddListener(() => { OnSelectFuncType(0); });
+ goldBtn.AddListener(() => { OnSelectFuncType(1); });
+ }
+
+
+ protected override void OnPreOpen()
+ {
+ djqScroller.OnRefreshCell += OnDjqRefreshCell;
+ goldScroller.OnRefreshCell += OnGoldRefreshCell;
+ RechargeManager.Instance.rechargeCountEvent += RechargeEvent;
+
+ if (RechargeManager.Instance.selectTabIndex == 0)
+ {
+ djqBtn.SelectBtn();
+ }
+ else if (RechargeManager.Instance.selectTabIndex == 1)
+ {
+ goldBtn.SelectBtn();
+ }
+
+ Display();
+ }
+
+ protected override void OnPreClose()
+ {
+ djqScroller.OnRefreshCell -= OnDjqRefreshCell;
+ goldScroller.OnRefreshCell -= OnGoldRefreshCell;
+ RechargeManager.Instance.rechargeCountEvent -= RechargeEvent;
+ }
+
+ void RechargeEvent(int id)
+ {
+ Display();
+ }
+
+ void Display()
+ {
+ CreateScroller();
+ }
+
+
+ void CreateScroller()
+ {
+ if (RechargeManager.Instance.selectTabIndex == 0)
+ {
+ _list = RechargeManager.Instance.GetCTGIDListByType(17);
+ djqScroller.SetActive(true);
+ djqInfo.SetActive(true);
+ goldScroller.SetActive(false);
+ if (djqScroller.GetCellTotalCount() == 0)
+ {
+ djqScroller.Refresh();
+ for (int i = 0; i < _list.Count; i++)
+ {
+ if (i % 3 == 0)
+ {
+ djqScroller.AddCell(ScrollerDataType.Header,i);
+ }
+ }
+ djqScroller.Restart();
+ }
+ else
+ {
+ djqScroller.m_Scorller.RefreshActiveCellViews();
+ }
+ }
+ else if (RechargeManager.Instance.selectTabIndex == 1)
+ {
+ _list = RechargeManager.Instance.GetCTGIDListByType(2);
+ djqScroller.SetActive(false);
+ djqInfo.SetActive(false);
+ goldScroller.SetActive(true);
+
+ if (goldScroller.GetCellTotalCount() == 0)
+ {
+ goldScroller.Refresh();
+ for (int i = 0; i < _list.Count; i++)
+ {
+ if (i % 3 == 0)
+ {
+ goldScroller.AddCell(ScrollerDataType.Header, i);
+ }
+ }
+ goldScroller.Restart();
+ }
+ else
+ {
+ goldScroller.m_Scorller.RefreshActiveCellViews();
+ }
+ }
+ }
+
+
+ void OnDjqRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as RechargeDJQLineCell;
+ _cell.Display(cell.index, _list);
+ }
+
+ void OnGoldRefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as RechargeGoldLineCell;
+ _cell.Display(cell.index, _list);
+ }
+
+
+
+
+ void OnSelectFuncType(int index)
+ {
+
+ RechargeManager.Instance.selectTabIndex = index;
+ Display();
+ }
+}
diff --git a/Main/Config/Configs/InvestConfig.cs.meta b/Main/System/Recharge/PrivilegeCardWin.cs.meta
similarity index 83%
copy from Main/Config/Configs/InvestConfig.cs.meta
copy to Main/System/Recharge/PrivilegeCardWin.cs.meta
index a037ded..43c57eb 100644
--- a/Main/Config/Configs/InvestConfig.cs.meta
+++ b/Main/System/Recharge/PrivilegeCardWin.cs.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: ff3d77591e2aeaa438955b2b6322cfba
+guid: dfb43dd8cb814e24bba8dc559e1cb24d
MonoImporter:
externalObjects: {}
serializedVersion: 2
diff --git a/Main/System/Redpoint/MainRedDot.cs b/Main/System/Redpoint/MainRedDot.cs
index 24d557b..4648c11 100644
--- a/Main/System/Redpoint/MainRedDot.cs
+++ b/Main/System/Redpoint/MainRedDot.cs
@@ -84,15 +84,6 @@
#endregion
- #region 寮�鏈嶆椿鍔ㄧ孩鐐�
- public const int REDPOINT_OPENSERVER = 209;
- public Redpoint openServerRedpoint = new Redpoint(REDPOINT_OPENSERVER);
-
- //280 寮�澶寸敤浜庤妭鏃ョ绂�
- public const int RedPoint_HolidayWishes = 280;
- public Redpoint holidayWishesRedpoint = new Redpoint(RedPoint_HolidayWishes);
-
- #endregion
public const int REDPOINT_OPENRANK = 258;
public Redpoint openRankRedpoint = new Redpoint(REDPOINT_OPENRANK);
#region 浠欑洘娲诲姩绾㈢偣
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index 05c28c0..9e47bf8 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -833,6 +833,7 @@
Chat = 19,//鑱婂ぉ
AutoFight = 20,//鑷姩鎴樻枟
Recharge = 22,//鍏呭��
+ PrivilegeCard = 25, //鐗规潈鍗�
Horse = 37, //鍧愰獞
BattlePass = 40, //鍩洪噾锛堟垬浠わ級
LLMJ = 41, //鍘嗙粌绉樼瑘
--
Gitblit v1.8.0