summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-12-21 19:44:05 +0300
committerAndrei Karas <akaras@inbox.ru>2015-12-21 19:44:05 +0300
commit07fe5c092d78a40d05a0239c73ba80df14f6fde0 (patch)
tree122b398075af08059f881890e89f9ee69cb377d5
parentbc7213b9b4650dd26029be375e7a6727bd60afb2 (diff)
downloadevol-hercules-07fe5c092d78a40d05a0239c73ba80df14f6fde0.tar.gz
evol-hercules-07fe5c092d78a40d05a0239c73ba80df14f6fde0.tar.bz2
evol-hercules-07fe5c092d78a40d05a0239c73ba80df14f6fde0.tar.xz
evol-hercules-07fe5c092d78a40d05a0239c73ba80df14f6fde0.zip
Disable statistics sendigs.
-rw-r--r--src/echar/char.c9
-rw-r--r--src/echar/char.h2
-rw-r--r--src/echar/init.c1
3 files changed, 12 insertions, 0 deletions
diff --git a/src/echar/char.c b/src/echar/char.c
index a73b826..fb5ebdc 100644
--- a/src/echar/char.c
+++ b/src/echar/char.c
@@ -315,3 +315,12 @@ void send_additional_slots(int fd, struct char_session_data* sd)
SQL->StmtFree(stmt);
}
+
+void echar_parse_frommap_request_stats_report_pre(int *fdPtr)
+{
+ const int fd = *fdPtr;
+ RFIFOSKIP(fd, 2); /* we skip first 2 bytes which are the 0x3008, so we end up with a buffer equal to the one we send */
+ RFIFOSKIP(fd, RFIFOW(fd,2)); /* skip this packet */
+ RFIFOFLUSH(fd);
+ hookStop();
+}
diff --git a/src/echar/char.h b/src/echar/char.h
index d0873cb..2bf4e28 100644
--- a/src/echar/char.h
+++ b/src/echar/char.h
@@ -28,4 +28,6 @@ void echar_parse_char_connect_pre(int *fdPtr, struct char_session_data *sd, uint
void echar_parse_char_connect_post(int *fdPtr, struct char_session_data *sd, uint32 *ipl);
+void echar_parse_frommap_request_stats_report_pre(int *fdPtr);
+
#endif // EVOL_CHAR_CHAR
diff --git a/src/echar/init.c b/src/echar/init.c
index 2cbd151..10d18eb 100644
--- a/src/echar/init.c
+++ b/src/echar/init.c
@@ -53,6 +53,7 @@ HPExport void plugin_init (void)
addHookPre("chr->parse_char_create_new_char", echar_parse_char_create_new_char);
addHookPre("chr->creation_failed", echar_creation_failed);
addHookPre("chr->parse_char_connect", echar_parse_char_connect_pre);
+ addHookPre("chr->parse_frommap_request_stats_report", echar_parse_frommap_request_stats_report_pre);
addHookPost("chr->mmo_char_send099d", echar_mmo_char_send099d);
addHookPost("chr->mmo_char_send_characters", echar_mmo_char_send_characters_post);