mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-13 09:07:19 +00:00
Merge branch 'liyunfan1223:master' into master
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "ObjectGuid.h"
|
||||
#include "PerformanceMonitor.h"
|
||||
#include "Player.h"
|
||||
#include "PlayerbotAIConfig.h"
|
||||
#include "PlayerbotDbStore.h"
|
||||
#include "PlayerbotMgr.h"
|
||||
#include "Playerbots.h"
|
||||
@@ -342,10 +343,11 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
||||
UpdateAIInternal(elapsed, min);
|
||||
inCombat = bot->IsInCombat();
|
||||
// test fix lags because of BG
|
||||
bool inBG = bot->InBattleground() || bot->InArena();
|
||||
if (bot && !inCombat)
|
||||
min = true;
|
||||
|
||||
if (HasRealPlayerMaster())
|
||||
if (HasRealPlayerMaster() || (sPlayerbotAIConfig->fastReactInBG && inBG))
|
||||
min = false;
|
||||
|
||||
YieldThread(min);
|
||||
@@ -1629,7 +1631,7 @@ bool PlayerbotAI::IsCaster(Player* player) { return IsRanged(player) && player->
|
||||
|
||||
bool PlayerbotAI::IsCombo(Player* player)
|
||||
{
|
||||
int tab = AiFactory::GetPlayerSpecTab(player);
|
||||
// int tab = AiFactory::GetPlayerSpecTab(player);
|
||||
return player->getClass() == CLASS_ROGUE ||
|
||||
(player->getClass() == CLASS_DRUID && player->HasAura(768)); // cat druid
|
||||
}
|
||||
@@ -3020,8 +3022,8 @@ bool PlayerbotAI::CastSpell(uint32 spellId, Unit* target, Item* itemTarget)
|
||||
return true;
|
||||
}
|
||||
|
||||
aiObjectContext->GetValue<LastMovement&>("last movement")->Get().Set(nullptr);
|
||||
aiObjectContext->GetValue<time_t>("stay time")->Set(0);
|
||||
// aiObjectContext->GetValue<LastMovement&>("last movement")->Get().Set(nullptr);
|
||||
// aiObjectContext->GetValue<time_t>("stay time")->Set(0);
|
||||
|
||||
if (bot->IsFlying() || bot->HasUnitState(UNIT_STATE_IN_FLIGHT))
|
||||
{
|
||||
@@ -3206,8 +3208,8 @@ bool PlayerbotAI::CastSpell(uint32 spellId, float x, float y, float z, Item* ite
|
||||
return true;
|
||||
}
|
||||
|
||||
aiObjectContext->GetValue<LastMovement&>("last movement")->Get().Set(nullptr);
|
||||
aiObjectContext->GetValue<time_t>("stay time")->Set(0);
|
||||
// aiObjectContext->GetValue<LastMovement&>("last movement")->Get().Set(nullptr);
|
||||
// aiObjectContext->GetValue<time_t>("stay time")->Set(0);
|
||||
|
||||
MotionMaster& mm = *bot->GetMotionMaster();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user