diff options
author | xazax-hun <xazax-hun@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-22 13:49:09 +0000 |
---|---|---|
committer | xazax-hun <xazax-hun@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-01-22 13:49:09 +0000 |
commit | 14c53cd601a6aba5811909ded3dae4992d707271 (patch) | |
tree | 63ed44e4ba7eab76e6fefb3a6b99b0812310361e /src/map/script.c | |
parent | 44d7606656a650dc43018b5c63bb56ad1f70e77c (diff) | |
download | hercules-14c53cd601a6aba5811909ded3dae4992d707271.tar.gz hercules-14c53cd601a6aba5811909ded3dae4992d707271.tar.bz2 hercules-14c53cd601a6aba5811909ded3dae4992d707271.tar.xz hercules-14c53cd601a6aba5811909ded3dae4992d707271.zip |
Minor cleanups, mostly reducing scopes.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15504 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/map/script.c b/src/map/script.c index d9f2bc2e0..dbbabf74f 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -3878,7 +3878,6 @@ int script_reload() /// mes "<message>"; BUILDIN_FUNC(mes) { - int i; TBL_PC* sd = script_rid2sd(st); if( sd == NULL ) return 0; @@ -3889,6 +3888,8 @@ BUILDIN_FUNC(mes) } else {// parse multiple lines as they exist + int i; + for( i = 2; script_hasdata(st, i); i++ ) { // send the message to the client @@ -11817,10 +11818,11 @@ BUILDIN_FUNC(getmercinfo) BUILDIN_FUNC(checkequipedcard) { TBL_PC *sd=script_rid2sd(st); - int n,i,c=0; - c=script_getnum(st,2); if(sd){ + int n,i,c=0; + c=script_getnum(st,2); + for(i=0;i<MAX_INVENTORY;i++){ if(sd->status.inventory[i].nameid > 0 && sd->status.inventory[i].amount && sd->inventory_data[i]){ if (itemdb_isspecial(sd->status.inventory[i].card[0])) |