summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-30 19:10:36 +0000
committerrud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-05-30 19:10:36 +0000
commitd0301ea03b9d46bc19635dcfa27becb9729e1725 (patch)
tree4f4aa7816ad3c2c49d2994f128c2c149e320bc61 /src/map/atcommand.c
parentc845207ead7f60b26fd20d9143c09f20416fede6 (diff)
downloadhercules-d0301ea03b9d46bc19635dcfa27becb9729e1725.tar.gz
hercules-d0301ea03b9d46bc19635dcfa27becb9729e1725.tar.bz2
hercules-d0301ea03b9d46bc19635dcfa27becb9729e1725.tar.xz
hercules-d0301ea03b9d46bc19635dcfa27becb9729e1725.zip
Fixed bugreport:5873 sex changed shouldn't now make exploits regarding item bonuses.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16167 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 8d88566c7..11022f490 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -6515,8 +6515,12 @@ ACMD_FUNC(uptime)
*------------------------------------------*/
ACMD_FUNC(changesex)
{
+ int i;
nullpo_retr(-1, sd);
pc_resetskill(sd,4);
+ // to avoid any problem with equipment and invalid sex, equipment is unequiped.
+ for( i=0; i<EQI_MAX; i++ )
+ if( sd->equip_index[i] >= 0 ) pc_unequipitem(sd, sd->equip_index[i], 3);
chrif_changesex(sd);
return 0;
}