diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-07-06 13:51:16 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-07-06 13:51:16 +0200 |
commit | f2d7f16d0e4162afa2dd32d1bab4e76550d8ca59 (patch) | |
tree | e667c289b4ad8537e7f6358436df53e5b6c4793d /src | |
parent | 1dfebbd4966310387357cbddae600418a56df658 (diff) | |
download | hercules-f2d7f16d0e4162afa2dd32d1bab4e76550d8ca59.tar.gz hercules-f2d7f16d0e4162afa2dd32d1bab4e76550d8ca59.tar.bz2 hercules-f2d7f16d0e4162afa2dd32d1bab4e76550d8ca59.tar.xz hercules-f2d7f16d0e4162afa2dd32d1bab4e76550d8ca59.zip |
Update SQL query in char_change_sex_sub() to update character's gender and robe view ID, too
Diffstat (limited to 'src')
-rw-r--r-- | src/char/char.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/char/char.c b/src/char/char.c index c61b6107a..04a72fb6b 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -2566,9 +2566,15 @@ static void char_change_sex_sub(int sex, int acc, int char_id, int class, int gu if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `equip`='0' WHERE `char_id`='%d'", inventory_db, char_id)) Sql_ShowDebug(inter->sql_handle); +#if PACKETVER >= 20141016 + char gender = (sex == SEX_MALE) ? 'M' : ((sex == SEX_FEMALE) ? 'F' : 'U'); +#else + char gender = 'U'; +#endif + if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `class`='%d', `weapon`='0', `shield`='0', " - "`head_top`='0', `head_mid`='0', `head_bottom`='0' WHERE `char_id`='%d'", - char_db, class, char_id)) + "`head_top`='0', `head_mid`='0', `head_bottom`='0', `robe`='0', `sex`='%c' " + "WHERE `char_id`='%d' ", char_db, class, gender, char_id)) Sql_ShowDebug(inter->sql_handle); if (guild_id) // If there is a guild, update the guild_member data [Skotlex] inter_guild->sex_changed(guild_id, acc, char_id, sex); |