From 97cb8eebed531dda76a2f4015a95823a9540dd0a Mon Sep 17 00:00:00 2001 From: ai4rei Date: Tue, 30 Nov 2010 06:49:51 +0000 Subject: * Fixed script command getusers causing 'player not attached' errors when asking for character count in entire server (bugreport:4591, since r14495). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14522 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/script.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/map/script.c b/src/map/script.c index 722214908..e651d4f21 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8260,18 +8260,18 @@ BUILDIN_FUNC(getusers) flag = script_getnum(st,2); - if(flag&0x8) - {// npc - bl = map_id2bl(st->oid); - } - else if((sd = script_rid2sd(st))!=NULL) - {// pc - bl = &sd->bl; - } - switch(flag&0x07) { case 0: + if(flag&0x8) + {// npc + bl = map_id2bl(st->oid); + } + else if((sd = script_rid2sd(st))!=NULL) + {// pc + bl = &sd->bl; + } + if(bl) { val = map[bl->m].users; -- cgit v1.2.3-70-g09d2