Ejemplo n.º 1
0
 /// <summary>
 /// Raises an event indicating that a script, area, or conversation has been removed from the module.
 /// </summary>
 protected void ResourceRemovedFromCollection(OEIDictionaryWithEvents cDictionary, object key, object value)
 {
     if (value is NWN2GameScript)
     {
         OnScriptRemoved(cDictionary, new ScriptEventArgs((NWN2GameScript)value));
     }
     else if (value is NWN2GameConversation)
     {
         OnConversationRemoved(cDictionary, new ConversationEventArgs((NWN2GameConversation)value));
     }
     else if (value is NWN2GameArea)
     {
         OnAreaRemoved(cDictionary, new AreaEventArgs((NWN2GameArea)value));
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Raises an event indicating that a script, area, or conversation has been added to the module.
 /// </summary>
 protected void ResourceInsertedIntoCollection(OEIDictionaryWithEvents cDictionary, object key, object value)
 {
     if (value is NWN2GameScript)
     {
         OnScriptAdded(cDictionary, new ScriptEventArgs((NWN2GameScript)value));
     }
     else if (value is NWN2GameConversation)
     {
         OnConversationAdded(cDictionary, new ConversationEventArgs((NWN2GameConversation)value));
     }
     else if (value is NWN2GameArea)
     {
         NWN2GameArea area = (NWN2GameArea)value;
         OnAreaAdded(cDictionary, new AreaEventArgs(area));
     }
 }