From e73c1ee5e26f59380806d0dcd90c4ed6617e76ef Mon Sep 17 00:00:00 2001 From: ultramage Date: Tue, 11 Mar 2008 09:44:12 +0000 Subject: Replaced clif_countusers() with a more efficient alternative (thanks to the fact that pc_db now only holds fully authed players only). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12339 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/chrif.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/map/chrif.c') diff --git a/src/map/chrif.c b/src/map/chrif.c index 941e17968..7a7c9873a 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -1442,19 +1442,11 @@ int ping_char_server(int tid, unsigned int tick, int id, int data) // unused int send_usercount_tochar(int tid, unsigned int tick, int id, int data) { - int count = 0; - struct s_mapiterator* iter; - chrif_check(-1); - iter = mapit_getallusers(); - for( mapit_first(iter); mapit_exists(iter); mapit_next(iter) ) - count++; - mapit_free(iter); - WFIFOHEAD(char_fd,4); WFIFOW(char_fd,0) = 0x2afe; - WFIFOW(char_fd,2) = count; + WFIFOW(char_fd,2) = map_usercount(); WFIFOSET(char_fd,4); return 0; } -- cgit v1.2.3-60-g2f50