mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Bug Fix] Fix Bot Group Loading (#2366)
* [Bug Fix] Fix Bot Group Loading There were some weird cases where this code would falsely say a bot group did not exist and this would disallow summoning this botgroup as well as deleting it. * Typo.
This commit is contained in:
+2
-26
@@ -7020,19 +7020,7 @@ void bot_subcommand_botgroup_create(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
bool extant_flag = false;
|
||||
if (!database.botdb.QueryBotGroupExistence(botgroup_name, extant_flag)) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Failed to query bot-group existence for '{}'.",
|
||||
botgroup_name
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (extant_flag) {
|
||||
if (database.botdb.QueryBotGroupExistence(botgroup_name)) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
@@ -7360,8 +7348,7 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
bool extant_flag = false;
|
||||
if (!database.botdb.QueryBotGroupExistence(botgroup_name, extant_flag)) {
|
||||
if (!database.botdb.QueryBotGroupExistence(botgroup_name)) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
@@ -7372,17 +7359,6 @@ void bot_subcommand_botgroup_load(Client *c, const Seperator *sep)
|
||||
return;
|
||||
}
|
||||
|
||||
if (!extant_flag) {
|
||||
c->Message(
|
||||
Chat::White,
|
||||
fmt::format(
|
||||
"Bot-group {} does not exist.",
|
||||
botgroup_name
|
||||
).c_str()
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
auto* owner_group = c->GetGroup();
|
||||
if (owner_group) {
|
||||
std::list<Client*> member_list;
|
||||
|
||||
Reference in New Issue
Block a user