diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-11-28 14:06:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-12-06 16:16:07 +0300 |
commit | 7925f0bab99662bde537d6745102c25955d054cb (patch) | |
tree | 6fe79c983aa466fbfadbf3f7ade0c6b9031fa24c | |
parent | 366f69ca66b1be3fcc8f998c7ab7bf88b0515b30 (diff) | |
download | hercules-7925f0bab99662bde537d6745102c25955d054cb.tar.gz hercules-7925f0bab99662bde537d6745102c25955d054cb.tar.bz2 hercules-7925f0bab99662bde537d6745102c25955d054cb.tar.xz hercules-7925f0bab99662bde537d6745102c25955d054cb.zip |
Add function for actual packet sending from clif_send_sub.
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/clif.h | 1 |
2 files changed, 7 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 49d10fccd..4c0e4701e 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -334,6 +334,11 @@ int clif_send_sub(struct block_list *bl, va_list ap) { if( clif->ally_only && !sd->sc.data[SC_CLAIRVOYANCE] && !sd->special_state.intravision && battle->check_target( src_bl, &sd->bl, BCT_ENEMY ) > 0 ) return 0; + return clif->send_actual(fd, buf, len); +} + +int clif_send_actual(int fd, void *buf, int len) +{ WFIFOHEAD(fd, len); if (WFIFOP(fd,0) == buf) { ShowError("WARNING: Invalid use of clif->send function\n"); @@ -18906,6 +18911,7 @@ void clif_defaults(void) { clif->refresh_ip = clif_refresh_ip; clif->send = clif_send; clif->send_sub = clif_send_sub; + clif->send_actual = clif_send_actual; clif->parse = clif_parse; clif->parse_cmd = clif_parse_cmd_optional; clif->decrypt_cmd = clif_decrypt_cmd; diff --git a/src/map/clif.h b/src/map/clif.h index 68c5f8a4d..c1b3b5a45 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -604,6 +604,7 @@ struct clif_interface { uint32 (*refresh_ip) (void); bool (*send) (const void* buf, int len, struct block_list* bl, enum send_target type); int (*send_sub) (struct block_list *bl, va_list ap); + int (*send_actual) (int fd, void *buf, int len); int (*parse) (int fd); unsigned short (*parse_cmd) ( int fd, struct map_session_data *sd ); unsigned short (*decrypt_cmd) ( int cmd, struct map_session_data *sd ); |