summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-28 16:42:34 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-28 16:42:34 +0000
commitf4e33de65bca782f34061cd9610792dbffad8b08 (patch)
tree94488ff4b586e6b878da347b82f4f7dac1328219 /src/char
parentb31f1a4805c6119e7463f1cb8dd5933b7d68e101 (diff)
downloadhercules-f4e33de65bca782f34061cd9610792dbffad8b08.tar.gz
hercules-f4e33de65bca782f34061cd9610792dbffad8b08.tar.bz2
hercules-f4e33de65bca782f34061cd9610792dbffad8b08.tar.xz
hercules-f4e33de65bca782f34061cd9610792dbffad8b08.zip
- 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
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c12
1 files changed, 11 insertions, 1 deletions
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