//copy ctor public UB_EncounterData(UB_EncounterData prius) { if (prius == null) { return; } SpawnWeight = prius.SpawnWeight; EncounterType = prius.EncounterType; Description = prius.Description; Icon = prius.Icon; Vitals = new EnemyVitals(prius.Vitals); Rewards = new EncounterRewards(prius.Rewards); EncounterActions = new Dictionary <string, string>(); foreach (var kvp in prius.EncounterActions) { EncounterActions.Add(kvp.Key, kvp.Value); } Spells = new Dictionary <string, EnemySpellDetail>(); foreach (var spell in prius.Spells) { Spells.Add(spell.Key, new EnemySpellDetail(spell.Value)); } Vitals.ActiveStati = new List <UB_SpellStatus>(); foreach (var status in prius.Vitals.ActiveStati) { Vitals.ActiveStati.Add(new UB_SpellStatus(status)); } }
//copy ctor public EncounterRewards(EncounterRewards prius) { if (prius == null) { return; } XpMin = prius.XpMin; XpMax = prius.XpMax; GoldMin = prius.GoldMin; GoldMax = prius.GoldMax; ItemsDropped = prius.ItemsDropped.ToList(); }