public void Divide(EntityStats otherStats) { foreach (var otherStat in otherStats.Stats.Values) { this[otherStat.Kind].Divide(otherStats.Stats[otherStat.Kind].Value); } }
internal void AccumulateFactors(EntityStats otherStats, bool positive) { foreach (var otherStat in otherStats.Stats) { if ((otherStat.Value.Factor > 0 && positive) || (otherStat.Value.Factor < 0 && !positive)) { Ensure(otherStat.Key); AccumulateFactor(otherStat.Key, otherStat.Value.Factor); } } }
public void Accumulate(EntityStats otherStats) { foreach (var otherStat in otherStats.Stats) { if (otherStat.Value.Factor != 0) { Ensure(otherStat.Key); AccumulateFactor(otherStat.Key, otherStat.Value.Factor); } } }