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); }
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 ); }