mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
[Configuration] Disable death knight login
This commit is contained in:
@@ -281,11 +281,12 @@ bool PlayerbotAIConfig::Initialize()
|
||||
autoGearScoreLimit = sConfigMgr->GetOption<int32>("AiPlayerbot.AutoGearScoreLimit", 0);
|
||||
|
||||
playerbotsXPrate = sConfigMgr->GetOption<int32>("AiPlayerbot.KillXPRate", 1);
|
||||
disableDeathKnightLogin = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableDeathKnightLogin", 0);
|
||||
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 10);
|
||||
|
||||
enablePrototypePerformanceDiff = sConfigMgr->GetOption<bool>("AiPlayerbot.EnablePrototypePerformanceDiff", false);
|
||||
diffWithPlayer = sConfigMgr->GetOption("AiPlayerbot.DiffWithPlayer", 100);
|
||||
diffEmpty = sConfigMgr->GetIntDefault("AiPlayerbot.DiffEmpty", 200);
|
||||
diffWithPlayer = sConfigMgr->GetOption<int32>("AiPlayerbot.DiffWithPlayer", 100);
|
||||
diffEmpty = sConfigMgr->GetOption<int32>("AiPlayerbot.DiffEmpty", 200);
|
||||
|
||||
randombotsWalkingRPG = sConfigMgr->GetOption<bool>("AiPlayerbot.RandombotsWalkingRPG", false);
|
||||
randombotsWalkingRPGInDoors = sConfigMgr->GetOption<bool>("AiPlayerbot.RandombotsWalkingRPG.InDoors", false);
|
||||
|
||||
@@ -176,6 +176,7 @@ class PlayerbotAIConfig
|
||||
bool randomBotShowCloak;
|
||||
bool disableRandomLevels;
|
||||
uint32 playerbotsXPrate;
|
||||
bool disableDeathKnightLogin;
|
||||
uint32 botActiveAlone;
|
||||
|
||||
uint32 enablePrototypePerformanceDiff;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "Battleground.h"
|
||||
#include "BattlegroundMgr.h"
|
||||
#include "CellImpl.h"
|
||||
#include "DatabaseEnv.h"
|
||||
#include "Define.h"
|
||||
#include "FleeManager.h"
|
||||
#include "GameTime.h"
|
||||
@@ -26,6 +27,7 @@
|
||||
#include "Random.h"
|
||||
#include "ServerFacade.h"
|
||||
#include "ChannelMgr.h"
|
||||
#include "SharedDefines.h"
|
||||
#include "Unit.h"
|
||||
#include "World.h"
|
||||
#include "UpdateTime.h"
|
||||
@@ -480,7 +482,6 @@ uint32 RandomPlayerbotMgr::AddRandomBots()
|
||||
{
|
||||
Field* fields = result->Fetch();
|
||||
ObjectGuid::LowType guid = fields[0].Get<uint32>();
|
||||
|
||||
if (GetEventValue(guid, "add"))
|
||||
continue;
|
||||
|
||||
@@ -492,6 +493,18 @@ uint32 RandomPlayerbotMgr::AddRandomBots()
|
||||
|
||||
if (std::find(currentBots.begin(), currentBots.end(), guid) != currentBots.end())
|
||||
continue;
|
||||
|
||||
if (sPlayerbotAIConfig->disableDeathKnightLogin) {
|
||||
QueryResult result = CharacterDatabase.Query("Select class from characters where guid = {}", guid);
|
||||
if (!result) {
|
||||
continue;
|
||||
}
|
||||
Field* fields = result->Fetch();
|
||||
uint32 rClass = fields[0].Get<uint32>();
|
||||
if (rClass == CLASS_DEATH_KNIGHT) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
guids.push_back(guid);
|
||||
} while (result->NextRow());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user