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)
|
# PvP Restricted Areas (bots don't pvp)
|
||||||
AiPlayerbot.PvpProhibitedAreaIds = "976,35,392"
|
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 "ObjectGuid.h"
|
||||||
#include "PerformanceMonitor.h"
|
#include "PerformanceMonitor.h"
|
||||||
#include "Player.h"
|
#include "Player.h"
|
||||||
|
#include "PlayerbotAIConfig.h"
|
||||||
#include "PlayerbotDbStore.h"
|
#include "PlayerbotDbStore.h"
|
||||||
#include "PlayerbotMgr.h"
|
#include "PlayerbotMgr.h"
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
@@ -334,10 +335,11 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
|
|||||||
UpdateAIInternal(elapsed, min);
|
UpdateAIInternal(elapsed, min);
|
||||||
inCombat = bot->IsInCombat();
|
inCombat = bot->IsInCombat();
|
||||||
// test fix lags because of BG
|
// test fix lags because of BG
|
||||||
|
bool inBG = bot->InBattleground() || bot->InArena();
|
||||||
if (bot && !inCombat)
|
if (bot && !inCombat)
|
||||||
min = true;
|
min = true;
|
||||||
|
|
||||||
if (HasRealPlayerMaster())
|
if (HasRealPlayerMaster() || (sPlayerbotAIConfig->fastReactInBG && inBG))
|
||||||
min = false;
|
min = false;
|
||||||
|
|
||||||
YieldThread(min);
|
YieldThread(min);
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ bool PlayerbotAIConfig::Initialize()
|
|||||||
pvpProhibitedZoneIds);
|
pvpProhibitedZoneIds);
|
||||||
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.PvpProhibitedAreaIds", "976,35"),
|
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.PvpProhibitedAreaIds", "976,35"),
|
||||||
pvpProhibitedAreaIds);
|
pvpProhibitedAreaIds);
|
||||||
|
fastReactInBG = sConfigMgr->GetOption<bool>("AiPlayerbot.FastReactInBG", true);
|
||||||
LoadList<std::vector<uint32>>(
|
LoadList<std::vector<uint32>>(
|
||||||
sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"),
|
sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"),
|
||||||
randomBotQuestIds);
|
randomBotQuestIds);
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ public:
|
|||||||
std::vector<uint32> randomBotGuilds;
|
std::vector<uint32> randomBotGuilds;
|
||||||
std::vector<uint32> pvpProhibitedZoneIds;
|
std::vector<uint32> pvpProhibitedZoneIds;
|
||||||
std::vector<uint32> pvpProhibitedAreaIds;
|
std::vector<uint32> pvpProhibitedAreaIds;
|
||||||
|
bool fastReactInBG;
|
||||||
|
|
||||||
bool randombotsWalkingRPG;
|
bool randombotsWalkingRPG;
|
||||||
bool randombotsWalkingRPGInDoors;
|
bool randombotsWalkingRPGInDoors;
|
||||||
|
|||||||
Reference in New Issue
Block a user