summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-01 01:24:47 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-08-01 01:24:47 +0000
commit4ccd387c77cd21008d6a95720d770491d46a1ae6 (patch)
tree27ea6eb8f5a38c913997dd1f4ee942e56eccc17d /src
parentecfd02c5e01fbf567d4b1694daafe0281418c6f1 (diff)
downloadhercules-4ccd387c77cd21008d6a95720d770491d46a1ae6.tar.gz
hercules-4ccd387c77cd21008d6a95720d770491d46a1ae6.tar.bz2
hercules-4ccd387c77cd21008d6a95720d770491d46a1ae6.tar.xz
hercules-4ccd387c77cd21008d6a95720d770491d46a1ae6.zip
Fixed bugreport:6378 fixed 'nude' script command so that it may remove costume.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16542 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/script.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/map/script.c b/src/map/script.c
index e0976e9a1..fa858c181 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -11980,20 +11980,21 @@ BUILDIN_FUNC(specialeffect2)
*------------------------------------------*/
BUILDIN_FUNC(nude)
{
- TBL_PC *sd=script_rid2sd(st);
- int i,calcflag=0;
+ TBL_PC *sd = script_rid2sd(st);
+ int i, calcflag = 0;
- if(sd==NULL)
+ if( sd == NULL )
return 0;
- for(i=0;i<11;i++)
- if(sd->equip_index[i] >= 0) {
- if(!calcflag)
- calcflag=1;
- pc_unequipitem(sd,sd->equip_index[i],2);
+ for( i = 0 ; i < EQI_MAX; i++ ) {
+ if( sd->equip_index[ i ] >= 0 ) {
+ if( !calcflag )
+ calcflag = 1;
+ pc_unequipitem( sd , sd->equip_index[ i ] , 2);
}
+ }
- if(calcflag)
+ if( calcflag )
status_calc_pc(sd,0);
return 0;