summaryrefslogtreecommitdiff
path: root/src/map/clif.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-04-07 01:55:40 -0300
committershennetsind <ind@henn.et>2013-04-07 01:55:40 -0300
commit2f9f7ce4aa46514c9173a3c91f4033b25901520e (patch)
treeec5656a546bcaf6d7820c3de252b63070d32b887 /src/map/clif.h
parent10b53b9fbc011a9224d118414517870af3e9e20c (diff)
downloadhercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.tar.gz
hercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.tar.bz2
hercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.tar.xz
hercules-2f9f7ce4aa46514c9173a3c91f4033b25901520e.zip
PacketDB Overhaul
Feature Design by GreenBox Special Thanks to mkbu95 for bringing this topic up! (packet db) http://hercules.ws/board/topic/353-packetdb-overhaul/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/clif.h')
-rw-r--r--src/map/clif.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/map/clif.h b/src/map/clif.h
index 1892a2f25..63d597b17 100644
--- a/src/map/clif.h
+++ b/src/map/clif.h
@@ -40,8 +40,7 @@ struct eri;
/**
* Defines
**/
-#define SERVER 0 /* reserved for server use */
-#define packet_len(cmd) packet_db[SERVER][cmd].len
+#define packet_len(cmd) packet_db[cmd].len
#define clif_menuskill_clear(sd) (sd)->menuskill_id = (sd)->menuskill_val = (sd)->menuskill_val2 = 0;
#define HCHSYS_NAME_LENGTH 20
@@ -50,7 +49,6 @@ struct eri;
**/
enum {// packet DB
MAX_PACKET_DB = 0xF00,
- MAX_PACKET_VER = 34,
MAX_PACKET_POS = 20,
};
@@ -344,9 +342,10 @@ enum hChSysChType {
/**
* Structures
**/
+typedef void (*pFunc)(int, struct map_session_data *); //cant help but put it first
struct s_packet_db {
short len;
- void (*func)(int, struct map_session_data *);
+ pFunc func;
short pos[MAX_PACKET_POS];
};
@@ -376,7 +375,7 @@ struct hChSysCh {
/**
* Vars
**/
-struct s_packet_db packet_db[MAX_PACKET_VER + 1][MAX_PACKET_DB + 1];
+struct s_packet_db packet_db[MAX_PACKET_DB + 1];
unsigned long color_table[COLOR_MAX];
/**
@@ -816,7 +815,6 @@ struct clif_interface {
void (*adopt_reply) (struct map_session_data *sd, int type);
void (*adopt_request) (struct map_session_data *sd, struct map_session_data *src, int p_id);
void (*readbook) (int fd, int book_id, int page);
- int (*guess_PacketVer) (int fd, int get_previous, int *error);
void (*notify_time) (struct map_session_data* sd, unsigned long time);
void (*user_count) (struct map_session_data* sd, int count);
void (*noask_sub) (struct map_session_data *src, struct map_session_data *target, int type);