mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
Config for fast react in bg
This commit is contained in:
@@ -691,6 +691,9 @@ AiPlayerbot.PvpProhibitedZoneIds = "2255,656,2361,2362,2363,976,35,2268,3425,392
|
||||
# PvP Restricted Areas (bots don't pvp)
|
||||
AiPlayerbot.PvpProhibitedAreaIds = "976,35,392"
|
||||
|
||||
# Improve react speed in battleground and arena (may cause lag)
|
||||
AiPlayerbot.FastReactInBG = 1
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
||||
@@ -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"
|
||||
@@ -334,10 +335,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);
|
||||
|
||||
@@ -125,7 +125,7 @@ bool PlayerbotAIConfig::Initialize()
|
||||
pvpProhibitedZoneIds);
|
||||
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.PvpProhibitedAreaIds", "976,35"),
|
||||
pvpProhibitedAreaIds);
|
||||
|
||||
fastReactInBG = sConfigMgr->GetOption<bool>("AiPlayerbot.FastReactInBG", true);
|
||||
LoadList<std::vector<uint32>>(
|
||||
sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"),
|
||||
randomBotQuestIds);
|
||||
|
||||
@@ -139,6 +139,7 @@ public:
|
||||
std::vector<uint32> randomBotGuilds;
|
||||
std::vector<uint32> pvpProhibitedZoneIds;
|
||||
std::vector<uint32> pvpProhibitedAreaIds;
|
||||
bool fastReactInBG;
|
||||
|
||||
bool randombotsWalkingRPG;
|
||||
bool randombotsWalkingRPGInDoors;
|
||||
|
||||
Reference in New Issue
Block a user