summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-08-10 23:31:48 +0300
committerAndrei Karas <akaras@inbox.ru>2017-08-10 23:31:48 +0300
commitb4409352f8aae56483133b4086a580e60660f761 (patch)
treef0161e19d21dbf9a5754f6f59e93f1a7b45597ab
parentcf15e847ff9a939c781e7aab0da399b2d0cf172d (diff)
downloadplugin-b4409352f8aae56483133b4086a580e60660f761.tar.gz
plugin-b4409352f8aae56483133b4086a580e60660f761.tar.bz2
plugin-b4409352f8aae56483133b4086a580e60660f761.tar.xz
plugin-b4409352f8aae56483133b4086a580e60660f761.zip
Dont send rodex icon packet to old clients.
-rw-r--r--src/emap/clif.c14
-rw-r--r--src/emap/clif.h2
-rw-r--r--src/emap/init.c1
3 files changed, 17 insertions, 0 deletions
diff --git a/src/emap/clif.c b/src/emap/clif.c
index 0745cbb..6d02284 100644
--- a/src/emap/clif.c
+++ b/src/emap/clif.c
@@ -1270,3 +1270,17 @@ void eclif_parse_NpcStringInput(int fd,
safestrncpy(global_npc_str, message, message_len);
npc->scriptcont(sd, npcid, false);
}
+
+void eclif_rodex_icon_pre(int *fdPtr,
+ bool *showPtr __attribute__ ((unused)))
+{
+ struct map_session_data *sd = sockt->session[*fdPtr]->session_data;
+ struct SessionExt *data = session_get_bysd(sd);
+ if (!data)
+ return;
+ if (data->clientVersion < 23)
+ {
+ hookStop();
+ return;
+ }
+}
diff --git a/src/emap/clif.h b/src/emap/clif.h
index 59d2f15..ab0bcca 100644
--- a/src/emap/clif.h
+++ b/src/emap/clif.h
@@ -87,4 +87,6 @@ void eclif_party_info_post(struct party_data *p,
struct map_session_data *sd);
void eclif_parse_NpcStringInput(int fd,
struct map_session_data* sd) __attribute__((nonnull (2)));
+void eclif_rodex_icon_pre(int *fdPtr,
+ bool *showPtr);
#endif // EVOL_MAP_CLIF
diff --git a/src/emap/init.c b/src/emap/init.c
index e7669a7..6b46b0a 100644
--- a/src/emap/init.c
+++ b/src/emap/init.c
@@ -251,6 +251,7 @@ HPExport void plugin_init (void)
addHookPre(clif, skillinfoblock, eclif_skillinfoblock_pre);
addHookPre(clif, addskill, eclif_addskill_pre);
addHookPre(clif, skillinfo, eclif_skillinfo_pre);
+ addHookPre(clif, rodex_icon, eclif_rodex_icon_pre);
addHookPre(itemdb, is_item_usable, eitemdb_is_item_usable_pre);
addHookPre(itemdb, readdb_additional_fields, eitemdb_readdb_additional_fields_pre);
addHookPre(itemdb, destroy_item_data, edestroy_item_data_pre);