[Bots] Fix invalid races from being created (#3681)

Previously this check allowed bots of invalid races to be created. If a race was neither a valid combination or a valid player race, it would pass the check and allow bots of any race to be created.

**^create 1 123 0** could create a Male Innoruuk Warrior
This commit is contained in:
nytmyr 2023-11-06 16:03:34 -06:00 committed by GitHub
parent 0aadb891a1
commit 2702485206
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8884,7 +8884,7 @@ uint32 helper_bot_create(Client *bot_owner, std::string bot_name, uint8 bot_clas
return bot_id;
}
if (!Bot::IsValidRaceClassCombo(bot_race, bot_class) && IsPlayerRace(bot_race)) {
if (!Bot::IsValidRaceClassCombo(bot_race, bot_class)) {
const std::string bot_race_name = GetRaceIDName(bot_race);
const std::string bot_class_name = GetClassIDName(bot_class);
const auto view_saylink = Saylink::Silent(