[Crossfire-wiki] [Crossfire DokuWiki] page changed: server_plugin

no-reply_wiki at metalforge.org no-reply_wiki at metalforge.org
Sat Apr 7 04:51:35 CDT 2007


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2007/04/07 04:51
User        : ryo
Edit Summary: new interface

@@ -29,11 +29,8 @@
  
  Events are either //global// or //object-specific//. Examples of global events include a player joining or exiting the game, a map being loaded. Examples of object-specific events include an item being applied, a player attacking a monster.
  
  FIXME check parameters and such :)
- 
- 
- 
  
  ===== Hooking to an object-specific event =====
  
  Just add an //event_xxx// object into your object's inventory, and fill the ''title'' field with the plugin name. See the specific plugin documentation for optional arguments that need to be set to that object. Note that the ''slaying'' field must be set too.
@@ -43,15 +40,16 @@
  For some events, returning a non-zero value will prevent the default server processing to take place, allowing to override things. FIXME be more specific :)
  
  The plugin registered function will get the following parameters. See specific events for the meaning of the field.
    * op: ''object*'' which is the current object containing the event.
-   * eventcode: ''int'' representing the EVENT_xxx constant of the current event.
    * activator: ''object*'', can be NULL.
    * third: ''object*'', can be NULL.
    * message: ''const char*'', can be NULL.
    * fix: ''int'' {FIXME} meaning?
-   * slaying: ''const char*'', plugin's name as it was registered
-   * name: ''const char*'', event hook's name
+   * event: ''object*'' representing the actual event object linking to plugin. Will be ''NULL'' for global events. Its fields mean:
+     * ''subtype'': event code
+     * ''title'': plugin name
+     * ''slaying'': plugin specific value
  
  Follows the full list of object-specific events.
  
  ==== Apply ====
@@ -318,5 +316,4 @@
      assert(type == CFAPI_PPARTY);
      return value;
  }
  </code>
- 


IP-Address  : 82.236.87.204
Old Revision: http://wiki.metalforge.net/doku.php/server_plugin?rev=1175357025
New Revision: http://wiki.metalforge.net/doku.php/server_plugin

-- 
This mail was generated by DokuWiki at
http://wiki.metalforge.net/




More information about the crossfire-wiki mailing list