Skip to content

Commit

Permalink
Despawn bots after expired wip #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Boxhead78 committed Mar 21, 2023
1 parent af20d05 commit 70753ba
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions src/server/game/AI/NpcBots/botmgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ void BotMgr::Update(uint32 diff)
{
continue;
}

if (_owner == bot->GetBotOwner())
{
Group* gr = _owner->GetGroup();
Expand Down Expand Up @@ -726,6 +727,41 @@ void BotMgr::Update(uint32 diff)
}
}

/*
if (_bots.size() > 0)
{
for (BotMap::iterator ci = _bots.begin(); ci != _bots.end(); ++ci)
{
Creature* bot = ci->second;
ai = bot->GetBotAI();
if (!ai->GetBotOwnerGuid())
{
sBattlegroundMgr->RemoveBGBotFromList(bot);
continue;
}
if (ai->IAmFree())
continue;
if (!bot->IsInWorld())
{
continue;
}
if (_owner == bot->GetBotOwner())
{
homepos.Relocate(me);
if (!IsTempBot())
CheckOwnerExpiry(false);
}
}
}
*/

for (BotMap::const_iterator itr = _bots.begin(); itr != _bots.end(); ++itr)
{
//guid = itr->first;
Expand Down

0 comments on commit 70753ba

Please sign in to comment.