From f4e33de65bca782f34061cd9610792dbffad8b08 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 28 Feb 2007 16:42:34 +0000 Subject: - Made it possible to modify the server packet version from the Makefile. - Merged packet 2b22 (from my server) to handle quick fame updates whenever someone's fame in the ranking changes, but no position swaps take place (prevents having to resend the whole fame list in such events, you lazy Draco <.<) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9936 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/char/char.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index 9a251d733..1e95d7644 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2676,6 +2676,16 @@ int char_send_fame_list(int fd) { return 0; } +void char_update_fame_list(int type, int index, int fame) +{ + char buf[9]; + WBUFW(buf,0) = 0x2b22; + WBUFB(buf,2) = type; + WBUFB(buf,3) = index; + WBUFL(buf,4) = fame; + mapif_sendall(buf, 8); +} + int search_mapserver(unsigned short map, long ip, short port); int parse_frommap(int fd) { @@ -3174,7 +3184,7 @@ int parse_frommap(int fd) { (pos == size-1 || fame > list[pos+1].fame) ) { //No change in order. list[(int)pos].fame = fame; - char_send_fame_list(fd); + char_update_fame_list(type, pos, fame); break; } // If the player's already in the list, remove the entry and shift the following ones 1 step up -- cgit v1.2.3-70-g09d2