mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 00:58:26 +00:00
Bot Group Work
Fixed botid=charid spawn on zone issue Added a group_list update on zone to refresh from database to fix a dangling pointer to a Bot object that was camped but was previously in a group within the zone being entered. Modified Bot::ProcessBotGroupInvite to use the client of the bot when doing the Bot initialization so that a leader can invite another owner's Bot
This commit is contained in:
+12
-11
@@ -2632,19 +2632,20 @@ bool BotDatabase::LoadGroupedBotsByGroupID(const uint32 owner_id, const uint32 g
|
||||
{
|
||||
if (!group_id || !owner_id)
|
||||
return false;
|
||||
|
||||
//modified query for usecase of a BOTID sharing a CHARACTERID.
|
||||
//in this usecase, when the BOTID=CHARACTERID of BOT OWNER, this BOTID would be added to the GROUP
|
||||
query = StringFormat(
|
||||
"SELECT `charid`"
|
||||
" FROM `group_id`"
|
||||
" WHERE `groupid` = '%u'"
|
||||
" AND `charid` IN ("
|
||||
" SELECT `bot_id`"
|
||||
" FROM `bot_data`"
|
||||
" WHERE `owner_id` = '%u'"
|
||||
" )",
|
||||
"SELECT `mob_id` FROM `vw_groups` "
|
||||
"WHERE `group_id` = '%u' "
|
||||
"AND `mob_type`='B' "
|
||||
"AND `mob_id` IN (SELECT `bot_id` FROM `bot_data` WHERE `owner_id` = '%u');"
|
||||
, group_id, owner_id);
|
||||
/*query = StringFormat(
|
||||
"SELECT `charid` FROM `group_id` WHERE `groupid` = '%u'"
|
||||
" AND `charid` IN (SELECT `bot_id` FROM `bot_data` WHERE `owner_id` = '%u')"
|
||||
" AND `group_id.name` NOT IN (SELECT `name` FROM `character_data`)",
|
||||
group_id,
|
||||
owner_id
|
||||
);
|
||||
owner_id);*/
|
||||
|
||||
auto results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
|
||||
Reference in New Issue
Block a user