[Bots] Post pre-processor fixes (#2770)

* Fixes

* Update main.cpp
This commit is contained in:
Chris Miles 2023-01-20 13:28:39 -06:00 committed by GitHub
parent e8ca3f6942
commit 5c095ab87a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -392,16 +392,21 @@ int main(int argc, char** argv) {
EQ::SayLinkEngine::LoadCachedSaylinks();
LogInfo("Loading bot commands");
int botretval = bot_command_init();
if (botretval < 0)
LogError("Bot command loading failed");
else
LogInfo("[{}] bot commands loaded", botretval);
if (RuleB(Bots, Enabled) && database.DoesTableExist("bot_command_settings")) {
LogInfo("Loading bot commands");
int botretval = bot_command_init();
if (botretval < 0) {
LogError("Bot command loading failed");
}
else {
LogInfo("[{}] bot commands loaded", botretval);
}
LogInfo("Loading bot spell casting chances");
if (!database.botdb.LoadBotSpellCastingChances())
LogError("Bot spell casting chances loading failed");
LogInfo("Loading bot spell casting chances");
if (!database.botdb.LoadBotSpellCastingChances()) {
LogError("Bot spell casting chances loading failed");
}
}
/**
* NPC Scale Manager