public virtual void AddPursuit(DialogSequence pursuit) { if (pursuit.Id == null) { // This is a local sequence, so assign it into the pursuit range and // assign an ID pursuit.Id = (uint)(Constants.DIALOG_SEQUENCE_SHARED + Pursuits.Count); Pursuits.Add(pursuit); } else { // This is a shared sequence Pursuits.Add(pursuit); } if (SequenceCatalog.ContainsKey(pursuit.Name)) { Logger.WarnFormat("Pursuit {0} is being overwritten", pursuit.Name); SequenceCatalog.Remove(pursuit.Name); } SequenceCatalog.Add(pursuit.Name, pursuit); if (pursuit.Id > Constants.DIALOG_SEQUENCE_SHARED) { pursuit.AssociateSequence(this); } }
public virtual void RegisterDialogSequence(DialogSequence sequence) { sequence.Id = (uint)(Constants.DIALOG_SEQUENCE_PURSUITS + DialogSequences.Count); DialogSequences.Add(sequence); if (SequenceCatalog.ContainsKey(sequence.Name)) { Logger.WarnFormat("Dialog sequence {0} is being overwritten", sequence.Name); SequenceCatalog.Remove(sequence.Name); } SequenceCatalog.Add(sequence.Name, sequence); }