Example #1
0
        public void AddEncounter(RandomEncounter encounter)
        {
            object o = m_PossibleEncounters.Find(new EncounterSet.QuickSearch(encounter.Probability));

            EncounterSet encounterSet;

            if (o == null)
            {
                encounterSet = new EncounterSet(encounter.Probability);
                m_PossibleEncounters.Add(encounterSet);
            }
            else
            {
                encounterSet = (EncounterSet)o;
            }

            encounterSet.Add(encounter);
        }
Example #2
0
        public void AddEncounter( RandomEncounter encounter )
        {
            object o = m_PossibleEncounters.Find( new EncounterSet.QuickSearch( encounter.Probability ));

            EncounterSet encounterSet;

            if (o==null)
            {
                encounterSet = new EncounterSet( encounter.Probability );
                m_PossibleEncounters.Add( encounterSet );
            }
            else
            {
                encounterSet = (EncounterSet) o;
            }

            encounterSet.Add( encounter );
        }