public static int DeserializeFromPB(IntPtr l) { int result; try { AccumulateConsumeCrystalOperationalActivity accumulateConsumeCrystalOperationalActivity = (AccumulateConsumeCrystalOperationalActivity)LuaObject.checkSelf(l); ProAccumulateConsumeCrystalOperationalActivity pbOperationalActivity; LuaObject.checkType <ProAccumulateConsumeCrystalOperationalActivity>(l, 2, out pbOperationalActivity); ConfigDataOperationalActivityInfo config; LuaObject.checkType <ConfigDataOperationalActivityInfo>(l, 3, out config); accumulateConsumeCrystalOperationalActivity.DeserializeFromPB(pbOperationalActivity, config); LuaObject.pushValue(l, true); result = 1; } catch (Exception e) { result = LuaObject.error(l, e); } return(result); }
// Token: 0x06007435 RID: 29749 RVA: 0x00200144 File Offset: 0x001FE344 public void Deserialize(DSOperationalActivityNtf ntf) { if (!BJLuaObjHelper.IsSkipLuaHotfix && this.TryInitHotFix("") && this.m_DeserializeDSOperationalActivityNtf_hotfix != null) { this.m_DeserializeDSOperationalActivityNtf_hotfix.call(new object[] { this, ntf }); return; } BJLuaObjHelper.IsSkipLuaHotfix = false; List<OperationalActivityBase> list = new List<OperationalActivityBase>(); foreach (ProPlayerLevelUpOperationalActivity proPlayerLevelUpOperationalActivity in ntf.PlayerLevelUpAwardOperationalActivities) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proPlayerLevelUpOperationalActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { PlayerLevelUpOperationalActivity playerLevelUpOperationalActivity = OperationalActivityFactory.CreateOperationalActivity(proPlayerLevelUpOperationalActivity.BasicInfo.InstanceId, proPlayerLevelUpOperationalActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as PlayerLevelUpOperationalActivity; playerLevelUpOperationalActivity.DeserializeFromPB(proPlayerLevelUpOperationalActivity, configDataOperationalActivityInfo); list.Add(playerLevelUpOperationalActivity); } } foreach (ProAccumulateLoginOperationalActivity proAccumulateLoginOperationalActivity in ntf.AccumulateLoginAwardOperationalActivities) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proAccumulateLoginOperationalActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { AccumulateLoginOperationalActivity accumulateLoginOperationalActivity = OperationalActivityFactory.CreateOperationalActivity(proAccumulateLoginOperationalActivity.BasicInfo.InstanceId, proAccumulateLoginOperationalActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as AccumulateLoginOperationalActivity; accumulateLoginOperationalActivity.DeserializeFromPB(proAccumulateLoginOperationalActivity, configDataOperationalActivityInfo); list.Add(accumulateLoginOperationalActivity); } } foreach (ProSpecificDaysLoginOperationalActivity proSpecificDaysLoginOperationalActivity in ntf.SpecificDaysLoginAwardOperationalActivities) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proSpecificDaysLoginOperationalActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { SpecificDaysLoginOperationalActivity specificDaysLoginOperationalActivity = OperationalActivityFactory.CreateOperationalActivity(proSpecificDaysLoginOperationalActivity.BasicInfo.InstanceId, proSpecificDaysLoginOperationalActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as SpecificDaysLoginOperationalActivity; specificDaysLoginOperationalActivity.DeserializeFromPB(proSpecificDaysLoginOperationalActivity, configDataOperationalActivityInfo); list.Add(specificDaysLoginOperationalActivity); } } foreach (ProLimitedTimeExchangeOperationActivity proLimitedTimeExchangeOperationActivity in ntf.LimitedTimeExchangeOperationActivities) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proLimitedTimeExchangeOperationActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { LimitedTimeExchangeOperationActivity limitedTimeExchangeOperationActivity = OperationalActivityFactory.CreateOperationalActivity(proLimitedTimeExchangeOperationActivity.BasicInfo.InstanceId, proLimitedTimeExchangeOperationActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as LimitedTimeExchangeOperationActivity; limitedTimeExchangeOperationActivity.DeserializeFromPB(proLimitedTimeExchangeOperationActivity, configDataOperationalActivityInfo); list.Add(limitedTimeExchangeOperationActivity); } } foreach (ProEffectOperationActivity proEffectOperationActivity in ntf.EffectOperationActivities) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proEffectOperationActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { EffectOperationalActivity effectOperationalActivity = OperationalActivityFactory.CreateOperationalActivity(proEffectOperationActivity.BasicInfo.InstanceId, proEffectOperationActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as EffectOperationalActivity; effectOperationalActivity.DeserializeFromPB(proEffectOperationActivity, configDataOperationalActivityInfo); if (effectOperationalActivity.IsInOperationPeriod(this.m_basicInfo.GetCurrentTime())) { base.EffectOperationActivityGenerateEffect(effectOperationalActivity, true); } list.Add(effectOperationalActivity); } } foreach (ProAccumulateRechargeOperationalActivity proAccumulateRechargeOperationalActivity in ntf.AccumulateRechargeOperationalActivities) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proAccumulateRechargeOperationalActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { AccumulateRechargeOperationalActivity accumulateRechargeOperationalActivity = OperationalActivityFactory.CreateOperationalActivity(proAccumulateRechargeOperationalActivity.BasicInfo.InstanceId, proAccumulateRechargeOperationalActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as AccumulateRechargeOperationalActivity; accumulateRechargeOperationalActivity.DeserializeFromPB(proAccumulateRechargeOperationalActivity, configDataOperationalActivityInfo); list.Add(accumulateRechargeOperationalActivity); } } foreach (ProAccumulateConsumeCrystalOperationalActivity proAccumulateConsumeCrystalOperationalActivity in ntf.AccumulateConsumeCrystalOperationalActivitites) { ConfigDataOperationalActivityInfo configDataOperationalActivityInfo = this.m_configDataLoader.GetConfigDataOperationalActivityInfo(proAccumulateConsumeCrystalOperationalActivity.BasicInfo.ActivityId); if (configDataOperationalActivityInfo != null) { AccumulateConsumeCrystalOperationalActivity accumulateConsumeCrystalOperationalActivity = OperationalActivityFactory.CreateOperationalActivity(proAccumulateConsumeCrystalOperationalActivity.BasicInfo.InstanceId, proAccumulateConsumeCrystalOperationalActivity.BasicInfo.ActivityId, configDataOperationalActivityInfo.ActivityType) as AccumulateConsumeCrystalOperationalActivity; accumulateConsumeCrystalOperationalActivity.DeserializeFromPB(proAccumulateConsumeCrystalOperationalActivity, configDataOperationalActivityInfo); list.Add(accumulateConsumeCrystalOperationalActivity); } } this.m_operationalActivityDS.InitOperationalActivities(list); this.m_operationalActivityDS.InitVersion((ushort)ntf.Version, (ushort)ntf.Version); }