mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-01 21:42:26 +00:00
Changed query in BotDatabase::LoadGroupedBotsByGroupID() to use standard table query over view use (should help in cases where players time-out when zoning)
This commit is contained in:
parent
a9ff407657
commit
7457d832f8
@ -2390,21 +2390,33 @@ bool BotDatabase::LoadBotGroupsListByOwnerID(const uint32 owner_id, std::list<st
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Bot group functions */
|
/* Bot owner group functions */
|
||||||
bool BotDatabase::LoadGroupedBotsByGroupID(const uint32 group_id, std::list<uint32>& group_list)
|
bool BotDatabase::LoadGroupedBotsByGroupID(const uint32 group_id, std::list<uint32>& group_list)
|
||||||
{
|
{
|
||||||
if (!group_id)
|
if (!group_id)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
query = StringFormat(
|
query = StringFormat(
|
||||||
"SELECT g.`mob_id` AS bot_id"
|
"SELECT `charid`"
|
||||||
" FROM `vw_groups` AS g"
|
" FROM `group_id`"
|
||||||
" JOIN `bot_data` AS b"
|
" WHERE `groupid` = '%u'"
|
||||||
" ON g.`mob_id` = b.`bot_id`"
|
" AND `charid` IN ("
|
||||||
" AND g.`mob_type` = 'B'"
|
" SELECT `bot_id`"
|
||||||
" WHERE g.`group_id` = '%u'",
|
" FROM `bot_data`"
|
||||||
|
" WHERE `owner_id` IN ("
|
||||||
|
" SELECT `charid`"
|
||||||
|
" FROM `group_id`"
|
||||||
|
" WHERE `groupid` = '%u'"
|
||||||
|
" AND `name` IN ("
|
||||||
|
" SELECT `name`"
|
||||||
|
" FROM `character_data`"
|
||||||
|
" )"
|
||||||
|
" )"
|
||||||
|
" )",
|
||||||
|
group_id,
|
||||||
group_id
|
group_id
|
||||||
);
|
);
|
||||||
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user