From ddfdb774945e1a579d0e644ee339a88c25128f72 Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Mon, 6 Jul 2020 13:55:52 +0200 Subject: Remove unnecessary gender update SQL query from char_changecharsex() Gender gets updated in char_change_sex_sub() so we can safely skip it in char_changecharsex(). --- src/char/char.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/char/char.c b/src/char/char.c index 04a72fb6b..5add42e75 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3538,10 +3538,6 @@ static int char_changecharsex(int char_id, int sex) SQL->GetData(inter->sql_handle, 2, &data, NULL); guild_id = atoi(data); SQL->FreeResult(inter->sql_handle); - if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `sex` = '%c' WHERE `char_id` = '%d'", char_db, sex == SEX_MALE ? 'M' : 'F', char_id)) { - Sql_ShowDebug(inter->sql_handle); - return 1; - } char_change_sex_sub(sex, account_id, char_id, class, guild_id); // disconnect player if online on char-server -- cgit v1.2.3-70-g09d2