diff options
author | Haru <haru@dotalux.com> | 2019-09-22 16:36:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-22 16:36:01 +0200 |
commit | a51b2d2093826eca6f813570876e40768581da9b (patch) | |
tree | 02fdb32184ca9a82efc748e38a56c8bf4b4104c7 /src/map/atcommand.c | |
parent | 6dbabae7003990369d1c9ce965c3c4409c879499 (diff) | |
parent | 523f76a74a48374416065ca02520554eac4ba198 (diff) | |
download | hercules-a51b2d2093826eca6f813570876e40768581da9b.tar.gz hercules-a51b2d2093826eca6f813570876e40768581da9b.tar.bz2 hercules-a51b2d2093826eca6f813570876e40768581da9b.tar.xz hercules-a51b2d2093826eca6f813570876e40768581da9b.zip |
Merge pull request #2528 from 4144/updatepackets
Update packets up to 2019-08-28
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r-- | src/map/atcommand.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 22969606d..b472694c4 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -6750,6 +6750,18 @@ ACMD(changesex) return true; } +ACMD(changecharsex) +{ + int i; + + pc->resetskill(sd, PCRESETSKILL_CHSEX); + // to avoid any problem with equipment and invalid sex, equipment is unequipped. + for (i=0; i<EQI_MAX; i++) + if (sd->equip_index[i] >= 0) pc->unequipitem(sd, sd->equip_index[i], PCUNEQUIPITEM_RECALC|PCUNEQUIPITEM_FORCE); + chrif->changesex(sd, false); + return true; +} + /*================================================ * @mute - Mutes a player for a set amount of time *------------------------------------------------*/ @@ -10115,6 +10127,7 @@ static void atcommand_basecommands(void) ACMD_DEF(clearweather), ACMD_DEF(uptime), ACMD_DEF(changesex), + ACMD_DEF(changecharsex), ACMD_DEF(mute), ACMD_DEF(refresh), ACMD_DEF(refreshall), |