mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-12-01 21:12:50 +08:00
fix strategies conflict for rndbot
This commit is contained in:
@@ -227,6 +227,13 @@ std::string const RandomPlayerbotFactory::CreateRandomBotName(uint8 gender)
|
||||
}
|
||||
fields = result->Fetch();
|
||||
std::string ret = fields[0].Get<std::string>();
|
||||
// check name limitations
|
||||
if (ObjectMgr::CheckPlayerName(ret) != CHAR_NAME_SUCCESS ||
|
||||
(sObjectMgr->IsReservedName(ret) || sObjectMgr->IsProfanityName(ret)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (ret.size()) {
|
||||
CharacterDatabase.DirectExecute("UPDATE playerbots_names SET in_use=1 WHERE name='{}'", ret);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user