From f36e315c3074ebd2ce2147b6b380d038d81517e8 Mon Sep 17 00:00:00 2001
From: lcy <1459594991@qq.com>
Date: 星期三, 27 五月 2026 19:42:44 +0800
Subject: [PATCH] 666 新增代金券
---
Main/Core/GameEngine/Player/PlayerBaseData.cs | 6
Main/Utility/UIHelper.cs | 8 +
Main/System/Tip/ConfirmCancel.cs | 33 +++++
Main/Utility/EnumHelper.cs | 2
Main/Core/GameEngine/Player/PlayerDatas.cs | 2
Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs | 8
Main/System/Recharge/RechargeManager.UI.cs | 2
Main/System/ItemTip/OwnMoneyCell.cs | 18 ++
Main/System/Tip/PayMethodConfirmWin.cs.meta | 11 +
Main/System/Recharge/RechargeWin.cs | 55 ++++++++
Main/System/Tip/PayMethodConfirmWin.cs | 132 ++++++++++++++++++++++
Main/SDK/SDKUtils.cs | 72 ++++++-----
12 files changed, 299 insertions(+), 50 deletions(-)
diff --git a/Main/Core/GameEngine/Player/PlayerBaseData.cs b/Main/Core/GameEngine/Player/PlayerBaseData.cs
index c9b1843..6a8f6ff 100644
--- a/Main/Core/GameEngine/Player/PlayerBaseData.cs
+++ b/Main/Core/GameEngine/Player/PlayerBaseData.cs
@@ -69,7 +69,7 @@
public uint ExAttr11; //棰勭暀鐨勬墿灞曞睘鎬у瓧娈碉紝鐢ㄦ潵瀛樻斁椤圭洰鐗瑰畾鐨勫睘鎬�121 鐜伴噾浠e竵锛堜唬閲戝埜锛�
public uint ExAttr16; //棰勭暀鐨勬墿灞曞睘鎬у瓧娈碉紝鐢ㄦ潵瀛樻斁椤圭洰鐗瑰畾鐨勫睘鎬� 鍏ㄨ韩鐗规晥
public uint ExAttr17; //璐﹀彿鐘舵�� 鎸変綅 4 灏佸彿 5绂佽█ 6绂佽澶�
- public uint ServerGroupId; //鏈嶅姟鍣ㄧ粍ID
+ public uint cashVoucher; //鐜伴噾绀煎埜锛堣揣甯佺被鍨�97锛夛紝瀛樺偍浜嶦xAttr13锛�0418鍒锋柊绫诲瀷123
public uint hangTime;//鐜颁负鑴辨満鎸傚墿浣欐椂闂� 23
public uint faction; //闃佃惀 107
uint m_coinPointTotal;
@@ -206,7 +206,7 @@
leaveGuildInfo = (int)_serverInfo.ExAttr12;
ExAttr16 = _serverInfo.ExAttr16;
ExAttr17 = _serverInfo.ExAttr17;
- ServerGroupId = _serverInfo.ExAttr13;
+ cashVoucher = _serverInfo.ExAttr13;
faction = _serverInfo.Faction;
coinPointTotal = _serverInfo.ChangeCoinPointTotal;
equipShowSwitch = _serverInfo.EquipShowSwitch;
@@ -264,7 +264,7 @@
// bubbleId = serverInfo.ExAttr10;
// ExAttr11 = serverInfo.ExAttr11;
// ExAttr16 = serverInfo.ExAttr16;
- // ServerGroupId = serverInfo.ExAttr13;
+ // cashVoucher = serverInfo.ExAttr13;
// faction = serverInfo.Faction;
// coinPointTotal = serverInfo.ChangeCoinPointTotal;
// HP = serverInfo.HP + serverInfo.HPEx * Constants.ExpPointValue;
diff --git a/Main/Core/GameEngine/Player/PlayerDatas.cs b/Main/Core/GameEngine/Player/PlayerDatas.cs
index 8408313..fff5b41 100644
--- a/Main/Core/GameEngine/Player/PlayerDatas.cs
+++ b/Main/Core/GameEngine/Player/PlayerDatas.cs
@@ -271,7 +271,7 @@
baseData.ExAttr11 = value;
break;
case PlayerDataType.ExAttr13:
- baseData.ServerGroupId = value;
+ baseData.cashVoucher = value;
break;
case PlayerDataType.BattleValEx1:
extersion.battleValEx1 = (int)value;
diff --git a/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs b/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs
index 4b95933..48ac585 100644
--- a/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs
+++ b/Main/Core/NetworkPackage/ClientPack/CA1_Sys/CA125_tagCMCoinBuyOrderInfo.cs
@@ -1,6 +1,6 @@
-using UnityEngine;
-using System.Collections;
-
+using UnityEngine;
+using System.Collections;
+
// A1 25 浠e竵璐拱鍏呭�煎晢鍝佺紪鍙峰晢鍝� #tagCMCoinBuyOrderInfo
public class CA125_tagCMCoinBuyOrderInfo : GameNetPackBasic {
@@ -8,6 +8,7 @@
public string AppID;
public byte OrderInfoLen;
public string OrderInfo; //鍟嗗搧缂栧彿
+ public byte UseMoneyType; //浣跨敤璐у竵绫诲瀷锛岄粯璁�99-浠e竵锛屽彲鎸囧畾浣跨敤鍏朵粬璐у竵锛屽97-鐜伴噾绀煎埜
public CA125_tagCMCoinBuyOrderInfo () {
combineCmd = (ushort)0x03FE;
@@ -19,6 +20,7 @@
WriteBytes (AppID, NetDataType.Chars, AppIDLen);
WriteBytes (OrderInfoLen, NetDataType.BYTE);
WriteBytes (OrderInfo, NetDataType.Chars, OrderInfoLen);
+ WriteBytes (UseMoneyType, NetDataType.BYTE);
}
}
diff --git a/Main/SDK/SDKUtils.cs b/Main/SDK/SDKUtils.cs
index 32532cb..62ff119 100644
--- a/Main/SDK/SDKUtils.cs
+++ b/Main/SDK/SDKUtils.cs
@@ -939,49 +939,51 @@
///
public void FreePlatformPay(string title, float money, string cpInfo)
{
- // 鎻愮ず鏄惁浣跨敤浠i噾鍒�
- var gameCash = UIHelper.GetAllVourcher();
-
- bool isBuyGameCash = false; //浠i噾鍒告湰韬殑鍏呭�间笉鑳界敤浠i噾鍒歌喘涔� 閫犳垚寰幆
+ // 浠i噾鍒�/鐜伴噾绀煎埜鏈韩鐨勫厖鍊间笉鑳戒娇鐢ㄤ唬閲戝埜璐拱 閫犳垚寰幆
+ bool isBuyGameCash = false;
int ctgID = RechargeManager.Instance.orderInfoToCTGID[cpInfo];
if (ctgID != 0)
{
- isBuyGameCash = CTGConfig.Get(ctgID).PayType == 17;
+ var payType = CTGConfig.Get(ctgID).PayType;
+ isBuyGameCash = (payType == 17 || payType == 27);
}
-
- if (!isBuyGameCash && gameCash >= money * 100)
+ if (isBuyGameCash)
{
+ FreePlatformPayEx(title, money, cpInfo);
+ return;
+ }
+ long needMoney = (long)(money * 100); // money鏄厓锛宯eedMoney鏄垎
+ long cashVoucher = UIHelper.GetMoneyCnt(97);
+ long diamond = UIHelper.GetMoneyCnt(99);
+
+ bool hasEnoughVoucher = cashVoucher >= needMoney;
+ bool hasEnoughDiamond = diamond >= needMoney;
+
+ if (hasEnoughVoucher || hasEnoughDiamond)
+ {
+ // 寮瑰嚭鏀粯鏂瑰紡閫夋嫨妗嗭紙鐜伴噾绀煎埜/鐜勭帀浜岄�変竴锛�
UIManager.Instance.CloseWindow<GotoChargeWin>();
- if (DayRemind.Instance.GetDayRemind(DayRemind.DJQTip))
- {
- var pack = new CA125_tagCMCoinBuyOrderInfo();
- pack.AppID = VersionConfig.Get().appId;
- pack.AppIDLen = (byte)pack.AppID.Length;
- pack.OrderInfo = cpInfo;
- pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
- GameNetSystem.Instance.SendInfo(pack);
- }
- else
- {
- ConfirmCancel.ShowPopConfirm(
- Language.Get("Mail101"),
- Language.Get("GameCashRule1", money, title),
- (bool isOk) =>
+ int defaultMoneyType = hasEnoughVoucher ? 97 : 99;
+ ConfirmCancel.ShowPayMethodConfirm(
+ 97, (int)needMoney, Language.Get("Recharge8"), // 鐜伴噾绀煎埜
+ 99, (int)needMoney, Language.Get("Recharge7"), // 鐜勭帀
+ Language.Get("Recharge6", UIHelper.GetIconNameWithMoneyType(defaultMoneyType), money, title),
+ money, title,
+ (bool isOk, int selectedMoneyType) =>
+ {
+ if (isOk)
{
- if (isOk)
- {
- var pack = new CA125_tagCMCoinBuyOrderInfo();
- pack.AppID = VersionConfig.Get().appId;
- pack.AppIDLen = (byte)pack.AppID.Length;
- pack.OrderInfo = cpInfo;
- pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
- GameNetSystem.Instance.SendInfo(pack);
- }
-
- });
- }
+ var pack = new CA125_tagCMCoinBuyOrderInfo();
+ pack.AppID = VersionConfig.Get().appId;
+ pack.AppIDLen = (byte)pack.AppID.Length;
+ pack.OrderInfo = cpInfo;
+ pack.OrderInfoLen = (byte)pack.OrderInfo.Length;
+ pack.UseMoneyType = (byte)selectedMoneyType;
+ GameNetSystem.Instance.SendInfo(pack);
+ }
+ });
}
else
{
@@ -1293,7 +1295,7 @@
SendGaoreEvent(dataType, pageType, pageName, pageItemId, money, orderID);
return;
}
- else if (appID == "sghy")
+ else if (appID == "sghy" && dataType == 7)
{
SendOverSeaTraceEvent("tutorial_complete");
}
diff --git a/Main/System/ItemTip/OwnMoneyCell.cs b/Main/System/ItemTip/OwnMoneyCell.cs
index d94f028..de72c8e 100644
--- a/Main/System/ItemTip/OwnMoneyCell.cs
+++ b/Main/System/ItemTip/OwnMoneyCell.cs
@@ -36,6 +36,22 @@
}
}
break;
+ case 97:
+ {
+ if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Recharge, true))
+ {
+ RechargeManager.Instance.selectTabIndex = 2;
+ if (UIManager.Instance.IsOpened<StoreBaseWin>())
+ {
+ UIManager.Instance.GetUI<StoreBaseWin>().ClickFuncBtn(2);
+ }
+ else
+ {
+ UIManager.Instance.OpenWindow<StoreBaseWin>(2);
+ }
+ }
+ }
+ break;
case 99:
{
if (FuncOpen.Instance.IsFuncOpen((int)FuncOpenEnum.Recharge, true))
@@ -93,7 +109,7 @@
}
double count = UIHelper.GetMoneyCnt(moneyType);
int decimalPlaces = 1;
- if (moneyType == 99)
+ if (moneyType == 97 || moneyType == 99)
{
count = count / 100.0;
decimalPlaces = 2;
diff --git a/Main/System/Recharge/RechargeManager.UI.cs b/Main/System/Recharge/RechargeManager.UI.cs
index 4ead2b1..85c855b 100644
--- a/Main/System/Recharge/RechargeManager.UI.cs
+++ b/Main/System/Recharge/RechargeManager.UI.cs
@@ -6,7 +6,7 @@
public partial class RechargeManager : GameSystemManager<RechargeManager>
{
- public int selectTabIndex; //0 鐐瑰埜 1 閲戝竵
+ public int selectTabIndex = 2; //0 浠i噾鍒� 1 鍏冨疂 2 鐜伴噾绀煎埜锛堥粯璁わ級
public List<int> GetCTGIDListByType(int type)
{
diff --git a/Main/System/Recharge/RechargeWin.cs b/Main/System/Recharge/RechargeWin.cs
index b44625c..5084a64 100644
--- a/Main/System/Recharge/RechargeWin.cs
+++ b/Main/System/Recharge/RechargeWin.cs
@@ -5,17 +5,22 @@
//鍏呭�肩晫闈�
public class RechargeWin : UIBase
{
-
+ [SerializeField] GroupButtonEx djq1Btn;
[SerializeField] GroupButtonEx djqBtn;
[SerializeField] GroupButtonEx goldBtn;
+ [SerializeField] ScrollerController djq1Scroller;
[SerializeField] ScrollerController djqScroller;
[SerializeField] ScrollerController goldScroller;
+
[SerializeField] Transform djqInfo;
+ [SerializeField] Transform djqInfo1;
+
List<int> _list = new List<int>();
protected override void InitComponent()
{
+ djq1Btn.AddListener(() => { OnSelectFuncType(2); });
djqBtn.AddListener(() => { OnSelectFuncType(0); });
goldBtn.AddListener(() => { OnSelectFuncType(1); });
}
@@ -23,11 +28,16 @@
protected override void OnPreOpen()
{
+ djq1Scroller.OnRefreshCell += OnDjq1RefreshCell;
djqScroller.OnRefreshCell += OnDjqRefreshCell;
goldScroller.OnRefreshCell += OnGoldRefreshCell;
RechargeManager.Instance.rechargeCountEvent += RechargeEvent;
-
- if (RechargeManager.Instance.selectTabIndex == 0)
+
+ if (RechargeManager.Instance.selectTabIndex == 2)
+ {
+ djq1Btn.SelectBtn();
+ }
+ else if (RechargeManager.Instance.selectTabIndex == 0)
{
djqBtn.SelectBtn();
}
@@ -41,6 +51,7 @@
protected override void OnPreClose()
{
+ djq1Scroller.OnRefreshCell -= OnDjq1RefreshCell;
djqScroller.OnRefreshCell -= OnDjqRefreshCell;
goldScroller.OnRefreshCell -= OnGoldRefreshCell;
RechargeManager.Instance.rechargeCountEvent -= RechargeEvent;
@@ -59,9 +70,37 @@
void CreateScroller()
{
- if (RechargeManager.Instance.selectTabIndex == 0)
+ if (RechargeManager.Instance.selectTabIndex == 2)
+ {
+ _list = RechargeManager.Instance.GetCTGIDListByType(27);
+ djq1Scroller.SetActive(true);
+ djqInfo1.SetActive(true);
+ djqScroller.SetActive(false);
+ djqInfo.SetActive(false);
+ goldScroller.SetActive(false);
+ if (djq1Scroller.GetCellTotalCount() == 0)
+ {
+ djq1Scroller.Refresh();
+ for (int i = 0; i < _list.Count; i++)
+ {
+ if (i % 3 == 0)
+ {
+ djq1Scroller.AddCell(ScrollerDataType.Header, i);
+ }
+ }
+ djq1Scroller.Restart();
+ }
+ else
+ {
+ djq1Scroller.m_Scorller.RefreshActiveCellViews();
+ }
+ SDKUtils.Instance.SendTraceEvent(8, "鍏呭��", "鐜伴噾绀煎埜", "2");
+ }
+ else if (RechargeManager.Instance.selectTabIndex == 0)
{
_list = RechargeManager.Instance.GetCTGIDListByType(17);
+ djq1Scroller.SetActive(false);
+ djqInfo1.SetActive(false);
djqScroller.SetActive(true);
djqInfo.SetActive(true);
goldScroller.SetActive(false);
@@ -86,6 +125,8 @@
else if (RechargeManager.Instance.selectTabIndex == 1)
{
_list = RechargeManager.Instance.GetCTGIDListByType(2);
+ djq1Scroller.SetActive(false);
+ djqInfo1.SetActive(false);
djqScroller.SetActive(false);
djqInfo.SetActive(false);
goldScroller.SetActive(true);
@@ -111,6 +152,12 @@
}
+ void OnDjq1RefreshCell(ScrollerDataType type, CellView cell)
+ {
+ var _cell = cell as RechargeDJQLineCell;
+ _cell.Display(cell.index, _list);
+ }
+
void OnDjqRefreshCell(ScrollerDataType type, CellView cell)
{
var _cell = cell as RechargeDJQLineCell;
diff --git a/Main/System/Tip/ConfirmCancel.cs b/Main/System/Tip/ConfirmCancel.cs
index bc382ab..f8ef9d8 100644
--- a/Main/System/Tip/ConfirmCancel.cs
+++ b/Main/System/Tip/ConfirmCancel.cs
@@ -296,6 +296,39 @@
}
+ //鍙岃揣甯佹敮浠樻柟寮忛�夋嫨锛堢幇閲戠ぜ鍒�/鐜勭帀锛�
+ public static int moneyType1;
+ public static int moneyNeedCount1;
+ public static int moneyType2;
+ public static int moneyNeedCount2;
+ public static string toggleText1; //閫夐」1鏂囧瓧锛堝"浠i噾绀煎埜璐拱"锛�
+ public static string toggleText2; //閫夐」2鏂囧瓧锛堝"鐜勭帀璐拱"锛�
+ public static Action<bool, int> OnDualToggleConfirmEvent; //鍥炶皟锛�(isOk, selectedMoneyType)
+
+ // Recharge6 鏍煎紡鍙傛暟
+ public static float payMethodMoney;
+ public static string payMethodTitle;
+
+ public static void ShowPayMethodConfirm(int mType1, int needCnt1, string langKey1,
+ int mType2, int needCnt2, string langKey2, string content,
+ float _money, string _title, Action<bool, int> func)
+ {
+ moneyType1 = mType1;
+ moneyNeedCount1 = needCnt1;
+ toggleText1 = langKey1;
+ moneyType2 = mType2;
+ moneyNeedCount2 = needCnt2;
+ toggleText2 = langKey2;
+ OnDualToggleConfirmEvent = func;
+ payMethodMoney = _money;
+ payMethodTitle = _title;
+ generalContent = content;
+ if (!UIManager.Instance.IsOpened<PayMethodConfirmWin>())
+ {
+ UIManager.Instance.OpenWindow<PayMethodConfirmWin>();
+ }
+ }
+
//璐у竵纭妗�:鏈夋樉绀哄嬀閫夌殑 娑堣�楀厓瀹濆嬀閫夌被鍨�
public static void MoneyIconToggleConfirmByType(ToggleCheckType type, int moneyCnt, int _moneyType, string fullTip, Action func)
{
diff --git a/Main/System/Tip/PayMethodConfirmWin.cs b/Main/System/Tip/PayMethodConfirmWin.cs
new file mode 100644
index 0000000..5bb9a68
--- /dev/null
+++ b/Main/System/Tip/PayMethodConfirmWin.cs
@@ -0,0 +1,132 @@
+using UnityEngine;
+using UnityEngine.UI;
+
+// 鏀粯鏂瑰紡閫夋嫨纭妗嗭細鍙岃揣甯侊紙鐜伴噾绀煎埜/鐜勭帀锛変簩閫変竴
+public class PayMethodConfirmWin : UIBase
+{
+ [SerializeField] Text m_Content;
+ [SerializeField] Toggle m_Toggle1; //浠i噾绀煎埜
+ [SerializeField] Toggle m_Toggle2; //鐜勭帀
+ [SerializeField] Text m_ToggleTxt1;
+ [SerializeField] Text m_ToggleTxt2;
+ [SerializeField] Button m_ConfirmBtn;
+ [SerializeField] Button m_CancelBtn;
+ [SerializeField] Image moneyIcon;
+ [SerializeField] Text moneyText;
+
+ int m_SelectedMoneyType;
+ int m_NeedMoney1;
+ int m_NeedMoney2;
+
+ protected override void InitComponent()
+ {
+ m_ConfirmBtn.AddListener(OnConfirm);
+ m_CancelBtn.AddListener(OnCancel);
+
+ m_Toggle1.onValueChanged.AddListener((bool isOn) =>
+ {
+ if (isOn)
+ {
+ TrySelectMoneyType(ConfirmCancel.moneyType1, ConfirmCancel.moneyNeedCount1);
+ }
+ });
+ m_Toggle2.onValueChanged.AddListener((bool isOn) =>
+ {
+ if (isOn)
+ {
+ TrySelectMoneyType(ConfirmCancel.moneyType2, ConfirmCancel.moneyNeedCount2);
+ }
+ });
+ }
+
+ protected override void OnPreOpen()
+ {
+ m_NeedMoney1 = ConfirmCancel.moneyNeedCount1;
+ m_NeedMoney2 = ConfirmCancel.moneyNeedCount2;
+
+ // 璁剧疆涓や釜 Toggle 鐨勬枃瀛�
+ m_ToggleTxt1.text = ConfirmCancel.toggleText1;
+ m_ToggleTxt2.text = ConfirmCancel.toggleText2;
+
+ // 鍏堣浜掓枼 ToggleGroup锛岄伩鍏嶅垵濮嬪寲鏃� listener 瑙﹀彂鐘舵�侀敊涔�
+ var group = gameObject.GetComponent<ToggleGroup>();
+ if (group == null)
+ {
+ group = gameObject.AddComponent<ToggleGroup>();
+ }
+ group.allowSwitchOff = false;
+ m_Toggle1.group = group;
+ m_Toggle2.group = group;
+
+ // 鍒ゆ柇鍚勮揣甯佹槸鍚﹀厖瓒�
+ long have1 = UIHelper.GetMoneyCnt(ConfirmCancel.moneyType1);
+ long have2 = UIHelper.GetMoneyCnt(ConfirmCancel.moneyType2);
+ bool enough1 = have1 >= m_NeedMoney1;
+ bool enough2 = have2 >= m_NeedMoney2;
+
+ // 鐢� SetIsOnWithoutNotify 閬垮厤瑙﹀彂 listener锛岀劧鍚庢墜鍔ㄥ垵濮嬪寲
+ if (enough1)
+ {
+ m_Toggle1.SetIsOnWithoutNotify(true);
+ m_Toggle2.SetIsOnWithoutNotify(false);
+ m_SelectedMoneyType = ConfirmCancel.moneyType1;
+ }
+ else if (enough2)
+ {
+ m_Toggle1.SetIsOnWithoutNotify(false);
+ m_Toggle2.SetIsOnWithoutNotify(true);
+ m_SelectedMoneyType = ConfirmCancel.moneyType2;
+ }
+ else
+ {
+ m_Toggle1.SetIsOnWithoutNotify(true);
+ m_Toggle2.SetIsOnWithoutNotify(false);
+ m_SelectedMoneyType = ConfirmCancel.moneyType1;
+ }
+ UpdateMoneyDisplay(m_SelectedMoneyType, m_SelectedMoneyType == ConfirmCancel.moneyType1 ? m_NeedMoney1 : m_NeedMoney2);
+ }
+
+ void TrySelectMoneyType(int moneyType, int needCount)
+ {
+ long have = UIHelper.GetMoneyCnt(moneyType);
+ if (have < needCount)
+ {
+ // 璐у竵涓嶈冻锛屽脊鍑烘彁绀哄苟鍒囧洖鍘熸潵鐨勯�変腑椤�
+ string moneyName = ItemConfig.Get(UIHelper.GetItemIDWithMoneyType(moneyType))?.ItemName ?? moneyType.ToString();
+ SysNotifyMgr.Instance.ShowTip("LackMoney", moneyType);
+ // 鎭㈠鍘熸潵鐨勯�変腑
+ if (m_SelectedMoneyType == ConfirmCancel.moneyType1)
+ {
+ m_Toggle1.isOn = true;
+ }
+ else
+ {
+ m_Toggle2.isOn = true;
+ }
+ return;
+ }
+
+ m_SelectedMoneyType = moneyType;
+ UpdateMoneyDisplay(moneyType, needCount);
+ }
+
+ void UpdateMoneyDisplay(int moneyType, int needCount)
+ {
+ moneyIcon.SetIconWithMoneyType(moneyType);
+ moneyText.text = UIHelper.ShowUseMoney(moneyType, needCount);
+ // 鍒囨崲閫夐」鏃跺悓姝ュ埛鏂� Recharge6 鍐呭锛堣揣甯佸浘鏍�+鍚嶇О鍙樺寲锛�
+ m_Content.text = Language.Get("Recharge6", UIHelper.GetIconNameWithMoneyType(moneyType), ConfirmCancel.payMethodMoney, ConfirmCancel.payMethodTitle);
+ }
+
+ private void OnConfirm()
+ {
+ CloseWindow();
+ ConfirmCancel.OnDualToggleConfirmEvent?.Invoke(true, m_SelectedMoneyType);
+ }
+
+ private void OnCancel()
+ {
+ CloseWindow();
+ ConfirmCancel.OnDualToggleConfirmEvent?.Invoke(false, 0);
+ }
+}
diff --git a/Main/System/Tip/PayMethodConfirmWin.cs.meta b/Main/System/Tip/PayMethodConfirmWin.cs.meta
new file mode 100644
index 0000000..23036e1
--- /dev/null
+++ b/Main/System/Tip/PayMethodConfirmWin.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 50571468d2b150c4bb75e29bc2c7179d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Main/Utility/EnumHelper.cs b/Main/Utility/EnumHelper.cs
index 31ec754..46e3ec0 100644
--- a/Main/Utility/EnumHelper.cs
+++ b/Main/Utility/EnumHelper.cs
@@ -558,7 +558,7 @@
PrizeCoin = 120, //濂栧姳鐐瑰埜鏁� 120
ExAttr11 = 121, //鎵╁睍灞炴��11 121 鐜伴噾浠e竵锛堜唬閲戝埜锛�
ExAttr12 = 122, //鎵╁睍灞炴��12 璁板綍绂诲紑淇℃伅锛屼富鍔ㄧ寮�娆℃暟*100 + 琚涪娆℃暟*10 + 鏈�鍚庝竴娆℃槸鍚︿富鍔ㄧ寮�鐨勶紝鏆傛椂鏈�澶氱疮璁¤褰曞埌9娆�
- ExAttr13 = 123, //鎵╁睍灞炴��13 鏈嶅姟鍣ㄧ粍ID
+ ExAttr13 = 123, //鎵╁睍灞炴��13 鐜伴噾绀煎埜锛堣揣甯佺被鍨�97锛�
ExAttr14 = 124, //鎵╁睍灞炴��14 124
SkillAtkRate = 125, ///鎴樻枟灞炴��--鎶�鑳芥敾鍑讳激瀹� 125
diff --git a/Main/Utility/UIHelper.cs b/Main/Utility/UIHelper.cs
index b8da6c1..4ff6bba 100644
--- a/Main/Utility/UIHelper.cs
+++ b/Main/Utility/UIHelper.cs
@@ -1128,6 +1128,7 @@
{55, PlayerDataType.OSGalaScore},
{57, PlayerDataType.QYScore},
{58, PlayerDataType.heroSkin},
+ {97, PlayerDataType.ExAttr13},
{99, PlayerDataType.ExAttr11},
};
@@ -1301,6 +1302,11 @@
//鏃惰璐у竵
return PlayerDatas.Instance.GetPlayerDataByType(PlayerDataType.heroSkin);
}
+ case 97:
+ {
+ //鐜伴噾绀煎埜锛堜唬閲戝埜锛�
+ return PlayerDatas.Instance.baseData.cashVoucher;
+ }
case 98:
{
//杩囨湡鍨嬩唬閲戝埜
@@ -1318,7 +1324,7 @@
public static int GetAllVourcher()
{
- return (int)GetMoneyCnt(98) + (int)GetMoneyCnt(99);
+ return (int)GetMoneyCnt(97) + (int)GetMoneyCnt(98) + (int)GetMoneyCnt(99);
}
//鏄剧ず鏁伴噺, 鏍煎紡n/m, 瓒冲缁胯壊涓嶈冻绾㈣壊
--
Gitblit v1.8.0