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);
        }
예제 #2
0
        /// <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);
        }
예제 #3
0
        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();
            }
        }