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:
neckkola
2022-01-03 11:52:08 -04:00
parent bcf28bc35c
commit ba0c03af08
3 changed files with 74 additions and 16 deletions
+2 -2
View File
@@ -8596,8 +8596,8 @@ Bot* Bot::GetBotByBotClientOwnerAndBotName(Client* c, std::string botName) {
void Bot::ProcessBotGroupInvite(Client* c, std::string botName) {
if(c) {
Bot* invitedBot = GetBotByBotClientOwnerAndBotName(c, botName);
Bot* invitedBot = GetBotByBotClientOwnerAndBotName(entity_list.GetBotByBotName(botName)->GetOwner()->CastToClient(), botName);
//Mitch changed entity from c
if(invitedBot && !invitedBot->HasGroup()) {
if(!c->IsGrouped()) {
Group *g = new Group(c);