Port fixes until b4094bf - flying, mount animations, bot attack range, free food option

This commit is contained in:
郑佩茹
2022-03-22 17:13:10 -06:00
parent 44600080ec
commit f1bcca1a7b
25 changed files with 224 additions and 32 deletions

View File

@@ -563,7 +563,7 @@ void RandomPlayerbotMgr::CheckBgQueue()
if (!bot->InBattlegroundQueue())
continue;
if (!IsRandomBot(bot->GetGUID().GetCounter()))
if (!IsRandomBot(bot))
continue;
if (bot->InBattleground() && bot->GetBattleground()->GetStatus() == STATUS_WAIT_LEAVE)
@@ -816,7 +816,7 @@ bool RandomPlayerbotMgr::ProcessBot(uint32 bot)
if (botAI)
{
//botAI->GetAiObjectContext()->GetValue<bool>("random bot update")->Set(true);
if (!sRandomPlayerbotMgr->IsRandomBot(player->GetGUID().GetCounter()))
if (!sRandomPlayerbotMgr->IsRandomBot(player))
update = false;
if (player->GetGroup() && botAI->GetGroupMaster())
@@ -1382,6 +1382,11 @@ void RandomPlayerbotMgr::Refresh(Player* bot)
bool RandomPlayerbotMgr::IsRandomBot(Player* bot)
{
if (bot && GET_PLAYERBOT_AI(bot))
{
if (GET_PLAYERBOT_AI(bot)->IsRealPlayer())
return false;
}
if (bot)
return IsRandomBot(bot->GetGUID().GetCounter()) || sPlayerbotAIConfig->IsInRandomAccountList(bot->GetSession()->GetAccountId());