提交
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77c9a25febe54dffbb6afade123b3a42
|
||||
timeCreated: 1692267362
|
||||
@@ -0,0 +1,207 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class ConsumeSystem : BaseSystem
|
||||
{
|
||||
public ConsumeSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.ConsumeResources, OnConsumeResources);
|
||||
}
|
||||
|
||||
private void OnConsumeResources(object obj)
|
||||
{
|
||||
ConsumeVal consumeVal = (ConsumeVal)obj;
|
||||
|
||||
int consumeSuccessCount = 0;
|
||||
for (var index = 0; index < consumeVal.ItemId.Count; index++)
|
||||
{
|
||||
var item = consumeVal.ItemId[index];
|
||||
var itemValue = consumeVal.ItemVal[index];
|
||||
switch (item)
|
||||
{
|
||||
case 101:
|
||||
if (itemValue <= GameHelper.Get102())
|
||||
{
|
||||
consumeSuccessCount++;
|
||||
}
|
||||
else
|
||||
{
|
||||
GameHelper.ShowTips("No enough", true);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (consumeVal.isConsume)
|
||||
{
|
||||
if (consumeSuccessCount == consumeVal.ItemId.Count)
|
||||
{
|
||||
for (var index = 0; index < consumeVal.ItemId.Count; index++)
|
||||
{
|
||||
var item = consumeVal.ItemId[index];
|
||||
var itemValue = consumeVal.ItemVal[index];
|
||||
switch (item)
|
||||
{
|
||||
case 101:
|
||||
if (itemValue <= GameHelper.Get102())
|
||||
{
|
||||
PreferencesMgr.Instance.Currency102 -= itemValue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
consumeVal.onfinish?.Invoke(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
consumeVal.onfinish?.Invoke(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
consumeVal.onfinish?.Invoke(consumeSuccessCount == consumeVal.ItemId.Count);
|
||||
}
|
||||
|
||||
consumeVal.Release();
|
||||
}
|
||||
|
||||
#region 消耗资源
|
||||
|
||||
public static void Consume(int itemId, int itemNum, Action<bool> onCompleted = null, bool isConsume = true)
|
||||
{
|
||||
ConsumeVal consumeVal = ConsumeVal.Get(itemId, itemNum, onCompleted);
|
||||
consumeVal.isConsume = isConsume;
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.ConsumeResources, consumeVal);
|
||||
}
|
||||
|
||||
public static void Consume(int itemId, decimal itemNum, Action<bool> onCompleted = null, bool isConsume = true)
|
||||
{
|
||||
ConsumeVal consumeVal = ConsumeVal.Get(itemId, itemNum, onCompleted);
|
||||
consumeVal.isConsume = isConsume;
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.ConsumeResources, consumeVal);
|
||||
}
|
||||
|
||||
|
||||
public static void Consume(int[] itemIds, int[] itemNums, Action<bool> onCompleted = null,
|
||||
bool isConsume = true)
|
||||
{
|
||||
ConsumeVal consumeVal = ConsumeVal.Get();
|
||||
consumeVal.onfinish = onCompleted;
|
||||
for (int i = 0; i < itemIds.Length; i++)
|
||||
{
|
||||
consumeVal.AddConsume(itemIds[i], itemNums[i]);
|
||||
}
|
||||
|
||||
consumeVal.isConsume = isConsume;
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.ConsumeResources, consumeVal);
|
||||
}
|
||||
|
||||
public static void Consume(int[] itemIds, decimal[] itemNums, Action<bool> onCompleted = null,
|
||||
bool isConsume = true)
|
||||
{
|
||||
ConsumeVal consumeVal = ConsumeVal.Get();
|
||||
consumeVal.onfinish = onCompleted;
|
||||
for (int i = 0; i < itemIds.Length; i++)
|
||||
{
|
||||
consumeVal.AddConsume(itemIds[i], itemNums[i]);
|
||||
}
|
||||
|
||||
consumeVal.isConsume = isConsume;
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.ConsumeResources, consumeVal);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static void CheckItem(int itemId, int itemNum, Action<bool> onCompleted = null)
|
||||
{
|
||||
Consume(itemId, itemNum, onCompleted, false);
|
||||
}
|
||||
|
||||
public static void CheckItem(int itemId, decimal itemNum, Action<bool> onCompleted = null)
|
||||
{
|
||||
Consume(itemId, itemNum, onCompleted, false);
|
||||
}
|
||||
|
||||
public static void CheckItem(int[] itemId, int[] itemNum, Action<bool> onCompleted = null)
|
||||
{
|
||||
Consume(itemId, itemNum, onCompleted, false);
|
||||
}
|
||||
|
||||
public static void CheckItem(int[] itemId, decimal[] itemNum, Action<bool> onCompleted = null)
|
||||
{
|
||||
Consume(itemId, itemNum, onCompleted, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class ConsumeVal
|
||||
{
|
||||
private static ObjectPool<ConsumeVal> _pool = new ObjectPool<ConsumeVal>();
|
||||
|
||||
public static ConsumeVal Get()
|
||||
{
|
||||
ConsumeVal val = _pool.Get();
|
||||
return val;
|
||||
}
|
||||
|
||||
public static ConsumeVal Get(int id, decimal sum)
|
||||
{
|
||||
return Get(id, sum);
|
||||
}
|
||||
|
||||
public static ConsumeVal Get(int id, decimal sum, Action<bool> finish = null)
|
||||
{
|
||||
ConsumeVal val = _pool.Get();
|
||||
val.AddConsume(id, sum);
|
||||
val.onfinish = finish;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
public void Release()
|
||||
{
|
||||
ItemId.Clear();
|
||||
ItemVal.Clear();
|
||||
isConsume = true;
|
||||
onfinish = null;
|
||||
_pool.Release(this);
|
||||
}
|
||||
|
||||
public ConsumeVal()
|
||||
{
|
||||
}
|
||||
|
||||
public Action<bool> onfinish;
|
||||
|
||||
public List<int> ItemId = new List<int>();
|
||||
public List<decimal> ItemVal = new List<decimal>();
|
||||
|
||||
public bool isConsume = true;
|
||||
|
||||
public void AddConsume(int id, decimal sum)
|
||||
{
|
||||
ItemId.Add(id);
|
||||
ItemVal.Add(sum);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fcd01defe47f4c65b155e8edb148d1cc
|
||||
timeCreated: 1692785015
|
||||
@@ -0,0 +1,558 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class GameDataSystem : BaseSystem
|
||||
{
|
||||
public Action UpdateSecondEvent;
|
||||
|
||||
private Action onChangeDollar;
|
||||
|
||||
private Action onChangeGiftSwitch;
|
||||
|
||||
public GameDataSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.Game_StartBefore, InitPreferences);
|
||||
PreferencesDispatcher<decimal>.Instance.AddListener(PreferencesMsg.currency102, OnChange102);
|
||||
PreferencesDispatcher<float>.Instance.AddListener(PreferencesMsg.playReawrd111, OnChange111);
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.GameNewDays, NewDay);
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.Module_GiftSwitchChange, OnChangeGiftSwitch);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.RefreshADTask, RefreshADTaskData);
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.WatchVideoFinish, AddWatchVideo);
|
||||
CtrlDispatcher.Instance.AddListener(CtrlMsg.WatchIntVideoFinish, AddIntWatchVideo);
|
||||
|
||||
PreferencesDispatcher<bool>.Instance.AddListener(PreferencesMsg.isShowRewardFly101, OnChangeRewardFly101);
|
||||
PreferencesDispatcher<bool>.Instance.AddListener(PreferencesMsg.isShowRewardFly111, OnChangeRewardFly111);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.ProcessReward, OnGetReward);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.RefreshMakeupData, OnRefreshMakeupData);
|
||||
|
||||
}
|
||||
|
||||
private void OnChangeGiftSwitch(object obj)
|
||||
{
|
||||
onChangeGiftSwitch?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
private void InitPreferences(object obj)
|
||||
{
|
||||
if (GameHelper.Get102() == -1)
|
||||
{
|
||||
PreferencesMgr.Instance.Currency102 = 0;
|
||||
}
|
||||
|
||||
// if (PreferencesMgr.Instance.PlayerName.IsNullOrWhiteSpace())
|
||||
// {
|
||||
// PreferencesMgr.Instance.PlayerName = "CrazyZoo";
|
||||
// }
|
||||
|
||||
if (!GameHelper.IsContinuousSignIn())
|
||||
{
|
||||
PreferencesMgr.Instance.SignState.Clear();
|
||||
PreferencesMgr.Instance.SaveSignState();
|
||||
}
|
||||
|
||||
if (PreferencesMgr.Instance.PlayerName.IsNullOrWhiteSpace())
|
||||
{
|
||||
if (ModuleManager.Instance.GetModel(ModelConst.LoginModel) is LoginModel loginModel)
|
||||
{
|
||||
PreferencesMgr.Instance.PlayerName = loginModel.invite_code;
|
||||
}
|
||||
}
|
||||
|
||||
PreferencesMgr.Instance.IsShowRewardFly101 = false;
|
||||
PreferencesMgr.Instance.IsShowRewardFly102 = false;
|
||||
|
||||
InitAchievement();
|
||||
|
||||
CheckMakeupTaskData();
|
||||
|
||||
|
||||
PreferencesMgr.Instance.IsLastH5Tab = true;
|
||||
}
|
||||
|
||||
|
||||
private void OnRefreshMakeupData(object obj)
|
||||
{
|
||||
AddMakeupTaskData();
|
||||
}
|
||||
|
||||
|
||||
private void CheckMakeupTaskData()
|
||||
{
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory.Count == 0)
|
||||
{
|
||||
AddMakeupTaskData();
|
||||
}
|
||||
else
|
||||
{
|
||||
var common = ConfigSystem.GetConfig<CommonModel>();
|
||||
|
||||
foreach (var makeuptaskData in PreferencesMgr.Instance.MakeupTaskHistory)
|
||||
{
|
||||
if (makeuptaskData.status == MakeupTaskStatus.Inline
|
||||
&& makeuptaskData.inlineNum > common.inlineMin)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var redeemVOModel = ConfigSystem.GetConfig<MakeupModel>().dataList
|
||||
.FirstOrDefault(redeem => redeem.id == makeuptaskData.tableId);
|
||||
|
||||
var days = PlayerPrefs.GetInt($"days_{NetworkKit.userId}_{makeuptaskData.tableId}", 0);
|
||||
if (days == DateTime.Today.Day)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerPrefs.SetInt($"days_{NetworkKit.userId}_{makeuptaskData.tableId}", DateTime.Today.Day);
|
||||
var loginNum = CommonHelper.RandomRange(common.inlineLoginDown[0],
|
||||
common.inlineLoginDown[1]);
|
||||
makeuptaskData.loginSpeedNum += loginNum;
|
||||
//如果登录减少人数大于配置的阈值,则不能减少排名了
|
||||
Debug.Log($"登录累计增加的排名为:{makeuptaskData.loginSpeedNum} 阈值为:{redeemVOModel.Login_Limit_times}");
|
||||
if (makeuptaskData.loginSpeedNum > redeemVOModel.Login_Limit_times)
|
||||
{
|
||||
makeuptaskData.loginSpeedNum = redeemVOModel.Login_Limit_times;
|
||||
continue;
|
||||
}
|
||||
|
||||
//Debug.Log($"订单为: {makeuptaskData.tableId} 通过登录减少的排名为:{loginNum}");
|
||||
makeuptaskData.inlineNum -= loginNum;
|
||||
if (makeuptaskData.inlineNum < common.inlineMin)
|
||||
{
|
||||
makeuptaskData.inlineNum = common.inlineMin;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
PreferencesMgr.Instance.SaveMakeupTaskHistory();
|
||||
}
|
||||
if (SaveData.GetSaveobject().saveingpot_history.Count == 0)
|
||||
{
|
||||
// Debug.Log("tianjialishiiiiiiiiiiiiii");
|
||||
// AddMakeupTaskData();
|
||||
}
|
||||
else
|
||||
{
|
||||
var common = ConfigSystem.GetConfig<CommonModel>();
|
||||
foreach (var makeuptaskData in SaveData.GetSaveobject().saveingpot_history)
|
||||
{
|
||||
if (makeuptaskData.status == SaveingPotTaskStatus.Inline
|
||||
&& makeuptaskData.inlineNum > common.inlineMin)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var redeemVOModel = ConfigSystem.GetConfig<MakeupModel_2>().dataList
|
||||
.FirstOrDefault(redeem => redeem.id == makeuptaskData.tableId);
|
||||
|
||||
var days = PlayerPrefs.GetInt($"days_{NetworkKit.userId}_{makeuptaskData.tableId}_pot", 0);
|
||||
if (days == DateTime.Today.Day)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
PlayerPrefs.SetInt($"days_{NetworkKit.userId}_{makeuptaskData.tableId}_pot", DateTime.Today.Day);
|
||||
var loginNum = CommonHelper.RandomRange(common.inlineLoginDown[0],
|
||||
common.inlineLoginDown[1]);
|
||||
makeuptaskData.loginSpeedNum += loginNum;
|
||||
//如果登录减少人数大于配置的阈值,则不能减少排名了
|
||||
// Debug.Log($"登录累计增加的排名为:{makeuptaskData.loginSpeedNum} 阈值为:{redeemVOModel.Login_Limit_times}");
|
||||
if (makeuptaskData.loginSpeedNum > redeemVOModel.Login_Limit_times)
|
||||
{
|
||||
makeuptaskData.loginSpeedNum = redeemVOModel.Login_Limit_times;
|
||||
continue;
|
||||
}
|
||||
|
||||
//Debug.Log($"订单为: {makeuptaskData.tableId} 通过登录减少的排名为:{loginNum}");
|
||||
makeuptaskData.inlineNum -= loginNum;
|
||||
if (makeuptaskData.inlineNum < common.inlineMin)
|
||||
{
|
||||
makeuptaskData.inlineNum = common.inlineMin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SaveData.saveDataFunc();
|
||||
}
|
||||
|
||||
private void CheckSpeedUpTaskData(int type = 1)
|
||||
{
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var common = ConfigSystem.GetConfig<CommonModel>();
|
||||
|
||||
if (type == 1 && PreferencesMgr.Instance.MakeupTaskHistory.Count > 0)
|
||||
{
|
||||
foreach (var makeuptaskData in PreferencesMgr.Instance.MakeupTaskHistory)
|
||||
{
|
||||
if (makeuptaskData.status == MakeupTaskStatus.Inline
|
||||
&& makeuptaskData.inlineNum > common.inlineMin)
|
||||
{
|
||||
var redeemVOModel = ConfigSystem.GetConfig<MakeupModel>().dataList
|
||||
.FirstOrDefault(redeem => redeem.id == makeuptaskData.tableId);
|
||||
|
||||
var dowmNum = redeemVOModel.AD_Down;
|
||||
// Debug.Log($"CheckSpeedUpTaskData dowmNum=== {dowmNum} makeuptaskData.WatchVideoSpeedNum ==== {makeuptaskData.WatchVideoSpeedNum}");
|
||||
|
||||
makeuptaskData.WatchVideoSpeedNum += dowmNum;
|
||||
//如果看广告的减少人数大于配置的阈值,则不能减少排名了
|
||||
if (makeuptaskData.WatchVideoSpeedNum > redeemVOModel.AD_Limit_times)
|
||||
{
|
||||
makeuptaskData.WatchVideoSpeedNum = redeemVOModel.AD_Limit_times;
|
||||
continue;
|
||||
}
|
||||
|
||||
//Debug.Log($"订单为: {makeuptaskData.tableId} 通过看广告减少的排名为:{dowmNum}");
|
||||
makeuptaskData.inlineNum -= dowmNum;
|
||||
//Debug.Log($"订单为: {makeuptaskData.tableId} 减少后的排名:{makeuptaskData.inlineNum}");
|
||||
if (makeuptaskData.inlineNum < common.inlineMin)
|
||||
{
|
||||
makeuptaskData.inlineNum = common.inlineMin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (type == 2 && SaveData.GetSaveobject().saveingpot_history.Count > 0)
|
||||
{
|
||||
foreach (var makeuptaskData in SaveData.GetSaveobject().saveingpot_history)
|
||||
{
|
||||
if (makeuptaskData.status == SaveingPotTaskStatus.Inline
|
||||
&& makeuptaskData.inlineNum > common.inlineMin)
|
||||
{
|
||||
var redeemVOModel = ConfigSystem.GetConfig<MakeupModel_2>().dataList
|
||||
.FirstOrDefault(redeem => redeem.id == makeuptaskData.tableId);
|
||||
|
||||
var dowmNum = redeemVOModel.AD_Down;
|
||||
// Debug.Log($"CheckSpeedUpTaskData dowmNum=== {dowmNum} makeuptaskData.WatchVideoSpeedNum ==== {makeuptaskData.WatchVideoSpeedNum}");
|
||||
|
||||
makeuptaskData.WatchVideoSpeedNum += dowmNum;
|
||||
//如果看广告的减少人数大于配置的阈值,则不能减少排名了
|
||||
if (makeuptaskData.WatchVideoSpeedNum > redeemVOModel.AD_Limit_times)
|
||||
{
|
||||
makeuptaskData.WatchVideoSpeedNum = redeemVOModel.AD_Limit_times;
|
||||
continue;
|
||||
}
|
||||
|
||||
//Debug.Log($"订单为: {makeuptaskData.tableId} 通过看广告减少的排名为:{dowmNum}");
|
||||
makeuptaskData.inlineNum -= dowmNum;
|
||||
//Debug.Log($"订单为: {makeuptaskData.tableId} 减少后的排名:{makeuptaskData.inlineNum}");
|
||||
if (makeuptaskData.inlineNum < common.inlineMin)
|
||||
{
|
||||
makeuptaskData.inlineNum = common.inlineMin;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void AddMakeupTaskData()
|
||||
{
|
||||
var makeupVOModel = ConfigSystem.GetConfig<MakeupModel>();
|
||||
if (makeupVOModel == null || makeupVOModel.dataList == null || makeupVOModel.dataList.Count <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
var lastId = -1;
|
||||
|
||||
var isRepeat = PreferencesMgr.Instance.MakeupTaskHistory.Count >= makeupVOModel.dataList.Count;
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory.Count > 0)
|
||||
{
|
||||
var makeupTaskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
|
||||
if (makeupTaskData.status != MakeupTaskStatus.Inline)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
lastId = makeupTaskData.tableId;
|
||||
}
|
||||
|
||||
|
||||
if (lastId == makeupVOModel.dataList.Last().id)
|
||||
{
|
||||
lastId = -1;
|
||||
}
|
||||
|
||||
foreach (var makeupVo in makeupVOModel.dataList)
|
||||
{
|
||||
if (makeupVo.id > lastId)
|
||||
{
|
||||
if ((isRepeat && !makeupVo.is_onetime) || !isRepeat)
|
||||
{
|
||||
var makeupTaskData = new MakeupTaskData();
|
||||
makeupTaskData.tableId = makeupVo.id;
|
||||
makeupTaskData.id = PreferencesMgr.Instance.MakeupTaskHistory.Count + 1;
|
||||
makeupTaskData.amountStr = $"{GameHelper.Get102Str(makeupVo.item_need)}";
|
||||
makeupTaskData.amount = makeupVo.item_need;
|
||||
makeupTaskData.orderID = GameHelper.GetRandomNum(8);
|
||||
|
||||
PreferencesMgr.Instance.MakeupTaskHistory.Add(makeupTaskData);
|
||||
makeupTaskData.SetStatus(MakeupTaskStatus.None);
|
||||
PreferencesMgr.Instance.SaveMakeupTaskHistory();
|
||||
|
||||
PreferencesMgr.Instance.MakeupTaskH5Time = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InitAchievement()
|
||||
{
|
||||
var achieveVOModel = ConfigSystem.GetConfig<AchieveModel>();
|
||||
if (PreferencesMgr.Instance.AchievementAnswerList.Count == 0 && achieveVOModel != null &&
|
||||
achieveVOModel.dataList.Count > 0)
|
||||
{
|
||||
var achieveVo = achieveVOModel.dataList[0];
|
||||
for (var i = 0; i < achieveVo.tol_num.Length; i++)
|
||||
{
|
||||
PreferencesMgr.Instance.AchievementAnswerList.Add(false);
|
||||
}
|
||||
}
|
||||
|
||||
if (PreferencesMgr.Instance.AchievementSignInList.Count == 0 && achieveVOModel != null &&
|
||||
achieveVOModel.dataList.Count > 0)
|
||||
{
|
||||
var achieveVo = achieveVOModel.dataList[1];
|
||||
for (var i = 0; i < achieveVo.tol_num.Length; i++)
|
||||
{
|
||||
PreferencesMgr.Instance.AchievementSignInList.Add(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnChange102(ChangeValue<decimal> obj)
|
||||
{
|
||||
var val = obj.newValue - obj.oldValue;
|
||||
if (val > 0)
|
||||
{
|
||||
PreferencesMgr.Instance.MaxCurrency102 += val;
|
||||
}
|
||||
|
||||
if (!PreferencesMgr.Instance.IsShowRewardFly101)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update102Completed);
|
||||
}
|
||||
|
||||
onChangeDollar?.Invoke();
|
||||
}
|
||||
|
||||
|
||||
private void OnChange111(ChangeValue<float> obj)
|
||||
{
|
||||
if (!PreferencesMgr.Instance.IsShowRewardFly111)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update111Completed);
|
||||
}
|
||||
}
|
||||
|
||||
private void NewDay(object obj)
|
||||
{
|
||||
PreferencesMgr.Instance.IsShowOpenReward = true;
|
||||
}
|
||||
|
||||
private void RefreshADTaskData(object obj = null)
|
||||
{
|
||||
}
|
||||
private void AddIntWatchVideo(object obj = null)
|
||||
{
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory.Count > 0)
|
||||
{
|
||||
CheckSpeedUpTaskData();
|
||||
}
|
||||
}
|
||||
private void AddWatchVideo(object obj = null)
|
||||
{
|
||||
PreferencesMgr.Instance.VideoWatchCount++;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshTodoUI);
|
||||
|
||||
if (PreferencesMgr.Instance.MakeupTaskHistory.Count > 0)
|
||||
{
|
||||
CheckSpeedUpTaskData();
|
||||
|
||||
var taskData = PreferencesMgr.Instance.MakeupTaskHistory.Last();
|
||||
if (taskData.status == MakeupTaskStatus.Task)
|
||||
{
|
||||
var makeupVo = ConfigSystem.GetConfig<MakeupModel>().GetData(taskData.tableId);
|
||||
if (makeupVo != null && taskData.videoCount < makeupVo.ad_need)
|
||||
{
|
||||
taskData.videoCount++;
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.ad_task, BuriedPointEvent.watch_ad_number, 1);
|
||||
PreferencesMgr.Instance.SaveMakeupTaskHistory();
|
||||
PlayerPrefs.SetInt("fin_ad_num", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerPrefs.GetInt("fin_ad_num", 0) == 0)
|
||||
{
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.ad_task, BuriedPointEvent.finish_ad_number, 1);
|
||||
PlayerPrefs.SetInt("fin_ad_num", 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (SaveData.GetSaveobject().saveingpot_history.Count > 0)
|
||||
{
|
||||
SaveingPotHelper.TestingClearTime();
|
||||
CheckSpeedUpTaskData(2);
|
||||
SaveingPotClass taskData = SaveData.GetSaveobject().saveingpot_history.Last();
|
||||
Makeup_2 makeupVo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(taskData.tableId);
|
||||
SaveData.GetSaveobject().saveingpot_cash += makeupVo.ADIncrease;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshSaveingPot);
|
||||
if (ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1 && GameHelper.IsGiftSwitch())
|
||||
{
|
||||
if ((SaveData.GetSaveobject().saveingpot_cash > taskData.amount) && (!taskData.auto_show) && !UIManager.Instance.IsExistUI(UIConst.H5UI))
|
||||
{
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.SaveingPotUI_Open);
|
||||
taskData.auto_show = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (taskData.status == SaveingPotTaskStatus.Task)
|
||||
{
|
||||
;
|
||||
if (makeupVo != null && taskData.videoCount < makeupVo.ad_need)
|
||||
{
|
||||
taskData.videoCount++;
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.ad_task, BuriedPointEvent.watch_ad_number, 1);
|
||||
PlayerPrefs.SetInt("fin_ad_num_saveingpot", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (PlayerPrefs.GetInt("fin_ad_num_saveingpot", 0) == 0)
|
||||
{
|
||||
NetworkKit.BuriedPoint(BuriedPointEvent.ad_task, BuriedPointEvent.finish_ad_number, 1);
|
||||
PlayerPrefs.SetInt("fin_ad_num_saveingpot", 1);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void OnChangeRewardFly101(ChangeValue<bool> obj)
|
||||
{
|
||||
var oldValue = obj.oldValue;
|
||||
var newValue = obj.newValue;
|
||||
|
||||
InitChangeRewardFly(101, oldValue, newValue);
|
||||
}
|
||||
|
||||
private void OnChangeRewardFly111(ChangeValue<bool> obj)
|
||||
{
|
||||
var oldValue = obj.oldValue;
|
||||
var newValue = obj.newValue;
|
||||
|
||||
InitChangeRewardFly(111, oldValue, newValue);
|
||||
}
|
||||
|
||||
private void InitChangeRewardFly(int id, bool oldValue, bool newValue)
|
||||
{
|
||||
if (oldValue)
|
||||
{
|
||||
if (newValue)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 101:
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update102Completed);
|
||||
break;
|
||||
case 102:
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update102Completed);
|
||||
break;
|
||||
case 111:
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update111Completed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (newValue)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnGetReward(object obj)
|
||||
{
|
||||
if (obj is RewardData rewardModel)
|
||||
{
|
||||
foreach (var rewardData in rewardModel.GetRewardDataList())
|
||||
{
|
||||
ProcessData(rewardData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void ProcessData(RewardSingleData rewardSingleData)
|
||||
{
|
||||
if (rewardSingleData.origin == RewardOrigin.None)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (rewardSingleData.id)
|
||||
{
|
||||
case 101:
|
||||
GameHelper.AddGoldNumber((int)rewardSingleData.GetTotalValue());
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Gold_refresh);
|
||||
break;
|
||||
case 102:
|
||||
GameHelper.AddMoney((float)rewardSingleData.GetTotalValue());
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
|
||||
break;
|
||||
case 111:
|
||||
{
|
||||
var dollar = PreferencesMgr.Instance.PlayReawrd111;
|
||||
dollar += rewardSingleData.GetTotalValue();
|
||||
|
||||
PreferencesMgr.Instance.PlayReawrd111 = dollar;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b33f1a409b61479e9b014ab951bbff47
|
||||
timeCreated: 1692256149
|
||||
@@ -0,0 +1,206 @@
|
||||
using DG.Tweening;
|
||||
using ScrewsMaster;
|
||||
using UnityEngine;
|
||||
|
||||
public class RewardSystem : BaseSystem
|
||||
{
|
||||
public RewardSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
GameDispatcher.Instance.AddListener(GameMsg.GetReward, OnGetReward);
|
||||
}
|
||||
|
||||
|
||||
private void OnGetReward(object obj)
|
||||
{
|
||||
if (!(obj is RewardData rewardData))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (IsRewardDialog(rewardData))
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardUI_Open, rewardData);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IsRewardNumber(rewardData))
|
||||
{
|
||||
rewardData.OnCompleted(true);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.ProcessReward, rewardData);
|
||||
}
|
||||
else
|
||||
{
|
||||
GetReward(rewardData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static bool IsRewardFly(RewardData rewardData)
|
||||
{
|
||||
return (RewardDisplayType.RewardFly & rewardData.displayType) == RewardDisplayType.RewardFly;
|
||||
}
|
||||
|
||||
|
||||
public static bool IsRewardValueChange(RewardData rewardData)
|
||||
{
|
||||
return (RewardDisplayType.ValueChange & rewardData.displayType) == RewardDisplayType.ValueChange;
|
||||
}
|
||||
|
||||
|
||||
public static bool IsRewardNumber(RewardData rewardData)
|
||||
{
|
||||
return (RewardDisplayType.Number & rewardData.displayType) == RewardDisplayType.Number;
|
||||
}
|
||||
|
||||
|
||||
public static bool IsRewardDialog(RewardData rewardData)
|
||||
{
|
||||
return (RewardDisplayType.Dialog & rewardData.displayType) == RewardDisplayType.Dialog;
|
||||
}
|
||||
|
||||
|
||||
public static void GetReward(RewardData rewardData)
|
||||
{
|
||||
PlayReward(rewardData);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.ProcessReward, rewardData);
|
||||
}
|
||||
|
||||
private static Tween _tween;
|
||||
|
||||
|
||||
private static void PlayReward(RewardData rewardData)
|
||||
{
|
||||
if (rewardData == null) return;
|
||||
var completed = 0;
|
||||
foreach (var rewardSingleData in rewardData.GetRewardDataList())
|
||||
{
|
||||
var id = rewardSingleData.id;
|
||||
var sum = rewardSingleData.value;
|
||||
|
||||
if (sum <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
var isValueChange = IsRewardValueChange(rewardData);
|
||||
if (isValueChange)
|
||||
{
|
||||
if (rewardSingleData.endPosition == Vector2.zero && id is 101 or 102)
|
||||
{
|
||||
if (!UIManager.Instance.IsExistUI(UIConst.H5UI))
|
||||
{
|
||||
if (_tween is { active: true })
|
||||
{
|
||||
_tween?.Kill();
|
||||
}
|
||||
|
||||
GameHelper.OnRiseUI(id);
|
||||
}
|
||||
}
|
||||
else if (id == 111)
|
||||
{
|
||||
if (_tween is { active: true })
|
||||
{
|
||||
_tween?.Kill();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SetRewardValueChangeState(id, true);
|
||||
}
|
||||
|
||||
|
||||
if (!rewardSingleData.IsCanFly())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
var isNeedFly = IsRewardFly(rewardData);
|
||||
|
||||
var rewardDisplayModel = new RewardDisplayData(rewardSingleData)
|
||||
{
|
||||
isSingle = rewardData.isSingle,
|
||||
isPlayAudio = true,
|
||||
isNeedFly = isNeedFly,
|
||||
isNeedValueChange = isValueChange,
|
||||
audioName = AudioConst.CoinFly
|
||||
};
|
||||
|
||||
rewardDisplayModel.SetUpdate(changeValue => { OnChangeValue(id, changeValue); });
|
||||
rewardDisplayModel.SetUpdateComplete(() =>
|
||||
{
|
||||
completed++;
|
||||
if (isValueChange)
|
||||
{
|
||||
SetRewardValueChangeState(id, false);
|
||||
if (id == 101)
|
||||
{
|
||||
if (!UIManager.Instance.IsExistUI(UIConst.H5UI))
|
||||
{
|
||||
_tween = DOVirtual.DelayedCall(0.5f,
|
||||
() => { GameHelper.OnRiseUIRecover(id, UILayerType.Normal); });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (completed >= rewardData.GetRewardFlyCount())
|
||||
{
|
||||
rewardData.OnCompleted(true);
|
||||
}
|
||||
});
|
||||
|
||||
rewardSingleData.InitFlyPosition();
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardAniUI_Open, rewardDisplayModel);
|
||||
}
|
||||
}
|
||||
|
||||
private static void SetRewardValueChangeState(int id, bool isShow)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 101:
|
||||
PreferencesMgr.Instance.IsShowRewardFly101 = isShow;
|
||||
break;
|
||||
case 102:
|
||||
PreferencesMgr.Instance.IsShowRewardFly102 = isShow;
|
||||
break;
|
||||
case 111:
|
||||
PreferencesMgr.Instance.IsShowRewardFly111 = isShow;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnChangeValue(int id, decimal changeValue)
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case 101:
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update101, changeValue);
|
||||
break;
|
||||
case 102:
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update101, changeValue);
|
||||
break;
|
||||
case 111:
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.Update111, changeValue);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b41a4be29284494880840871bb69070a
|
||||
timeCreated: 1692696618
|
||||
@@ -0,0 +1,78 @@
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class WindowSystem : BaseSystem
|
||||
{
|
||||
public WindowSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
TaskSequence startGameSequence = new TaskSequence();
|
||||
TaskSequence backMainSequence = new TaskSequence();
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
CtrlDispatcher.Instance.AddOnceListener(CtrlMsg.Game_Start, StartGame);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.BackMainScene, BackMain);
|
||||
}
|
||||
|
||||
private void StartGame(object obj)
|
||||
{
|
||||
startGameSequence.Clear();
|
||||
|
||||
if (GameHelper.IsOpenGuide())
|
||||
{
|
||||
}
|
||||
|
||||
if (startGameSequence.Count == 0)
|
||||
{
|
||||
End();
|
||||
}
|
||||
else
|
||||
{
|
||||
startGameSequence.Run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void End()
|
||||
{
|
||||
}
|
||||
|
||||
private bool haveBackMain = false;
|
||||
|
||||
private void BackMain(object obj)
|
||||
{
|
||||
if (!GameHelper.IsGiftSwitch())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
backMainSequence.Clear();
|
||||
haveBackMain = true;
|
||||
backMainSequence.Run();
|
||||
}
|
||||
|
||||
private void AddRateUs(TaskSequence backMainSequence)
|
||||
{
|
||||
bool isAdd = 5 == PreferencesMgr.Instance.GameOfCount;
|
||||
|
||||
backMainSequence.Add(isAdd, (procedure) =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RateUsDialogUI_Open);
|
||||
UICtrlDispatcher.Instance.AddOnceListener(UICtrlMsg.RateUsDialogUI_Close,
|
||||
(e) => { procedure.InvokeComplete(); });
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1b4c0d23d2744f868b80f5ea89b2bddf
|
||||
timeCreated: 1692848262
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b8a1ab8e5a64e3f88ab5bca879f13d6
|
||||
timeCreated: 1692267374
|
||||
@@ -0,0 +1,487 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Roy;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class ConfigSystem : BaseSystem
|
||||
{
|
||||
|
||||
public const string ConfigFileNameKey = "configFileName";
|
||||
|
||||
public static List<GameUrls> light_weblist = new List<GameUrls>();
|
||||
public static List<GameUrls> dark_weblist = new List<GameUrls>();
|
||||
public static string web_through_str;
|
||||
private static readonly Dictionary<Type, object> ConfigData = new Dictionary<Type, object>();
|
||||
private LoginModel _loginModel;
|
||||
|
||||
private int _initConfigErrorCount;
|
||||
|
||||
public ConfigSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
NetworkDispatcher.Instance.AddListener(NetworkMsg.GetConfig, OnGetConfig);
|
||||
}
|
||||
|
||||
private void RemoveListener()
|
||||
{
|
||||
NetworkDispatcher.Instance.RemoveListener(NetworkMsg.GetConfig, OnGetConfig);
|
||||
}
|
||||
|
||||
private void OnGetConfig(object obj)
|
||||
{
|
||||
_initConfigErrorCount = 0;
|
||||
var reqData = new RespLoginFunnelData
|
||||
{
|
||||
type = "loadBegin",
|
||||
payload = ""
|
||||
};
|
||||
NetworkKit.PostFunnelLogin(reqData);//加载开始打点
|
||||
|
||||
OnRequestGetConfig();
|
||||
}
|
||||
|
||||
private void OnRequestGetConfig()
|
||||
{
|
||||
_loginModel = GameHelper.GetLoginModel();
|
||||
|
||||
if (_initConfigErrorCount > 6)
|
||||
{
|
||||
GameHelper.ShowTips("Configuration file failed to load, please try again later");
|
||||
return;
|
||||
}
|
||||
|
||||
// if (IsFirstLaunch())
|
||||
// {
|
||||
// FirstLaunchCopyConfig();// 进行首次启动的操作
|
||||
// return;
|
||||
// }
|
||||
|
||||
bool needDownloadConfigFile = HasNewConfig();
|
||||
//需要下载配置的话等待下载更新
|
||||
if (needDownloadConfigFile)
|
||||
{
|
||||
DownloadConfig();
|
||||
return;
|
||||
}
|
||||
|
||||
ReadLocalConfig();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 判断是首次打开游戏
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsFirstLaunch()
|
||||
{
|
||||
return !PlayerPrefs.HasKey("FirstLaunch");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置首次启动游戏
|
||||
/// </summary>
|
||||
private void SetFirstLaunch()
|
||||
{
|
||||
PlayerPrefs.SetInt("FirstLaunch", 1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 首次启动游戏拷贝配置文件到PersistentData目录下
|
||||
/// </summary>
|
||||
private void FirstLaunchCopyConfig()
|
||||
{
|
||||
SetFirstLaunch();
|
||||
FileNetworkManager.GetInstance.CopyStreamingAssetsToPersistentDataPath((result) =>
|
||||
{
|
||||
var isSuccess = false;
|
||||
if (result)
|
||||
{
|
||||
var names = FileNetworkManager.GetInstance.GetFileNamesFromPersistentDataPath(FileNetworkManager.FolderName);
|
||||
if (names.Length > 0)
|
||||
{
|
||||
PlayerPrefs.SetString(ConfigFileNameKey, names[0]);//项目当前文件中的配置版本
|
||||
isSuccess = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("拷贝文件失败");
|
||||
}
|
||||
|
||||
if (isSuccess)
|
||||
{
|
||||
OnRequestGetConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
_initConfigErrorCount++;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 下载配置文件
|
||||
/// </summary>
|
||||
private void DownloadConfig()
|
||||
{
|
||||
var cdnConfigFileName = _loginModel.setting;
|
||||
FileNetworkManager.GetInstance.ReadData($"{NetworkKit.CDNUrl}config/{cdnConfigFileName}", (result) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
PlayerPrefs.SetString(ConfigFileNameKey, cdnConfigFileName);//更新当前配置文件文件名
|
||||
FileNetworkManager.GetInstance.WriteToPersistentData(FileNetworkManager.GetInstance.GetConfigFOlderPath(), cdnConfigFileName, result);
|
||||
ReloadConfig(result);
|
||||
SaveingPotHelper.ResetHistory();
|
||||
}
|
||||
else
|
||||
{
|
||||
_initConfigErrorCount++;
|
||||
Debug.LogError("下载配置文件失败");
|
||||
ReadLocalConfig();
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 读取本地配置文件
|
||||
/// </summary>
|
||||
private void ReadLocalConfig()
|
||||
{
|
||||
string savedCfgName = PlayerPrefs.GetString(ConfigFileNameKey);
|
||||
var path = Path.Combine(FileNetworkManager.GetInstance.GetConfigFOlderPath(), savedCfgName);
|
||||
FileNetworkManager.GetInstance.ReadData(path, (result) =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(result))
|
||||
{
|
||||
ReloadConfig(result);
|
||||
}
|
||||
else
|
||||
{
|
||||
_initConfigErrorCount++;
|
||||
Debug.LogError("读取本地数据异常");
|
||||
// DownloadConfig();
|
||||
|
||||
//读取本地配置文件失败,重新从默认位置拷贝原始配置文件到配置文件夹下
|
||||
FirstLaunchCopyConfig();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重新加载配置
|
||||
/// </summary>
|
||||
/// <param name="json"></param>
|
||||
private void ReloadConfig(string json)
|
||||
{
|
||||
var reqData = new RespLoginFunnelData
|
||||
{
|
||||
type = "loadFinish",
|
||||
payload = ""
|
||||
};
|
||||
NetworkKit.PostFunnelLogin(reqData);//加载完成打点
|
||||
|
||||
ParseConfig(json);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.LoginInit);
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_StartBefore);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查是否有新的配置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private bool HasNewConfig()
|
||||
{
|
||||
var cdnConfigFileName = _loginModel.setting;
|
||||
|
||||
if (!PlayerPrefs.HasKey(ConfigFileNameKey)) return true;
|
||||
|
||||
string savedCfgName = PlayerPrefs.GetString(ConfigFileNameKey);
|
||||
bool needDownloadConfigFile = false;
|
||||
|
||||
if (!string.IsNullOrEmpty(cdnConfigFileName))
|
||||
{
|
||||
//如果本地Player Prefs里没有保存配置文件名
|
||||
if (string.IsNullOrEmpty(savedCfgName))
|
||||
{
|
||||
needDownloadConfigFile = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
//与CDN上的对比名称
|
||||
if (!savedCfgName.Equals(cdnConfigFileName))
|
||||
{
|
||||
needDownloadConfigFile = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return needDownloadConfigFile;
|
||||
}
|
||||
|
||||
private void ParseConfig(string json)
|
||||
{
|
||||
if (json == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (!json.StartsWith("{"))
|
||||
{
|
||||
json = Base64Kit.Decode(json, NetworkManager.packName);
|
||||
}
|
||||
var dictionary = SerializeUtil.ToObject<Dictionary<string, object>>(json);
|
||||
ParseGameConfig(dictionary);
|
||||
// ParseQuestionConfig(dictionary);
|
||||
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.UpdateHotFixProgress, 100);
|
||||
}
|
||||
|
||||
#region 游戏配置
|
||||
|
||||
private void ParseGameConfig(IReadOnlyDictionary<string, object> dictionary)
|
||||
{
|
||||
LoadConfig<CommonModel>(dictionary, "Common");
|
||||
LoadConfigList<TurntableModel, Turntable>(dictionary, "turntable");
|
||||
LoadConfigList<LangDisplayModel, LangDisplay>(dictionary, "langDisplay");
|
||||
LoadConfigList<RewardNumModel, RewardNum>(dictionary, "rewardNum");
|
||||
LoadConfigList<AchieveModel, Achieve>(dictionary, "achieve");
|
||||
LoadConfigList<DurationtasksModel, Durationtasks>(dictionary, "Durationtasks");
|
||||
LoadConfigList<PaidcoinsModel, Paidcoins>(dictionary, "Paidcoins");
|
||||
LoadConfigList<PassingTaskModel, PassingTask>(dictionary, "PassingTasks");
|
||||
LoadConfigList<PassportrewardsModel, Passportrewards>(dictionary, "Passportrewards");
|
||||
LoadConfigList<SmallrewardNumModel, SmallrewardNum>(dictionary, "SmallrewardNum");
|
||||
LoadConfigList<LargerewardNumModel, LargerewardNum>(dictionary, "LargerewardNum");
|
||||
LoadConfigList<PaymentTypeModel, PaymentType>(dictionary, "paymentType");
|
||||
LoadConfigList<MakeupModel, Makeup>(dictionary, "makeup");
|
||||
LoadConfigList<MakeupModel_2, Makeup_2>(dictionary, "makeup_2");
|
||||
LoadConfigList<PaidgiftModel, Paidgift>(dictionary, "Paidgift");
|
||||
// LoadConfig<GameUrlsConstModel>(dictionary, "GameUrlsConst");
|
||||
// LoadConfigList<GameUrlsModel, GameUrls>(dictionary, "GameUrls");
|
||||
LoadConfigList<LevelDataModel, LevelData>(dictionary, "LevelData");
|
||||
LoadConfigList<LevelDataModel_2, LevelData>(dictionary, "LevelData_2");
|
||||
LoadConfigList<LevelDataModel_3, LevelData>(dictionary, "LevelData_3");
|
||||
LoadConfigList<PrizeWheelDataModel, PrizeWheelData>(dictionary, "PrizeWheelData");
|
||||
LoadConfigList<exBrPoolModel, exBrPool>(dictionary, "exBrPool");
|
||||
LoadConfigList<exBrPoolModel_2, exBrPool_2>(dictionary, "exBrPool");
|
||||
LoadConfigList<MultigiftModel, Multigift>(dictionary, "Multigift");
|
||||
|
||||
if (dictionary.TryGetValue("SignDailyReward", out var signDailyReward))
|
||||
{
|
||||
var signDailyRewardModel = new SignDailyRewardModel();
|
||||
|
||||
signDailyRewardModel.dataList = SerializeUtil.ToObject<List<SignDailyReward>>(signDailyReward.ToString());
|
||||
|
||||
ConfigData[typeof(SignDailyRewardModel)] = signDailyRewardModel;
|
||||
}
|
||||
|
||||
if (GetConfigFormName(dictionary, "exBrPool", out var exBrPool))
|
||||
{
|
||||
var exBrPoolModel = new exBrPoolModel
|
||||
{ dataList = SerializeUtil.ToObject<List<exBrPool>>(exBrPool) };
|
||||
ConfigData[typeof(exBrPoolModel)] = exBrPoolModel;
|
||||
GetConfig<exBrPoolModel>().config_name_list = GetConfig<exBrPoolModel>().dataList[0].user_name.Split(",").ToList();
|
||||
GetConfig<exBrPoolModel>().config_money_list = GetConfig<exBrPoolModel>().dataList[0].amount.Split(",").ToList();
|
||||
}
|
||||
if (GetConfigFormName(dictionary, "exBrPool_2", out var exBrPool_2))
|
||||
{
|
||||
var exBrPoolModel_2 = new exBrPoolModel_2
|
||||
{ dataList = SerializeUtil.ToObject<List<exBrPool_2>>(exBrPool_2) };
|
||||
ConfigData[typeof(exBrPoolModel_2)] = exBrPoolModel_2;
|
||||
GetConfig<exBrPoolModel_2>().config_name_list = GetConfig<exBrPoolModel_2>().dataList[0].user_name.Split(",").ToList();
|
||||
GetConfig<exBrPoolModel_2>().config_money_list = GetConfig<exBrPoolModel_2>().dataList[0].amount.Split(",").ToList();
|
||||
}
|
||||
if (dictionary.TryGetValue("GameUrls", out var GameUrls))
|
||||
{
|
||||
light_weblist.Clear();
|
||||
dark_weblist.Clear();
|
||||
web_through_str = "";
|
||||
List<GameUrls> alllist = new List<GameUrls>();
|
||||
alllist = SerializeUtil.ToObject<List<GameUrls>>(GameUrls.ToString());
|
||||
List<int> type_list = new List<int>();
|
||||
for (int i = 0; i < alllist.Count; i++)
|
||||
{
|
||||
|
||||
if (alllist[i].webType == 2)
|
||||
{
|
||||
if (GameHelper.IsGiftSwitch() && (alllist[i].isMagic == 1)) light_weblist.Add(alllist[i]);
|
||||
else if (!GameHelper.IsGiftSwitch() && (alllist[i].isMagic == 0)) light_weblist.Add(alllist[i]);
|
||||
}
|
||||
else
|
||||
{
|
||||
dark_weblist.Add(alllist[i]);
|
||||
if (!type_list.Contains(alllist[i].wvType))
|
||||
{
|
||||
web_through_str += alllist[i].wvthrough;
|
||||
web_through_str += "|";
|
||||
type_list.Add(alllist[i].wvType);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
web_through_str.Remove(web_through_str.Length - 1);
|
||||
var gameUrlsModel = new GameUrlsModel
|
||||
{
|
||||
dataList = light_weblist
|
||||
};
|
||||
ConfigData[typeof(GameUrlsModel)] = gameUrlsModel;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadConfig<T>(IReadOnlyDictionary<string, object> dictionary, string key)
|
||||
{
|
||||
if (ParseConfig(dictionary, key, out T data))
|
||||
{
|
||||
ConfigData[typeof(T)] = data;
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadConfigList<T, TD>(IReadOnlyDictionary<string, object> dictionary, string key)
|
||||
where T : IDataList<TD>, new()
|
||||
{
|
||||
if (ParseConfig(dictionary, key, out List<TD> dataList))
|
||||
{
|
||||
ConfigData[typeof(T)] = new T { dataList = dataList };
|
||||
}
|
||||
}
|
||||
|
||||
private bool ParseConfig<T>(IReadOnlyDictionary<string, object> dictionary, string key, out T obj)
|
||||
{
|
||||
obj = default;
|
||||
if (!GetConfigFormName(dictionary, key, out var config))
|
||||
{
|
||||
Debug.LogWarning($"Excel Not find Sheet: {key}");
|
||||
return false;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
var tempObj = SerializeUtil.ToObject<T>(config);
|
||||
if (tempObj != null)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
CheckMissFields(key, tempObj, config);
|
||||
#endif
|
||||
obj = tempObj;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 在此处添加异常处理逻辑,例如日志记录
|
||||
Debug.LogError("Error deserializing config data for type " + typeof(T).Name + ": " + ex.Message);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void CheckMissFields<T>(string key, T tempObj, string configValue)
|
||||
{
|
||||
var missingFields = new List<string>();
|
||||
|
||||
if (tempObj is IEnumerable<object> tempArray)
|
||||
{
|
||||
missingFields = CheckMissingFieldsInArray(tempArray.FirstOrDefault()?.GetType(), configValue);
|
||||
}
|
||||
else
|
||||
{
|
||||
missingFields = CheckMissingFields(tempObj.GetType(), configValue);
|
||||
}
|
||||
|
||||
if (missingFields.Count > 0)
|
||||
{
|
||||
Debug.LogWarning($"Excel Sheet: {key} Missing fields in JSON: " + string.Join(", ", missingFields.Distinct()));
|
||||
}
|
||||
}
|
||||
|
||||
public static List<string> CheckMissingFieldsInArray(Type objType, string jsonString)
|
||||
{
|
||||
var missingFields = new List<string>();
|
||||
var jsonArray = JArray.Parse(jsonString);
|
||||
|
||||
foreach (var item in jsonArray)
|
||||
{
|
||||
missingFields.AddRange(CheckMissingFields(objType, item.ToString()));
|
||||
}
|
||||
|
||||
return missingFields;
|
||||
}
|
||||
|
||||
public static List<string> CheckMissingFields(Type objType, string jsonString)
|
||||
{
|
||||
var missingFields = new List<string>();
|
||||
|
||||
try
|
||||
{
|
||||
var jsonObject = SerializeUtil.ToObject<Dictionary<string, object>>(jsonString);
|
||||
var fields = objType.GetFields(BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
foreach (var field in fields)
|
||||
{
|
||||
if (!jsonObject.ContainsKey(field.Name))
|
||||
{
|
||||
missingFields.Add(field.Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Debug.Log("Error checking missing fields for type " + objType.Name + ": " + ex.Message);
|
||||
}
|
||||
|
||||
return missingFields;
|
||||
}
|
||||
|
||||
private bool GetConfigFormName(IReadOnlyDictionary<string, object> dictionary, string formName, out string config)
|
||||
{
|
||||
config = null;
|
||||
var lastName = formName + _loginModel.ConfigType;
|
||||
var isHaveConfig = dictionary.ContainsKey(lastName);
|
||||
if (!isHaveConfig)
|
||||
{
|
||||
if (_loginModel.ConfigType == "")
|
||||
{
|
||||
return false;
|
||||
}
|
||||
lastName = formName;
|
||||
}
|
||||
|
||||
Debug.Log($"lastName============= {lastName}");
|
||||
var isHaveGameUrlsConst = dictionary.TryGetValue(lastName, out var gameUrlsConst);
|
||||
config = isHaveGameUrlsConst ? gameUrlsConst.ToString() : null;
|
||||
return isHaveGameUrlsConst;
|
||||
}
|
||||
#endregion
|
||||
|
||||
public static T GetConfig<T>()
|
||||
{
|
||||
return ConfigData.TryGetValue(typeof(T), out var value) ? (T)value : default;
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
RemoveListener();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3a3bd721f95842948573aea8599cd364
|
||||
timeCreated: 1692603665
|
||||
@@ -0,0 +1,180 @@
|
||||
using System.Collections;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
|
||||
public class LoginSystem : BaseSystem
|
||||
{
|
||||
private bool _loginSuccess = false;
|
||||
private LoginModel _loginModel;
|
||||
public LoginSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
InitData();
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void InitData()
|
||||
{
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
NetworkDispatcher.Instance.AddListener(NetworkMsg.Login, RequestLogin);
|
||||
}
|
||||
|
||||
private void RemoveListener()
|
||||
{
|
||||
NetworkDispatcher.Instance.RemoveListener(NetworkMsg.Login, RequestLogin);
|
||||
}
|
||||
|
||||
private void RequestLogin(object obj = null)
|
||||
{
|
||||
var requestLoginData = new RequestLoginData
|
||||
{
|
||||
#if !UNITY_EDITOR
|
||||
device_id = SystemInfo.deviceUniqueIdentifier,
|
||||
#else
|
||||
device_id = "test004013",
|
||||
#endif
|
||||
// pack_name = Application.identifier,
|
||||
app_version = Application.version,
|
||||
pack_name = NetworkManager.packName,
|
||||
channel = SuperApplication.Instance.attribution,
|
||||
sim = NetworkManager.haveSimCard
|
||||
};
|
||||
|
||||
var reqData = new RespLoginFunnelData
|
||||
{
|
||||
type = "loginSend",
|
||||
payload = ""
|
||||
};
|
||||
NetworkKit.PostFunnelLogin(reqData);
|
||||
|
||||
CrazyAsyKit.StartCoroutine(LoginCoroutine(requestLoginData));
|
||||
}
|
||||
|
||||
private IEnumerator LoginCoroutine(RequestLoginData reqData)
|
||||
{
|
||||
var count = 0;
|
||||
while (count < 5)
|
||||
{
|
||||
|
||||
yield return new WaitForSeconds(count == 0 ? 0 : 5f);
|
||||
yield return LoginRequest(reqData);
|
||||
|
||||
if (_loginSuccess)
|
||||
{
|
||||
OnLoginSuccess(_loginModel);
|
||||
yield break;
|
||||
}
|
||||
|
||||
if (count == 4)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsUI_Open);
|
||||
}
|
||||
|
||||
Debug.LogError($"登录失败重试 {count}");
|
||||
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator LoginRequest(RequestLoginData reqData)
|
||||
{
|
||||
yield return NetworkKit.Post<LoginModel>("login", reqData, (isSuccess, loginData) =>
|
||||
{
|
||||
_loginSuccess = isSuccess;
|
||||
_loginModel = loginData;
|
||||
TrackLoginActivity(_loginSuccess);
|
||||
});
|
||||
}
|
||||
|
||||
private void OnLoginSuccess(LoginModel loginData)
|
||||
{
|
||||
var loginModel = GameHelper.GetLoginModel();
|
||||
loginModel.cdn_url = loginData.cdn_url;
|
||||
loginModel.setting = loginData.setting;
|
||||
loginModel.play_data = loginData.play_data;
|
||||
loginModel.token = loginData.token;
|
||||
loginModel.uid = loginData.uid;
|
||||
loginModel.country = loginData.country;
|
||||
loginModel.expires_at = loginData.expires_at;
|
||||
loginModel.is_magic = loginData.is_magic;
|
||||
loginModel.invite_code = loginData.invite_code;
|
||||
loginModel.invite_url = loginData.invite_url;
|
||||
loginModel.last_login_time = loginData.last_login_time;
|
||||
loginModel.login_time = loginData.login_time;
|
||||
loginModel.reg_time = loginData.reg_time;
|
||||
loginModel.new_player = loginData.new_player;
|
||||
loginModel.ConfigType = loginData.is_magic ? "_" : "_A";
|
||||
loginModel.play_data_ver = loginData.play_data_ver;
|
||||
loginModel.debug_log = loginData.debug_log;
|
||||
loginModel.enwp = loginData.enwp;
|
||||
|
||||
if (loginData.is_magic)
|
||||
{
|
||||
if (PlayerPrefs.GetInt("is_gift") != 1)
|
||||
{
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.UI_DisplayLoadingUI);
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LoginAUI_Close);
|
||||
}
|
||||
PlayerPrefs.SetInt("is_gift", 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if JarvisRelease
|
||||
BrigdeIOS.showGameA(true);
|
||||
#else
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.Show_uid);
|
||||
DOVirtual.DelayedCall(2, () =>
|
||||
{
|
||||
BrigdeIOS.showGameA(true);
|
||||
});
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
loginModel.preferences = new Preferences();
|
||||
NetworkKit.CDNUrl = $"{loginData.cdn_url}/";
|
||||
NetworkKit.userId = loginData.uid;
|
||||
NetworkKit.SetCacheToken(loginData.token);
|
||||
RequestHeart();
|
||||
TimerHelper.UnscaleGeneral.AddLoopTimer(60, (timer) => { RequestHeart(); });
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetPlayData);
|
||||
// MaxADKit.Init();
|
||||
}
|
||||
|
||||
private void TrackLoginActivity(bool isSuccess)
|
||||
{
|
||||
var reqData = new RespLoginFunnelData
|
||||
{
|
||||
type = "loginRecv",
|
||||
payload = isSuccess ? "success" : "fail"
|
||||
};
|
||||
NetworkKit.PostFunnelLogin(reqData);
|
||||
}
|
||||
|
||||
private void RequestHeart()
|
||||
{
|
||||
NetworkKit.PostWithHeader("user/health");
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
RemoveListener();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0e448e373b1b484b8918ec80a7f28448
|
||||
timeCreated: 1692267393
|
||||
@@ -0,0 +1,84 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ScrewsMaster
|
||||
{
|
||||
public class PlayDataSystem : BaseSystem
|
||||
{
|
||||
public PlayDataSystem(bool isAutoInit = true)
|
||||
{
|
||||
if (isAutoInit)
|
||||
{
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
public sealed override void Init()
|
||||
{
|
||||
base.Init();
|
||||
|
||||
AddListener();
|
||||
}
|
||||
|
||||
private void AddListener()
|
||||
{
|
||||
NetworkDispatcher.Instance.AddListener(NetworkMsg.GetPlayData, OnRequestPlayData);
|
||||
NetworkDispatcher.Instance.AddListener(NetworkMsg.SavePlayData, OnRequestSavePlayData);
|
||||
}
|
||||
|
||||
private void RemoveListener()
|
||||
{
|
||||
NetworkDispatcher.Instance.RemoveListener(NetworkMsg.GetPlayData, OnRequestPlayData);
|
||||
NetworkDispatcher.Instance.RemoveListener(NetworkMsg.SavePlayData, OnRequestSavePlayData);
|
||||
}
|
||||
|
||||
private void OnRequestPlayData(object args)
|
||||
{
|
||||
NetworkKit.PostWithHeader<Preferences>("user/userData", (isSuccess, obj) =>
|
||||
{
|
||||
var loginModel = GameHelper.GetLoginModel();
|
||||
loginModel.preferences = obj;
|
||||
|
||||
PreferencesMgr.Instance.InitPreferences();
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.GetConfig);
|
||||
});
|
||||
}
|
||||
|
||||
private void OnRequestSavePlayData(object obj)
|
||||
{
|
||||
if (obj != null)
|
||||
{
|
||||
var msg = obj as Dictionary<string, object>;
|
||||
|
||||
if (msg == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var version = 1L;
|
||||
if (msg.TryGetValue("data_ver", out var ver))
|
||||
{
|
||||
if (version != default)
|
||||
{
|
||||
version = (long)ver;
|
||||
}
|
||||
}
|
||||
|
||||
var data = SerializeUtil.ToJson<Dictionary<string, object>>(msg);
|
||||
|
||||
var requestData = new RequestSavePlayData
|
||||
{
|
||||
version = version,
|
||||
data = data
|
||||
};
|
||||
NetworkKit.PostWithHeader("user/updateData", requestData);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
RemoveListener();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7b2141f8f0f64581b0f291d0ca27ece2
|
||||
timeCreated: 1692343794
|
||||
Reference in New Issue
Block a user