mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 03:58:27 +00:00
add passive stance checks to commands and loading/saving. shouldn't be `
This commit is contained in:
@@ -2221,6 +2221,11 @@ bool BotDatabase::LoadBotSettings(Mob* m)
|
||||
else {
|
||||
query = fmt::format("`bot_id` = {} AND `stance` = {}", mobID, stanceID);
|
||||
}
|
||||
|
||||
if (stanceID == Stance::Passive) {
|
||||
LogBotSettings("{} is currently set to {} [#{}]. No saving or loading required.", m->GetCleanName(), Stance::GetName(Stance::Passive), Stance::Passive);
|
||||
return true;
|
||||
}
|
||||
|
||||
const auto& l = BotSettingsRepository::GetWhere(database, query);
|
||||
|
||||
@@ -2268,6 +2273,11 @@ bool BotDatabase::SaveBotSettings(Mob* m)
|
||||
uint32 charID = (m->IsClient() ? m->CastToClient()->CharacterID() : 0);
|
||||
uint8 stanceID = (m->IsBot() ? m->CastToBot()->GetBotStance() : 0);
|
||||
|
||||
if (stanceID == Stance::Passive) {
|
||||
LogBotSettings("{} is currently set to {} [#{}]. No saving or loading required.", m->GetCleanName(), Stance::GetName(Stance::Passive), Stance::Passive);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string query = "";
|
||||
|
||||
if (m->IsClient()) {
|
||||
|
||||
Reference in New Issue
Block a user