Example #1
0
void PlayerbotMgr::LogoutAllBots()
{
    while (true)
    {
        PlayerBotMap::const_iterator itr = GetPlayerBotsBegin();
        if (itr == GetPlayerBotsEnd()) break;
        Player* bot = itr->second;
        LogoutPlayerBot(bot->GetObjectGuid());
    }
    RemoveAllBotsFromGroup();
}
Example #2
0
void PlayerbotMgr::LogoutAllBots()
{
    while (true)
    {
        PlayerBotMap::const_iterator itr = GetPlayerBotsBegin();
        if (itr == GetPlayerBotsEnd()) break;
        if (Player* bot = itr->second)
        {
            LogoutPlayerBot(bot->GetObjectGuid());
            m_botCount--;
        }
    }
    RemoveAllBotsFromGroup();                   ///-> If bot are logging out remove them group
}