ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/plugin.h
(Generate patch)

Comparing deliantra/server/include/plugin.h (file contents):
Revision 1.1.1.1 by root, Fri Feb 3 07:12:50 2006 UTC vs.
Revision 1.11 by root, Fri Aug 25 13:24:50 2006 UTC

50/* just a 'cosmetic' thing. */ 50/* just a 'cosmetic' thing. */
51/*****************************************************************************/ 51/*****************************************************************************/
52/*****************************************************************************/ 52/*****************************************************************************/
53/* Local events. Those are always linked to a specific object. */ 53/* Local events. Those are always linked to a specific object. */
54/*****************************************************************************/ 54/*****************************************************************************/
55// how about making this an enum
55#define EVENT_NONE 0 /* No event. This exists only to reserve the "0". */ 56#define EVENT_NONE 0 /* No event. This exists only to reserve the "0". */
56#define EVENT_APPLY 1 /* Object applied-unapplied. */ 57#define EVENT_APPLY 1 /* Object applied-unapplied. */
57#define EVENT_ATTACK 2 /* Monster attacked or Scripted Weapon used. */ 58#define EVENT_ATTACK 2 /* Monster attacked or Scripted Weapon used. */
58#define EVENT_DEATH 3 /* Player or monster dead. */ 59#define EVENT_DEATH 3
59#define EVENT_DROP 4 /* Object dropped on the floor. */ 60#define EVENT_DROP 4 /* Object dropped on the floor. */
60#define EVENT_PICKUP 5 /* Object picked up. */ 61#define EVENT_PICKUP 5 /* Object picked up. */
61#define EVENT_SAY 6 /* Someone speaks. */ 62#define EVENT_SAY 6 /* Someone speaks. */
62#define EVENT_STOP 7 /* Thrown object stopped. */ 63#define EVENT_STOP 7 /* Thrown object stopped. */
63#define EVENT_TIME 8 /* Triggered each time the object can react/move. */ 64#define EVENT_TIME 8 /* Triggered each time the object can react/move. */
64#define EVENT_THROW 9 /* Object is thrown. */ 65#define EVENT_THROW 9 /* Object is thrown. */
65#define EVENT_TRIGGER 10 /* Button pushed, lever pulled, etc. */ 66#define EVENT_TRIGGER 10 /* Button pushed, lever pulled, etc. */
66#define EVENT_CLOSE 11 /* Container closed. */ 67#define EVENT_CLOSE 11 /* Container closed. */
67#define EVENT_TIMER 12 /* Timer connected triggered it. */ 68#define EVENT_TIMER 12 /* Timer connected triggered it. */
69#define EVENT_MOVE 28 /* Monster move */
68/*****************************************************************************/ 70/*****************************************************************************/
69/* Global events. Those are never linked to a specific object. */ 71/* Global events. Those are never linked to a specific object. */
70/*****************************************************************************/ 72/*****************************************************************************/
71#define EVENT_BORN 13 /* A new character has been created. */
72#define EVENT_CLOCK 14 /* Global time event. */ 73#define EVENT_CLOCK 14 /* Global time event. */
73#define EVENT_CRASH 15 /* Triggered when the server crashes. Not recursive*/ 74#define EVENT_CRASH 15 /* Triggered when the server crashes. Not recursive*/
74#define EVENT_PLAYER_DEATH 16 /* Global Death event */
75#define EVENT_GKILL 17 /* Triggered when anything got killed by anyone. */ 75#define EVENT_GKILL 17 /* Triggered when anything got killed by anyone. */
76#define EVENT_LOGIN 18 /* Player login. */
77#define EVENT_LOGOUT 19 /* Player logout. */
78#define EVENT_MAPENTER 20 /* A player entered a map. */
79#define EVENT_MAPLEAVE 21 /* A player left a map. */
80#define EVENT_MAPRESET 22 /* A map is resetting. */
81#define EVENT_REMOVE 23 /* A Player character has been removed. */
82#define EVENT_SHOUT 24 /* A player 'shout' something. */ 76#define EVENT_SHOUT 24 /* A player 'shout' something. */
83#define EVENT_TELL 25 /* A player 'tell' something. */ 77#define EVENT_TELL 25 /* A player 'tell' something. */
84#define EVENT_MUZZLE 26 /* A player was Muzzled (no_shout set). */ 78#define EVENT_MUZZLE 26 /* A player was Muzzled (no_shout set). */
85#define EVENT_KICK 27 /* A player was Kicked by a DM */ 79#define EVENT_KICK 27 /* A player was Kicked by a DM */
80#define EVENT_PLAYER_USE_SKILL 36 /* player was just trying to use a skill */
81#define EVENT_MONSTER_USE_SKILL 37 /* monster was just trying to use a skill*/
82#define EVENT_FIND_UNARMED_SKILL 38 /* lets a plugin find the unarmed skill */
83#define EVENT_EXTCMD 39 /* Low-Level socket command */
84#define EVENT_CAST_SPELL 40 /* Something successfully casted a spell */
85#define EVENT_DROP_ON 41 /* Something was dropped on this (floor) */
86/* should add FREE_MAP, FREE_PLAYER */
86 87
87#define NR_EVENTS 28 88#define NR_EVENTS 42
88 89
89#include <stdarg.h> 90#include <stdarg.h>
90 91
91#define CFAPI_NONE 0 92#define CFAPI_NONE 0
92#define CFAPI_INT 1 93#define CFAPI_INT 1
100#define CFAPI_PARCH 9 101#define CFAPI_PARCH 9
101#define CFAPI_FUNC 10 102#define CFAPI_FUNC 10
102#define CFAPI_PPLAYER 11 103#define CFAPI_PPLAYER 11
103#define CFAPI_PPARTY 12 104#define CFAPI_PPARTY 12
104#define CFAPI_PREGION 13 105#define CFAPI_PREGION 13
106#define CFAPI_INT16 14
105 107
106typedef void* (*f_plug_api) (int* type, ...); 108typedef void* (*f_plug_api) (int* type, ...);
107typedef int (*f_plug_postinit) (void); 109typedef int (*f_plug_postinit) (void);
108typedef int (*f_plug_init)(const char* iversion, f_plug_api gethooksptr); 110typedef int (*f_plug_init)(const char* iversion, f_plug_api gethooksptr);
109 111

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines