public static Effect ToEffect(this AtomicEffectModel effectModel, AccountWrapper accountWrapper) { var effect = XdrConverter.Deserialize <Effect>(effectModel.RawEffect); effect.AccountWrapper = accountWrapper; return(effect); }
public void AddEffect(int account, AtomicEffectModel singleEffectModel) { if (!Effects.TryGetValue(account, out var effects)) { effects = new EffectsModel { Id = EffectModelIdConverter.EncodeId(Apex, account), Apex = Apex, Account = account, Effects = new List <AtomicEffectModel>() }; Effects.Add(account, effects); } effects.Effects.Add(singleEffectModel); EffectsCount++; }