mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-20 18:10:02 +01:00
Fix crash when bot re-logs
This commit is contained in:
parent
9797dd0371
commit
41bcfbfcb6
@ -1027,6 +1027,12 @@ void PlayerbotsMgr::AddPlayerbotData(Player* player, bool isBotAI)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// If the guid already exists in the map, remove it
|
||||
std::unordered_map<ObjectGuid, PlayerbotAIBase*>::iterator itr = _playerbotsMap.find(player->GetGUID());
|
||||
if (itr != _playerbotsMap.end())
|
||||
{
|
||||
_playerbotsMap.erase(itr);
|
||||
}
|
||||
if (!isBotAI)
|
||||
{
|
||||
PlayerbotMgr* playerbotMgr = new PlayerbotMgr(player);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user