Pārlūkot izejas kodu

Fixed robe removal on changesex (#9010)

Fixes #9009

Additionally also added removal from the equip switch feature.

Thanks to @Haydrich
Lemongrass3110 3 mēneši atpakaļ
vecāks
revīzija
f4bbccf6ae
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. 2 2
      src/char/char_logif.cpp

+ 2 - 2
src/char/char_logif.cpp

@@ -456,10 +456,10 @@ void chlogif_parse_change_sex_sub(int32 sex, int32 acc, int32 char_id, int32 cla
 		break;
 	}
 
-	if (SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `equip` = '0' WHERE `char_id` = '%d'", schema_config.inventory_db, char_id))
+	if (SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `equip` = '0', `equip_switch` = '0' WHERE `char_id` = '%d'", schema_config.inventory_db, char_id))
 		Sql_ShowDebug(sql_handle);
 
-	if (SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `class` = '%d', `weapon` = '0', `shield` = '0', `head_top` = '0', `head_mid` = '0', `head_bottom` = '0', `sex` = '%c' WHERE `char_id` = '%d'", schema_config.char_db, class_, sex == SEX_MALE ? 'M' : 'F', char_id))
+	if (SQL_ERROR == Sql_Query(sql_handle, "UPDATE `%s` SET `class` = '%d', `weapon` = '0', `shield` = '0', `head_top` = '0', `head_mid` = '0', `head_bottom` = '0', `robe` = '0', `sex` = '%c' WHERE `char_id` = '%d'", schema_config.char_db, class_, sex == SEX_MALE ? 'M' : 'F', char_id))
 		Sql_ShowDebug(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);