mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
[Bug Fix] Fix Bot/Character ID Overlap in Groups (#4093)
* [Bug Fix] Fix Bot/Character ID Overlap in Groups - Attempt to fix bot/character ID overlap in groups keeping bots with the same unique identifier as players from not spawning on zone. - Adds `bot_id` to `group_id` to differentiate bots from characters and hopefully alleviate this issue. * Update base_group_id_repository.h * Final push
This commit is contained in:
@@ -1922,18 +1922,14 @@ bool BotDatabase::LoadGroupedBotsByGroupID(const uint32 owner_id, const uint32 g
|
||||
const auto& l = GroupIdRepository::GetWhere(
|
||||
database,
|
||||
fmt::format(
|
||||
"`groupid` = {} AND `name` IN (SELECT `name` FROM `bot_data` WHERE `owner_id` = {})",
|
||||
"`group_id` = {} AND `bot_id` != 0 AND `name` IN (SELECT `name` FROM `bot_data` WHERE `owner_id` = {})",
|
||||
group_id,
|
||||
owner_id
|
||||
)
|
||||
);
|
||||
|
||||
if (l.empty()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (const auto& e : l) {
|
||||
group_list.push_back(e.charid);
|
||||
group_list.emplace_back(e.bot_id);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user