备份CatanBuilding瘦身独立工程

This commit is contained in:
JSD\13999
2026-05-26 16:15:54 +08:00
commit 2d0e6a61b7
12001 changed files with 2431925 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using asap.core;
using cfg;
using GameCore;
namespace GameCore
{
public partial class FishingEventData
{
public readonly ChainPackWithProgressMigrationData ChainPackWithProgressMigrationData = new ChainPackWithProgressMigrationData();
}
}
public class ChainPackWithProgressMigrationData : ThanksGivingPackData
{
public new const string Key = "ThanksGivingPackMigrationData";
public override string RedPointKey => "thanks_giving";
protected override string key => Key;
public void UpdateData(int eventId, int packId)
{
// Debug.Log($"<color=#f18c0a>Updatedata {e.ID}, {e.RedirectID}, {TokenProgress}, {ChainProgress}</color>");
if (eventId == 0 || packId == 0)
return;
var oldData = GContext.container.Resolve<FishingEventData>().ThanksGivingPackData;
if (!GContext.container.Resolve<Tables>().TbFishingEvent.DataMap.ContainsKey(oldData.EventId)
&& oldData.PackId == packId)
{
_data = new Data(eventId: eventId, redirectId: packId, tokenProgress: oldData.TokenProgress, chainProgress: oldData.ChainProgress);
PlayFabMgr.Instance.UpdateUserDataValue(ThanksGivingPackData.Key, "");
}
else
_data = new Data(eventId: eventId, redirectId: packId, tokenProgress: 0, chainProgress: 0);
}
}