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($"Updatedata {e.ID}, {e.RedirectID}, {TokenProgress}, {ChainProgress}"); if (eventId == 0 || packId == 0) return; var oldData = GContext.container.Resolve().ThanksGivingPackData; if (!GContext.container.Resolve().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); } }