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_sql/char.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/char_sql') diff --git a/src/char_sql/char.c b/src/char_sql/char.c index c6a8e606e..4db97be38 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -2399,6 +2399,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); //Loads a character's name and stores it in the buffer given (must be NAME_LENGTH in size) @@ -2964,7 +2974,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