public EncounterTemplateSlot Copy() { EncounterTemplateSlot encounterTemplateSlot = new EncounterTemplateSlot(); encounterTemplateSlot.Roles.AddRange(this.fRoles); encounterTemplateSlot.Flag = this.fFlag; encounterTemplateSlot.LevelAdjustment = this.fLevelAdjustment; encounterTemplateSlot.Count = this.fCount; encounterTemplateSlot.Minions = this.fMinions; return(encounterTemplateSlot); }
/// <summary> /// Creates a copy of the slot. /// </summary> /// <returns>Returns the copy.</returns> public EncounterTemplateSlot Copy() { EncounterTemplateSlot slot = new EncounterTemplateSlot(); slot.Roles.AddRange(fRoles); slot.Flag = fFlag; slot.LevelAdjustment = fLevelAdjustment; slot.Count = fCount; slot.Minions = fMinions; return(slot); }
public EncounterTemplateSlot FindSlot(EncounterSlot enc_slot, int level) { EncounterTemplateSlot encounterTemplateSlot; List <EncounterTemplateSlot> .Enumerator enumerator = this.fSlots.GetEnumerator(); try { while (enumerator.MoveNext()) { EncounterTemplateSlot current = enumerator.Current; if (current.Count < enc_slot.CombatData.Count || !current.Match(enc_slot.Card, level)) { continue; } encounterTemplateSlot = current; return(encounterTemplateSlot); } return(null); } finally { ((IDisposable)enumerator).Dispose(); } }