mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-03-16 22:05:09 +00:00
# Pull Request Feat: A common problem I have with follower bots is that if I quickly run up to a flightmaster and select a destination, as I go on my way, the bots can't get on a damn bird and say "Cannot find any flightmaster to talk". Guy was 8 yards away and they're completely blind to him. This is because when you select a destination, at that moment the bot would check `GetNPCIfCanInteractWith` from core, which uses `INTERACTION_DISTANCE`, which is defined as 5.5 yards. So the bot has to have caught up with you to be within 5.5 yards of the flightmaster. This PR expands that distance to use our own `sPlayerbotAIConfig.farDistance`, which is by default set to 20 yards. So just as long as bots have caught up to be within 20 yards from the flightmaster, they will follow you. Fix: While I was doing this, I noticed that the timings for bot flight staggering (introduced in #1281) are defined in TaxiAction and PlayerbotAIConfig. So I removed their definitions from TaxiAction, made proper calls to the configs, and renamed them to similar format that other configs use. --- ## Design Philosophy We prioritize **stability, performance, and predictability** over behavioral realism. Complex player-mimicking logic is intentionally limited due to its negative impact on scalability, maintainability, and long-term robustness. Excessive processing overhead can lead to server hiccups, increased CPU usage, and degraded performance for all participants. Because every action and decision tree is executed **per bot and per trigger**, even small increases in logic complexity can scale poorly and negatively affect both players and world (random) bots. Bots are not expected to behave perfectly, and perfect simulation of human decision-making is not a project goal. Increased behavioral realism often introduces disproportionate cost, reduced predictability, and significantly higher maintenance overhead. Every additional branch of logic increases long-term responsibility. All decision paths must be tested, validated, and maintained continuously as the system evolves. If advanced or AI-intensive behavior is introduced, the **default configuration must remain the lightweight decision model**. More complex behavior should only be available as an **explicit opt-in option**, clearly documented as having a measurable performance cost. Principles: - **Stability before intelligence** A stable system is always preferred over a smarter one. - **Performance is a shared resource** Any increase in bot cost affects all players and all bots. - **Simple logic scales better than smart logic** Predictable behavior under load is more valuable than perfect decisions. - **Complexity must justify itself** If a feature cannot clearly explain its cost, it should not exist. - **Defaults must be cheap** Expensive behavior must always be optional and clearly communicated. - **Bots should look reasonable, not perfect** The goal is believable behavior, not human simulation. Before submitting, confirm that this change aligns with those principles. --- ## Feature Evaluation Please answer the following: - Describe the **minimum logic** required to achieve the intended behavior? - Describe the **cheapest implementation** that produces an acceptable result? - Describe the **runtime cost** when this logic executes across many bots? Changes here use a minimal amount of code to accomplish the objective, including using pre-defined distance values rather than creating new ones. Changes have no effect on processing. --- ## How to Test the Changes For expanding flightmaster search distance: You will be using the `stay` command. A bot commanded to `stay` will still take a flight with you, if it is near a flightmaster. So you can use the command to position the bot exactly where you want it to be 1. Place your follower bot immediately next to the flightmaster 2. Take a flight and the bot should follow. Nothing new here 3. Place the bot about 12 yards away from flightmaster. 4. Take a flight and the bot should follow. Same as before. 5. Repeat again, but this time place the bot 22 yards away. It should not follow you and instead say "Cannot find any flightmaster to talk" 6. The change should work correctly with `InstantFlightPaths = 0` in worldserver.conf, or if it's set to 1/2 and bots can instantly fly. For the config of staggering: 1. Make sure `InstantFlightPaths = 0` in worldserver.conf. 2. Change the timings in playerbots.conf under the `# FLIGHTPATH` section. 3. Changes should be correctly reflected in world. ## Complexity & Impact Does this change add new decision branches? - - [x] No - - [ ] Yes (**explain below**) Does this change increase per-bot or per-tick processing? - - [x] No - - [ ] Yes (**describe and justify impact**) Could this logic scale poorly under load? - - [x] No - - [ ] Yes (**explain why**) --- ## Defaults & Configuration Does this change modify default bot behavior? - - [x] No - - [ ] Yes (**explain why**) Follower bots search a slightly bigger distance for nearby flightmasters. If this introduces more advanced or AI-heavy logic: - - [x] Lightweight mode remains the default - - [x] More complex behavior is optional and thereby configurable --- ## AI Assistance Was AI assistance (e.g. ChatGPT or similar tools) used while working on this change? - - [x] No - - [ ] Yes (**explain below**) If yes, please specify: - AI tool or model used (e.g. ChatGPT, GPT-4, Claude, etc.) - Purpose of usage (e.g. brainstorming, refactoring, documentation, code generation) - Which parts of the change were influenced or generated - Whether the result was manually reviewed and adapted AI assistance is allowed, but all submitted code must be fully understood, reviewed, and owned by the contributor. Any AI-influenced changes must be verified against existing CORE and PB logic. We expect contributors to be honest about what they do and do not understand. --- ## Final Checklist - - [x] Stability is not compromised - - [x] Performance impact is understood, tested, and acceptable - - [x] Added logic complexity is justified and explained - - [x] Documentation updated if needed --- ## Notes for Reviewers Anything that significantly improves realism at the cost of stability or performance should be carefully discussed before merging.
470 lines
15 KiB
C++
470 lines
15 KiB
C++
/*
|
|
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU AGPL v3 license, you may redistribute it
|
|
* and/or modify it under version 3 of the License, or (at your option), any later version.
|
|
*/
|
|
|
|
#ifndef _PLAYERBOT_PLAYERbotAICONFIG_H
|
|
#define _PLAYERBOT_PLAYERbotAICONFIG_H
|
|
|
|
#include <mutex>
|
|
#include <unordered_map>
|
|
#include <set>
|
|
#include <vector>
|
|
#include <map>
|
|
#include <algorithm>
|
|
#include <string>
|
|
|
|
#include "DBCEnums.h"
|
|
#include "SharedDefines.h"
|
|
|
|
enum class BotCheatMask : uint32
|
|
{
|
|
none = 0,
|
|
taxi = 1,
|
|
gold = 2,
|
|
health = 4,
|
|
mana = 8,
|
|
power = 16,
|
|
raid = 32,
|
|
food = 64,
|
|
maxMask = 128
|
|
};
|
|
|
|
enum class HealingManaEfficiency : uint8
|
|
{
|
|
VERY_LOW = 1,
|
|
LOW = 2,
|
|
MEDIUM = 4,
|
|
HIGH = 8,
|
|
VERY_HIGH = 16,
|
|
SUPERIOR = 32
|
|
};
|
|
|
|
enum NewRpgStatus : int
|
|
{
|
|
//Initial Status
|
|
RPG_IDLE = 0,
|
|
RPG_GO_GRIND = 1,
|
|
RPG_GO_CAMP = 2,
|
|
// Exploring nearby
|
|
RPG_WANDER_RANDOM = 3,
|
|
RPG_WANDER_NPC = 4,
|
|
// Do Quest (based on quest status)
|
|
RPG_DO_QUEST = 5,
|
|
// Travel
|
|
|
|
RPG_TRAVEL_FLIGHT = 6,
|
|
// Taking a break
|
|
RPG_REST = 7,
|
|
RPG_STATUS_END = 8
|
|
};
|
|
|
|
#define MAX_SPECNO 20
|
|
|
|
class PlayerbotAIConfig
|
|
{
|
|
public:
|
|
static PlayerbotAIConfig& instance()
|
|
{
|
|
static PlayerbotAIConfig instance;
|
|
|
|
return instance;
|
|
}
|
|
|
|
bool Initialize();
|
|
bool IsInRandomAccountList(uint32 id);
|
|
bool IsInRandomQuestItemList(uint32 id);
|
|
bool IsPvpProhibited(uint32 zoneId, uint32 areaId);
|
|
bool IsInPvpProhibitedZone(uint32 id);
|
|
bool IsInPvpProhibitedArea(uint32 id);
|
|
|
|
bool enabled;
|
|
bool disabledWithoutRealPlayer;
|
|
bool EnableICCBuffs;
|
|
bool allowAccountBots, allowGuildBots, allowTrustedAccountBots;
|
|
bool randomBotGuildNearby, randomBotInvitePlayer, inviteChat;
|
|
uint32 globalCoolDown, reactDelay, maxWaitForMove, disableMoveSplinePath, maxMovementSearchTime, expireActionTime,
|
|
dispelAuraDuration, passiveDelay, repeatDelay, errorDelay, rpgDelay, sitDelay, returnDelay, lootDelay;
|
|
bool dynamicReactDelay;
|
|
float sightDistance, spellDistance, reactDistance, grindDistance, lootDistance, shootDistance, fleeDistance,
|
|
tooCloseDistance, meleeDistance, followDistance, whisperDistance, contactDistance, aoeRadius, rpgDistance,
|
|
targetPosRecalcDistance, farDistance, healDistance, aggroDistance;
|
|
uint32 criticalHealth, lowHealth, mediumHealth, almostFullHealth;
|
|
uint32 lowMana, mediumMana, highMana;
|
|
bool autoSaveMana;
|
|
uint32 saveManaThreshold;
|
|
bool autoAvoidAoe;
|
|
float maxAoeAvoidRadius;
|
|
std::set<uint32> aoeAvoidSpellWhitelist;
|
|
bool tellWhenAvoidAoe;
|
|
std::set<uint32> disallowedGameObjects;
|
|
std::set<uint32> attunementQuests;
|
|
|
|
uint32 openGoSpell;
|
|
bool randomBotAutologin;
|
|
bool botAutologin;
|
|
std::string randomBotMapsAsString;
|
|
float probTeleToBankers;
|
|
bool enableWeightTeleToCityBankers;
|
|
int weightTeleToStormwind;
|
|
int weightTeleToIronforge;
|
|
int weightTeleToDarnassus;
|
|
int weightTeleToExodar;
|
|
int weightTeleToOrgrimmar;
|
|
int weightTeleToUndercity;
|
|
int weightTeleToThunderBluff;
|
|
int weightTeleToSilvermoonCity;
|
|
int weightTeleToShattrathCity;
|
|
int weightTeleToDalaran;
|
|
std::vector<uint32> randomBotMaps;
|
|
std::vector<uint32> randomBotQuestItems;
|
|
std::vector<uint32> randomBotAccounts;
|
|
std::vector<uint32> randomBotSpellIds;
|
|
std::vector<uint32> randomBotQuestIds;
|
|
uint32 randomBotTeleportDistance;
|
|
float randomGearLoweringChance;
|
|
bool incrementalGearInit;
|
|
int32 randomGearQualityLimit;
|
|
int32 randomGearScoreLimit;
|
|
float randomBotMinLevelChance, randomBotMaxLevelChance;
|
|
float randomBotRpgChance;
|
|
uint32 minRandomBots, maxRandomBots;
|
|
uint32 randomBotUpdateInterval, randomBotCountChangeMinInterval, randomBotCountChangeMaxInterval;
|
|
uint32 minRandomBotInWorldTime, maxRandomBotInWorldTime;
|
|
uint32 minRandomBotRandomizeTime, maxRandomBotRandomizeTime;
|
|
uint32 minRandomBotChangeStrategyTime, maxRandomBotChangeStrategyTime;
|
|
uint32 minRandomBotReviveTime, maxRandomBotReviveTime;
|
|
uint32 minRandomBotTeleportInterval, maxRandomBotTeleportInterval;
|
|
uint32 permanentlyInWorldTime;
|
|
uint32 minRandomBotPvpTime, maxRandomBotPvpTime;
|
|
uint32 randomBotsPerInterval;
|
|
uint32 minRandomBotsPriceChangeInterval, maxRandomBotsPriceChangeInterval;
|
|
uint32 disabledWithoutRealPlayerLoginDelay, disabledWithoutRealPlayerLogoutDelay;
|
|
bool randomBotJoinLfg;
|
|
|
|
// Buff system
|
|
// Min group size to use Greater buffs (Paladin, Mage, Druid). Default: 3
|
|
int32 minBotsForGreaterBuff;
|
|
// Cooldown (seconds) between reagent-missing RP warnings, per bot & per buff. Default: 30
|
|
int32 rpWarningCooldown;
|
|
|
|
// Professions
|
|
bool enableFishingWithMaster;
|
|
float fishingDistanceFromMaster, fishingDistance, endFishingWithMaster;
|
|
|
|
// chat
|
|
bool randomBotTalk;
|
|
bool randomBotEmote;
|
|
bool randomBotSuggestDungeons;
|
|
bool enableBroadcasts;
|
|
bool enableGreet;
|
|
bool randomBotSayWithoutMaster;
|
|
|
|
uint32 broadcastChanceMaxValue;
|
|
|
|
uint32 broadcastToGuildGlobalChance;
|
|
uint32 broadcastToWorldGlobalChance;
|
|
uint32 broadcastToGeneralGlobalChance;
|
|
uint32 broadcastToTradeGlobalChance;
|
|
uint32 broadcastToLFGGlobalChance;
|
|
uint32 broadcastToLocalDefenseGlobalChance;
|
|
uint32 broadcastToWorldDefenseGlobalChance;
|
|
uint32 broadcastToGuildRecruitmentGlobalChance;
|
|
|
|
uint32 broadcastChanceLootingItemPoor;
|
|
uint32 broadcastChanceLootingItemNormal;
|
|
uint32 broadcastChanceLootingItemUncommon;
|
|
uint32 broadcastChanceLootingItemRare;
|
|
uint32 broadcastChanceLootingItemEpic;
|
|
uint32 broadcastChanceLootingItemLegendary;
|
|
uint32 broadcastChanceLootingItemArtifact;
|
|
|
|
uint32 broadcastChanceQuestAccepted;
|
|
uint32 broadcastChanceQuestUpdateObjectiveCompleted;
|
|
uint32 broadcastChanceQuestUpdateObjectiveProgress;
|
|
uint32 broadcastChanceQuestUpdateFailedTimer;
|
|
uint32 broadcastChanceQuestUpdateComplete;
|
|
uint32 broadcastChanceQuestTurnedIn;
|
|
|
|
uint32 broadcastChanceKillNormal;
|
|
uint32 broadcastChanceKillElite;
|
|
uint32 broadcastChanceKillRareelite;
|
|
uint32 broadcastChanceKillWorldboss;
|
|
uint32 broadcastChanceKillRare;
|
|
uint32 broadcastChanceKillUnknown;
|
|
uint32 broadcastChanceKillPet;
|
|
uint32 broadcastChanceKillPlayer;
|
|
|
|
uint32 broadcastChanceLevelupGeneric;
|
|
uint32 broadcastChanceLevelupTenX;
|
|
uint32 broadcastChanceLevelupMaxLevel;
|
|
|
|
uint32 broadcastChanceSuggestInstance;
|
|
uint32 broadcastChanceSuggestQuest;
|
|
uint32 broadcastChanceSuggestGrindMaterials;
|
|
uint32 broadcastChanceSuggestGrindReputation;
|
|
uint32 broadcastChanceSuggestSell;
|
|
uint32 broadcastChanceSuggestSomething;
|
|
|
|
uint32 broadcastChanceSuggestSomethingToxic;
|
|
|
|
uint32 broadcastChanceSuggestToxicLinks;
|
|
std::string toxicLinksPrefix;
|
|
uint32 toxicLinksRepliesChance;
|
|
|
|
uint32 broadcastChanceSuggestThunderfury;
|
|
uint32 thunderfuryRepliesChance;
|
|
|
|
uint32 broadcastChanceGuildManagement;
|
|
|
|
uint32 guildRepliesRate;
|
|
|
|
bool suggestDungeonsInLowerCaseRandomly;
|
|
|
|
// --
|
|
|
|
bool randomBotJoinBG;
|
|
bool randomBotAutoJoinBG;
|
|
|
|
std::string randomBotAutoJoinICBrackets;
|
|
std::string randomBotAutoJoinEYBrackets;
|
|
std::string randomBotAutoJoinAVBrackets;
|
|
std::string randomBotAutoJoinABBrackets;
|
|
std::string randomBotAutoJoinWSBrackets;
|
|
|
|
uint32 randomBotAutoJoinBGICCount;
|
|
uint32 randomBotAutoJoinBGEYCount;
|
|
uint32 randomBotAutoJoinBGAVCount;
|
|
uint32 randomBotAutoJoinBGABCount;
|
|
uint32 randomBotAutoJoinBGWSCount;
|
|
|
|
uint32 randomBotAutoJoinArenaBracket;
|
|
|
|
uint32 randomBotAutoJoinBGRatedArena2v2Count;
|
|
uint32 randomBotAutoJoinBGRatedArena3v3Count;
|
|
uint32 randomBotAutoJoinBGRatedArena5v5Count;
|
|
|
|
bool randomBotLoginAtStartup;
|
|
uint32 randomBotTeleLowerLevel, randomBotTeleHigherLevel;
|
|
std::map<uint32, std::pair<uint32, uint32>> zoneBrackets;
|
|
bool logInGroupOnly, logValuesPerTick;
|
|
bool fleeingEnabled;
|
|
bool summonAtInnkeepersEnabled;
|
|
std::string combatStrategies, nonCombatStrategies;
|
|
std::string randomBotCombatStrategies, randomBotNonCombatStrategies;
|
|
bool applyInstanceStrategies;
|
|
uint32 randomBotMinLevel, randomBotMaxLevel;
|
|
float randomChangeMultiplier;
|
|
|
|
// std::string premadeLevelSpec[MAX_CLASSES][10][91]; //lvl 10 - 100
|
|
// ClassSpecs classSpecs[MAX_CLASSES];
|
|
|
|
std::string premadeSpecName[MAX_CLASSES][MAX_SPECNO];
|
|
std::string premadeSpecGlyph[MAX_CLASSES][MAX_SPECNO];
|
|
std::vector<uint32> parsedSpecGlyph[MAX_CLASSES][MAX_SPECNO];
|
|
std::string premadeSpecLink[MAX_CLASSES][MAX_SPECNO][MAX_LEVEL];
|
|
std::string premadeHunterPetLink[3][21];
|
|
std::vector<std::vector<uint32>> parsedSpecLinkOrder[MAX_CLASSES][MAX_SPECNO][MAX_LEVEL];
|
|
std::vector<std::vector<uint32>> parsedHunterPetLinkOrder[3][21];
|
|
uint32 randomClassSpecProb[MAX_CLASSES][MAX_SPECNO];
|
|
uint32 randomClassSpecIndex[MAX_CLASSES][MAX_SPECNO];
|
|
|
|
std::string commandPrefix, commandSeparator;
|
|
std::string randomBotAccountPrefix;
|
|
uint32 randomBotAccountCount;
|
|
bool randomBotRandomPassword;
|
|
bool deleteRandomBotAccounts;
|
|
uint32 randomBotGuildCount, randomBotGuildSizeMax;
|
|
bool deleteRandomBotGuilds;
|
|
std::vector<uint32> pvpProhibitedZoneIds;
|
|
std::vector<uint32> pvpProhibitedAreaIds;
|
|
bool fastReactInBG;
|
|
|
|
bool randombotsWalkingRPG;
|
|
bool randombotsWalkingRPGInDoors;
|
|
uint32 minEnchantingBotLevel;
|
|
uint32 limitEnchantExpansion;
|
|
uint32 limitGearExpansion;
|
|
uint32 randombotStartingLevel;
|
|
bool enablePeriodicOnlineOffline;
|
|
float periodicOnlineOfflineRatio;
|
|
bool gearscorecheck;
|
|
bool randomBotPreQuests;
|
|
|
|
bool guildTaskEnabled;
|
|
uint32 minGuildTaskChangeTime, maxGuildTaskChangeTime;
|
|
uint32 minGuildTaskAdvertisementTime, maxGuildTaskAdvertisementTime;
|
|
uint32 minGuildTaskRewardTime, maxGuildTaskRewardTime;
|
|
uint32 guildTaskAdvertCleanupTime;
|
|
uint32 guildTaskKillTaskDistance;
|
|
|
|
uint32 iterationsPerTick;
|
|
|
|
std::mutex m_logMtx;
|
|
std::vector<std::string> tradeActionExcludedPrefixes;
|
|
std::vector<std::string> allowedLogFiles;
|
|
std::unordered_map<std::string, std::pair<FILE*, bool>> logFiles;
|
|
|
|
std::vector<std::string> botCheats;
|
|
uint32 botCheatMask = 0;
|
|
|
|
struct worldBuff
|
|
{
|
|
uint32 spellId;
|
|
uint32 factionId;
|
|
uint32 classId;
|
|
uint32 specId;
|
|
uint32 minLevel;
|
|
uint32 maxLevel;
|
|
};
|
|
|
|
std::vector<worldBuff> worldBuffs;
|
|
|
|
uint32 commandServerPort;
|
|
bool perfMonEnabled;
|
|
bool summonWhenGroup;
|
|
bool randomBotShowHelmet;
|
|
bool randomBotShowCloak;
|
|
bool randomBotFixedLevel;
|
|
bool disableRandomLevels;
|
|
float randomBotXPRate;
|
|
uint32 randomBotAllianceRatio;
|
|
uint32 randomBotHordeRatio;
|
|
bool disableDeathKnightLogin;
|
|
bool limitTalentsExpansion;
|
|
uint32 botActiveAlone;
|
|
uint32 BotActiveAloneForceWhenInRadius;
|
|
bool BotActiveAloneForceWhenInZone;
|
|
bool BotActiveAloneForceWhenInMap;
|
|
bool BotActiveAloneForceWhenIsFriend;
|
|
bool BotActiveAloneForceWhenInGuild;
|
|
bool botActiveAloneSmartScale;
|
|
uint32 botActiveAloneSmartScaleDiffLimitfloor;
|
|
uint32 botActiveAloneSmartScaleDiffLimitCeiling;
|
|
uint32 botActiveAloneSmartScaleWhenMinLevel;
|
|
uint32 botActiveAloneSmartScaleWhenMaxLevel;
|
|
|
|
bool freeMethodLoot;
|
|
int32 lootRollLevel;
|
|
std::string autoPickReward;
|
|
bool autoEquipUpgradeLoot;
|
|
float equipUpgradeThreshold;
|
|
bool twoRoundsGearInit;
|
|
bool syncQuestWithPlayer;
|
|
bool syncQuestForPlayer;
|
|
bool dropObsoleteQuests;
|
|
bool allowLearnTrainerSpells;
|
|
bool autoPickTalents;
|
|
bool autoUpgradeEquip;
|
|
int32 hunterWolfPet;
|
|
int32 defaultPetStance;
|
|
int32 petChatCommandDebug;
|
|
bool autoLearnTrainerSpells;
|
|
bool autoDoQuests;
|
|
bool enableNewRpgStrategy;
|
|
std::unordered_map<NewRpgStatus, uint32> RpgStatusProbWeight;
|
|
bool syncLevelWithPlayers;
|
|
bool autoLearnQuestSpells;
|
|
bool autoTeleportForLevel;
|
|
bool randomBotGroupNearby;
|
|
int32 enableRandomBotTrading;
|
|
uint32 tweakValue; // Debugging config
|
|
|
|
uint32 randomBotArenaTeamCount;
|
|
uint32 randomBotArenaTeamMaxRating;
|
|
uint32 randomBotArenaTeamMinRating;
|
|
uint32 randomBotArenaTeam2v2Count;
|
|
uint32 randomBotArenaTeam3v3Count;
|
|
uint32 randomBotArenaTeam5v5Count;
|
|
bool deleteRandomBotArenaTeams;
|
|
std::vector<uint32> randomBotArenaTeams;
|
|
|
|
uint32 selfBotLevel;
|
|
bool downgradeMaxLevelBot;
|
|
bool equipmentPersistence;
|
|
int32 equipmentPersistenceLevel;
|
|
int32 groupInvitationPermission;
|
|
bool keepAltsInGroup = false;
|
|
bool KeepAltsInGroup() const { return keepAltsInGroup; }
|
|
bool allowSummonInCombat;
|
|
bool allowSummonWhenMasterIsDead;
|
|
bool allowSummonWhenBotIsDead;
|
|
int reviveBotWhenSummoned;
|
|
bool botRepairWhenSummon;
|
|
bool autoInitOnly;
|
|
float autoInitEquipLevelLimitRatio;
|
|
int32 maxAddedBots;
|
|
int32 addClassCommand;
|
|
int32 addClassAccountPoolSize;
|
|
int32 maintenanceCommand;
|
|
bool altMaintenanceAttunementQs,
|
|
altMaintenanceBags,
|
|
altMaintenanceAmmo,
|
|
altMaintenanceFood,
|
|
altMaintenanceReagents,
|
|
altMaintenanceConsumables,
|
|
altMaintenancePotions,
|
|
altMaintenanceTalentTree,
|
|
altMaintenancePet,
|
|
altMaintenancePetTalents,
|
|
altMaintenanceClassSpells,
|
|
altMaintenanceAvailableSpells,
|
|
altMaintenanceSkills,
|
|
altMaintenanceReputation,
|
|
altMaintenanceSpecialSpells,
|
|
altMaintenanceMounts,
|
|
altMaintenanceGlyphs,
|
|
altMaintenanceKeyring,
|
|
altMaintenanceGemsEnchants;
|
|
int32 autoGearCommand, autoGearCommandAltBots, autoGearQualityLimit, autoGearScoreLimit;
|
|
|
|
uint32 useGroundMountAtMinLevel;
|
|
uint32 useFastGroundMountAtMinLevel;
|
|
uint32 useFlyMountAtMinLevel;
|
|
uint32 useFastFlyMountAtMinLevel;
|
|
|
|
// stagger flightpath takeoff
|
|
uint32 botTaxiDelayMin;
|
|
uint32 botTaxiDelayMax;
|
|
uint32 botTaxiGapMs;
|
|
uint32 botTaxiGapJitterMs;
|
|
|
|
std::string const GetTimestampStr();
|
|
bool hasLog(std::string const fileName)
|
|
{
|
|
return std::find(allowedLogFiles.begin(), allowedLogFiles.end(), fileName) != allowedLogFiles.end();
|
|
};
|
|
bool openLog(std::string const fileName, char const* mode = "a");
|
|
bool isLogOpen(std::string const fileName)
|
|
{
|
|
auto it = logFiles.find(fileName);
|
|
return it != logFiles.end() && it->second.second;
|
|
}
|
|
void log(std::string const fileName, const char* str, ...);
|
|
|
|
void loadWorldBuff();
|
|
|
|
static std::vector<std::vector<uint32>> ParseTempTalentsOrder(uint32 cls, std::string temp_talents_order);
|
|
static std::vector<std::vector<uint32>> ParseTempPetTalentsOrder(uint32 spec, std::string temp_talents_order);
|
|
|
|
bool restrictHealerDPS = false;
|
|
std::vector<uint32> restrictedHealerDPSMaps;
|
|
bool IsRestrictedHealerDPSMap(uint32 mapId) const;
|
|
|
|
std::vector<uint32> excludedHunterPetFamilies;
|
|
|
|
private:
|
|
PlayerbotAIConfig() = default;
|
|
~PlayerbotAIConfig() = default;
|
|
|
|
PlayerbotAIConfig(const PlayerbotAIConfig&) = delete;
|
|
PlayerbotAIConfig& operator=(const PlayerbotAIConfig&) = delete;
|
|
|
|
PlayerbotAIConfig(PlayerbotAIConfig&&) = delete;
|
|
PlayerbotAIConfig& operator=(PlayerbotAIConfig&&) = delete;
|
|
};
|
|
|
|
#define sPlayerbotAIConfig PlayerbotAIConfig::instance()
|
|
|
|
#endif
|