summaryrefslogtreecommitdiff
path: root/src/common/HPMi.h
diff options
context:
space:
mode:
authorshennetsind <notind@gmail.com>2013-08-08 11:19:02 -0700
committershennetsind <notind@gmail.com>2013-08-08 11:19:02 -0700
commit1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f (patch)
treecbfd9f0847cb5b9e65cd77ab4e8861f34165c67d /src/common/HPMi.h
parentdefac0ef9714121a872ab48c3f6c4ddd177ae509 (diff)
parent04db720ee56ad8ddddf4255575c5d60e2c214a13 (diff)
downloadhercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.gz
hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.bz2
hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.tar.xz
hercules-1197e46b6ca1f399edc18fbd60a3e2c4adf6c32f.zip
Merge pull request #83 from HerculesWS/HPMUpdateR2
Hercules Plugin Manager Update
Diffstat (limited to 'src/common/HPMi.h')
-rw-r--r--src/common/HPMi.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/common/HPMi.h b/src/common/HPMi.h
index 3cdb804e0..5e44b80c7 100644
--- a/src/common/HPMi.h
+++ b/src/common/HPMi.h
@@ -11,6 +11,8 @@
struct script_state;
struct AtCommandInfo;
+struct socket_data;
+struct map_session_data;
#ifdef WIN32
#define HPExport __declspec(dllexport)
@@ -33,7 +35,7 @@ struct AtCommandInfo;
/* after */
#include "../common/showmsg.h"
-#define HPM_VERSION "0.1"
+#define HPM_VERSION "0.2"
struct hplugin_info {
char* name;
@@ -56,12 +58,37 @@ enum hp_event_types {
HPET_MAX,
};
+enum HPluginPacketHookingPoints {
+ hpClif_Parse, /* map-server (client-map) */
+ hpChrif_Parse, /* map-server (char-map) */
+ hpParse_FromMap, /* char-server (map-char) */
+ hpParse_FromLogin, /* char-server (login-char) */
+ hpParse_Char, /* char-server (client-char) */
+ hpParse_FromChar, /* login-server (char-login) */
+ hpParse_Login, /* login-server (client-login) */
+ /* */
+ hpPHP_MAX,
+};
+
/* Hercules Plugin Mananger Include Interface */
HPExport struct HPMi_interface {
+ /* */
+ unsigned int pid;
+ /* */
void (*event[HPET_MAX]) (void);
bool (*addCommand) (char *name, bool (*func)(const int fd, struct map_session_data* sd, const char* command, const char* message,struct AtCommandInfo *info));
bool (*addScript) (char *name, char *args, bool (*func)(struct script_state *st));
void (*addCPCommand) (char *name, CParseFunc func);
+ /* map_session_data */
+ void (*addToMSD) (struct map_session_data *sd, void *data, unsigned int id, unsigned int type, bool autofree);
+ void *(*getFromMSD) (struct map_session_data *sd, unsigned int id, unsigned int type);
+ void (*removeFromMSD) (struct map_session_data *sd, unsigned int id, unsigned int type);
+ /* session[] */
+ void (*addToSession) (struct socket_data *sess, void *data, unsigned int id, unsigned int type, bool autofree);
+ void *(*getFromSession) (struct socket_data *sess, unsigned int id, unsigned int type);
+ void (*removeFromSession) (struct socket_data *sess, unsigned int id, unsigned int type);
+ /* packet */
+ bool (*addPacket) (unsigned short cmd, unsigned short length, void (*receive)(int fd), unsigned int point, unsigned int pluginID);
} HPMi_s;
#ifndef _HPM_H_
HPExport struct HPMi_interface *HPMi;