mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
add bot mount in conf
This commit is contained in:
@@ -312,6 +312,11 @@ bool PlayerbotAIConfig::Initialize()
|
||||
commandServerPort = sConfigMgr->GetOption<int32>("AiPlayerbot.CommandServerPort", 8888);
|
||||
perfMonEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.PerfMonEnabled", false);
|
||||
|
||||
useGroundMountAtMinLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.UseGroundMountAtMinLevel", 20);
|
||||
useFastGroundMountAtMinLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.UseFastGroundMountAtMinLevel", 40);
|
||||
useFlyMountAtMinLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.UseFlyMountAtMinLevel", 60);
|
||||
useFastFlyMountAtMinLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.UseFastFlyMountAtMinLevel", 70);
|
||||
|
||||
LOG_INFO("server.loading", "---------------------------------------");
|
||||
LOG_INFO("server.loading", " Loading TalentSpecs ");
|
||||
LOG_INFO("server.loading", "---------------------------------------");
|
||||
|
||||
@@ -326,6 +326,11 @@ public:
|
||||
int32 maintenanceCommand;
|
||||
int32 autoGearCommand, autoGearCommandAltBots, autoGearQualityLimit, autoGearScoreLimit;
|
||||
|
||||
uint32 useGroundMountAtMinLevel;
|
||||
uint32 useFastGroundMountAtMinLevel;
|
||||
uint32 useFlyMountAtMinLevel;
|
||||
uint32 useFastFlyMountAtMinLevel;
|
||||
|
||||
std::string const GetTimestampStr();
|
||||
bool hasLog(std::string const fileName)
|
||||
{
|
||||
|
||||
@@ -2825,10 +2825,10 @@ uint32 PlayerbotFactory::CalcMixedGearScore(uint32 gs, uint32 quality)
|
||||
|
||||
void PlayerbotFactory::InitMounts()
|
||||
{
|
||||
uint32 firstmount = 20;
|
||||
uint32 secondmount = 40;
|
||||
uint32 thirdmount = 60;
|
||||
uint32 fourthmount = 70;
|
||||
uint32 firstmount = sPlayerbotAIConfig->useGroundMountAtMinLevel;
|
||||
uint32 secondmount = sPlayerbotAIConfig->useFastGroundMountAtMinLevel;
|
||||
uint32 thirdmount = sPlayerbotAIConfig->useFlyMountAtMinLevel;
|
||||
uint32 fourthmount = sPlayerbotAIConfig->useFastFlyMountAtMinLevel;
|
||||
|
||||
if (bot->GetLevel() < firstmount)
|
||||
return;
|
||||
|
||||
@@ -152,7 +152,7 @@ bool CheckMountStateAction::isUseful()
|
||||
if (!GET_PLAYERBOT_AI(bot)->HasStrategy("mount", BOT_STATE_NON_COMBAT) && !bot->IsMounted())
|
||||
return false;
|
||||
|
||||
bool firstmount = bot->GetLevel() >= 20;
|
||||
bool firstmount = bot->GetLevel() >= sPlayerbotAIConfig->useGroundMountAtMinLevel;
|
||||
if (!firstmount)
|
||||
return false;
|
||||
|
||||
@@ -178,7 +178,7 @@ bool CheckMountStateAction::isUseful()
|
||||
|
||||
bool CheckMountStateAction::Mount()
|
||||
{
|
||||
uint32 secondmount = 40;
|
||||
uint32 secondmount = sPlayerbotAIConfig->useFastGroundMountAtMinLevel;
|
||||
|
||||
if (bot->isMoving())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user