fix:1、sdk更换。2、修复bug
This commit is contained in:
@@ -5,6 +5,7 @@ using DG.Tweening;
|
||||
using Spine.Unity;
|
||||
using System.Text;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using Random = UnityEngine.Random;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
@@ -377,6 +378,32 @@ namespace ChillConnect
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
public static ExchangeRate GetExchangeRateVo()
|
||||
{
|
||||
var code = "JP";//GetCurrCountry();
|
||||
var voList = ConfigSystem.GetConfig<ExchangeRateModel>().DataList;
|
||||
foreach (var exchangeRateVo in voList.Where(exchangeRateVo => exchangeRateVo.CountryKey.Contains(code)))
|
||||
{
|
||||
return exchangeRateVo;
|
||||
}
|
||||
return voList[0];
|
||||
}
|
||||
|
||||
public static string GetCurrCountry()
|
||||
{
|
||||
string countryCode = "US";
|
||||
try
|
||||
{
|
||||
countryCode = RegionInfo.CurrentRegion.TwoLetterISORegionName;
|
||||
Debug.Log("国家代码: " + countryCode); // 例如:US, CN, JP, DE 等
|
||||
}
|
||||
catch (System.Exception e)
|
||||
{
|
||||
Debug.LogError("无法获取国家代码: " + e.Message);
|
||||
}
|
||||
return countryCode.ToUpper();
|
||||
}
|
||||
|
||||
public static string GetPlayerInviteCode()
|
||||
{
|
||||
@@ -459,7 +486,7 @@ namespace ChillConnect
|
||||
//is debug test--------
|
||||
|
||||
|
||||
// return true;//zhushi
|
||||
return true;//zhushi
|
||||
// return false;//zhushi
|
||||
// return false;//zhushi
|
||||
return GetLoginModel().IsMagic;
|
||||
@@ -542,7 +569,8 @@ namespace ChillConnect
|
||||
{
|
||||
currency102 = DataMgr.Ticket.Value;
|
||||
}
|
||||
|
||||
var exchangeRateVo = GetExchangeRateVo();
|
||||
currency102 = (decimal)exchangeRateVo.Multi * currency102;
|
||||
if (IsGiftSwitch())
|
||||
{
|
||||
if (isRDExchangeMode())
|
||||
@@ -551,7 +579,7 @@ namespace ChillConnect
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"${currency102:N}";
|
||||
return $"{exchangeRateVo.Payicon}{currency102:N}";
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -568,14 +596,16 @@ namespace ChillConnect
|
||||
|
||||
public static string getChString(decimal ch)
|
||||
{
|
||||
var exchangeRateVo = GetExchangeRateVo();
|
||||
ch = (decimal)exchangeRateVo.Multi * ch;
|
||||
if (GameHelper.isRDExchangeMode()&&GameHelper.IsGiftSwitch())
|
||||
{
|
||||
string str = "<img src='ui://o9974uc5qbo98'/>";
|
||||
return str + $"$ {ch:N}";
|
||||
return str + $"{exchangeRateVo.Payicon}{ch:N}";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"${ch:N}";
|
||||
return $"{exchangeRateVo.Currency}{ch:N}";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -615,12 +645,14 @@ namespace ChillConnect
|
||||
GameHelper.ShowTips("Trying to call send mail...");
|
||||
}
|
||||
|
||||
public static string GetCurrCountry()
|
||||
{
|
||||
var loginModel = GetLoginModel();
|
||||
var country = loginModel.Country;
|
||||
return country.ToUpper();
|
||||
}
|
||||
// public static string GetCurrCountry()
|
||||
// {
|
||||
// var loginModel = GetLoginModel();
|
||||
// var country = loginModel.Country;
|
||||
// return country.ToUpper();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
public static bool CheckAccountValidly(string account)
|
||||
{
|
||||
@@ -1344,7 +1376,7 @@ namespace ChillConnect
|
||||
|
||||
return types;
|
||||
}
|
||||
|
||||
public static bool IsTemporaryEnd;
|
||||
|
||||
private static GameObject RainPlayUI;
|
||||
|
||||
@@ -1361,13 +1393,17 @@ namespace ChillConnect
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsTemporaryEnd;
|
||||
|
||||
private static int ShowStatementViewCount = 0;
|
||||
public static void ShowStatementView()
|
||||
{
|
||||
if (ShowStatementViewCount > 0) return;
|
||||
if (!IsGiftSwitch()) return;
|
||||
if (ConfigSystem.GetConfig<CommonModel>().StatementSwitch == 0)
|
||||
{
|
||||
HallManager.Instance.openTipsTimes++;
|
||||
ShowStatementViewCount++;
|
||||
return;
|
||||
}
|
||||
|
||||
ShowStatementViewCount++;
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.StatementViewUI_Open);
|
||||
@@ -1375,12 +1411,7 @@ namespace ChillConnect
|
||||
public static void IsShowPettyReward()
|
||||
{
|
||||
if (!IsGiftSwitch()) return;
|
||||
|
||||
Debug.Log($"PreferencesMgr.Instance.IsGetPettyReward===={SaveData.GetSaveObject().IsGetPettyReward}");
|
||||
if (SaveData.GetSaveObject().IsGetPettyReward) return;
|
||||
|
||||
SaveData.GetSaveObject().IsGetPettyReward = true;
|
||||
SaveData.saveDataFunc();
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PettyAwardUI_Open);
|
||||
}
|
||||
|
||||
@@ -1389,7 +1420,9 @@ namespace ChillConnect
|
||||
{
|
||||
// if (!GameHelper.IsGiftSwitch())
|
||||
var isGet = SaveData.GetSaveObject().IsGetFirstReward;
|
||||
if (loginModel.NewPlayer || !isGet )
|
||||
Debug.Log($"NewPlayer===={GetLoginModel().NewPlayer}");
|
||||
|
||||
if (GetLoginModel().NewPlayer )
|
||||
{
|
||||
if (IsGiftSwitch())
|
||||
{
|
||||
@@ -1400,6 +1433,9 @@ namespace ChillConnect
|
||||
var awardNum = ConfigSystem.GetConfig<CommonModel>().InitialNum;
|
||||
addMoney(awardNum);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update102);
|
||||
|
||||
//小额发放
|
||||
IsShowPettyReward();
|
||||
}
|
||||
|
||||
AddGoldNumber(50);
|
||||
@@ -1632,7 +1668,6 @@ namespace ChillConnect
|
||||
}
|
||||
public static string getDesByKey(string key)
|
||||
{
|
||||
Debug.Log(key);
|
||||
Debug.Log(JsonConvert.SerializeObject(ConfigSystem.GetConfig<ExchangeDesModel>().DataList));
|
||||
if (isRDExchangeMode())
|
||||
{
|
||||
@@ -1694,11 +1729,15 @@ namespace ChillConnect
|
||||
}
|
||||
public static string getPrice(decimal ch)
|
||||
{
|
||||
return $"${ch:N}";
|
||||
var vo = GetExchangeRateVo();
|
||||
ch *= (decimal)vo.Multi;
|
||||
return $"{vo.Payicon}{ch:N}";
|
||||
}
|
||||
public static string GetPriceInt(decimal ch)
|
||||
{
|
||||
return $"${ch:N0}";
|
||||
var vo = GetExchangeRateVo();
|
||||
ch *= (decimal)vo.Multi;
|
||||
return $"{vo.Payicon}{ch:N0}";
|
||||
}
|
||||
public static void CopyText(string text)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user