예제 #1
0
        public StatsFields CloneAndChangeOwner(IStatsOwner owner)
        {
            StatsFields statsFields = new StatsFields(owner);

            statsFields.Fields = this.Fields.ToDictionary((System.Collections.Generic.KeyValuePair <PlayerFields, StatsData> x) => x.Key, (System.Collections.Generic.KeyValuePair <PlayerFields, StatsData> x) => x.Value.CloneAndChangeOwner(owner));
            return(statsFields);
        }
예제 #2
0
파일: StatsFields.cs 프로젝트: Mixi59/Stump
        public void InitializeFromStats(StatsFields fields)
        {
            Fields.Clear();

            foreach (var field in fields.Fields)
            {
                Fields.Add(field.Key, field.Value.CloneAndChangeOwner(Owner));
            }
        }