Merge pull request #65 from whipowill/compilebugs

Silence many Clang compiler warnings on Linux
This commit is contained in:
ZhengPeiRu21
2022-05-23 09:12:11 -06:00
committed by GitHub
53 changed files with 345 additions and 345 deletions

1
.gitignore vendored
View File

@@ -31,6 +31,7 @@ CMakeLists.txt.user
nbproject/
.sync.ffs_db
*.kate-swp
reset.sh
#
# Eclipse

View File

@@ -46,7 +46,7 @@ class FleeManager
Player* bot;
float maxAllowedDistance;
float followAngle;
[[maybe_unused]] float followAngle; // unused - whipowill
bool forceMaxDistance;
WorldPosition startPosition;
};

View File

@@ -74,7 +74,7 @@ void PlaceholderHelper::InsertDungeonStrategy(Insertion& insertion)
}
}
void PlaceholderHelper::InsertDifficulty(Insertion& insertion, Player* bot)
void PlaceholderHelper::InsertDifficulty(Insertion& insertion, [[maybe_unused]] Player* bot)
{
bool const hasHeroic = insertion.dungeonSuggestion->difficulty == DUNGEON_DIFFICULTY_HEROIC;
std::string difficultyText;

View File

@@ -79,7 +79,7 @@ PlayerbotAI::PlayerbotAI() : PlayerbotAIBase(true), bot(nullptr), aiObjectContex
}
}
PlayerbotAI::PlayerbotAI(Player* bot) : PlayerbotAIBase(true), bot(bot), chatHelper(this), chatFilter(this), security(bot), master(nullptr)
PlayerbotAI::PlayerbotAI(Player* bot) : PlayerbotAIBase(true), bot(bot), chatHelper(this), chatFilter(this), master(nullptr), security(bot) // reorder args - whipowill
{
if (!bot->isTaxiCheater() && HasCheat((BotCheatMask::taxi)))
bot->SetTaxiCheater(true);
@@ -253,7 +253,7 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal)
YieldThread(min);
}
void PlayerbotAI::UpdateAIInternal(uint32 elapsed, bool minimal)
void PlayerbotAI::UpdateAIInternal([[maybe_unused]] uint32 elapsed, bool minimal)
{
if (bot->IsBeingTeleported() || !bot->IsInWorld())
return;
@@ -801,7 +801,7 @@ void PlayerbotAI::DoNextAction(bool min)
bot->GetMotionMaster()->MoveIdle();
//Death Count to prevent skeleton piles
Player* master = GetMaster();
Player* master = GetMaster(); // warning here - whipowill
if (!HasActivePlayerMaster() && !bot->InBattleground())
{
uint32 dCount = aiObjectContext->GetValue<uint32>("death count")->Get();

View File

@@ -45,111 +45,111 @@ bool PlayerbotAIConfig::Initialize()
{
LOG_INFO("server.loading", "Initializing AI Playerbots by ike3, based on the original Playerbots by blueboy");
enabled = sConfigMgr->GetBoolDefault("AiPlayerbot.Enabled", true);
enabled = sConfigMgr->GetOption<bool>("AiPlayerbot.Enabled", true);
if (!enabled)
{
LOG_INFO("server.loading", "AI Playerbots is Disabled in aiplayerbot.conf");
return false;
}
globalCoolDown = sConfigMgr->GetIntDefault("AiPlayerbot.GlobalCooldown", 1500);
maxWaitForMove = sConfigMgr->GetIntDefault("AiPlayerbot.MaxWaitForMove", 5000);
expireActionTime = sConfigMgr->GetIntDefault("AiPlayerbot.ExpireActionTime", 5000);
dispelAuraDuration = sConfigMgr->GetIntDefault("AiPlayerbot.DispelAuraDuration", 7000);
reactDelay = sConfigMgr->GetIntDefault("AiPlayerbot.ReactDelay", 500);
passiveDelay = sConfigMgr->GetIntDefault("AiPlayerbot.PassiveDelay", 10000);
repeatDelay = sConfigMgr->GetIntDefault("AiPlayerbot.RepeatDelay", 5000);
errorDelay = sConfigMgr->GetIntDefault("AiPlayerbot.ErrorDelay", 5000);
rpgDelay = sConfigMgr->GetIntDefault("AiPlayerbot.RpgDelay", 10000);
sitDelay = sConfigMgr->GetIntDefault("AiPlayerbot.SitDelay", 30000);
returnDelay = sConfigMgr->GetIntDefault("AiPlayerbot.ReturnDelay", 7000);
lootDelay = sConfigMgr->GetIntDefault("AiPlayerbot.LootDelay", 1000);
globalCoolDown = sConfigMgr->GetOption<int32>("AiPlayerbot.GlobalCooldown", 1500);
maxWaitForMove = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxWaitForMove", 5000);
expireActionTime = sConfigMgr->GetOption<int32>("AiPlayerbot.ExpireActionTime", 5000);
dispelAuraDuration = sConfigMgr->GetOption<int32>("AiPlayerbot.DispelAuraDuration", 7000);
reactDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.ReactDelay", 500);
passiveDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.PassiveDelay", 10000);
repeatDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.RepeatDelay", 5000);
errorDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.ErrorDelay", 5000);
rpgDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.RpgDelay", 10000);
sitDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.SitDelay", 30000);
returnDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.ReturnDelay", 7000);
lootDelay = sConfigMgr->GetOption<int32>("AiPlayerbot.LootDelay", 1000);
farDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.FarDistance", 20.0f);
sightDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.SightDistance", 75.0f);
spellDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.SpellDistance", 22.0f);
shootDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.ShootDistance", 25.0f);
healDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.HealDistance", 20.0f);
lootDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.LootDistance", 15.0f);
fleeDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.FleeDistance", 7.5f);
aggroDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.AggroDistance", 22.0f);
tooCloseDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.TooCloseDistance", 5.0f);
meleeDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.MeleeDistance", 1.5f);
followDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.FollowDistance", 1.5f);
whisperDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.WhisperDistance", 6000.0f);
contactDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.ContactDistance", 0.5f);
aoeRadius = sConfigMgr->GetFloatDefault("AiPlayerbot.AoeRadius", 5.0f);
rpgDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.RpgDistance", 200.0f);
grindDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.GrindDistance", 75.0f);
reactDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.ReactDistance", 150.0f);
farDistance = sConfigMgr->GetOption<float>("AiPlayerbot.FarDistance", 20.0f);
sightDistance = sConfigMgr->GetOption<float>("AiPlayerbot.SightDistance", 75.0f);
spellDistance = sConfigMgr->GetOption<float>("AiPlayerbot.SpellDistance", 22.0f);
shootDistance = sConfigMgr->GetOption<float>("AiPlayerbot.ShootDistance", 25.0f);
healDistance = sConfigMgr->GetOption<float>("AiPlayerbot.HealDistance", 20.0f);
lootDistance = sConfigMgr->GetOption<float>("AiPlayerbot.LootDistance", 15.0f);
fleeDistance = sConfigMgr->GetOption<float>("AiPlayerbot.FleeDistance", 7.5f);
aggroDistance = sConfigMgr->GetOption<float>("AiPlayerbot.AggroDistance", 22.0f);
tooCloseDistance = sConfigMgr->GetOption<float>("AiPlayerbot.TooCloseDistance", 5.0f);
meleeDistance = sConfigMgr->GetOption<float>("AiPlayerbot.MeleeDistance", 1.5f);
followDistance = sConfigMgr->GetOption<float>("AiPlayerbot.FollowDistance", 1.5f);
whisperDistance = sConfigMgr->GetOption<float>("AiPlayerbot.WhisperDistance", 6000.0f);
contactDistance = sConfigMgr->GetOption<float>("AiPlayerbot.ContactDistance", 0.5f);
aoeRadius = sConfigMgr->GetOption<float>("AiPlayerbot.AoeRadius", 5.0f);
rpgDistance = sConfigMgr->GetOption<float>("AiPlayerbot.RpgDistance", 200.0f);
grindDistance = sConfigMgr->GetOption<float>("AiPlayerbot.GrindDistance", 75.0f);
reactDistance = sConfigMgr->GetOption<float>("AiPlayerbot.ReactDistance", 150.0f);
criticalHealth = sConfigMgr->GetIntDefault("AiPlayerbot.CriticalHealth", 20);
lowHealth = sConfigMgr->GetIntDefault("AiPlayerbot.LowHealth", 45);
mediumHealth = sConfigMgr->GetIntDefault("AiPlayerbot.MediumHealth", 65);
almostFullHealth = sConfigMgr->GetIntDefault("AiPlayerbot.AlmostFullHealth", 85);
lowMana = sConfigMgr->GetIntDefault("AiPlayerbot.LowMana", 15);
mediumMana = sConfigMgr->GetIntDefault("AiPlayerbot.MediumMana", 40);
criticalHealth = sConfigMgr->GetOption<int32>("AiPlayerbot.CriticalHealth", 20);
lowHealth = sConfigMgr->GetOption<int32>("AiPlayerbot.LowHealth", 45);
mediumHealth = sConfigMgr->GetOption<int32>("AiPlayerbot.MediumHealth", 65);
almostFullHealth = sConfigMgr->GetOption<int32>("AiPlayerbot.AlmostFullHealth", 85);
lowMana = sConfigMgr->GetOption<int32>("AiPlayerbot.LowMana", 15);
mediumMana = sConfigMgr->GetOption<int32>("AiPlayerbot.MediumMana", 40);
randomGearLoweringChance = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomGearLoweringChance", 0.15f);
randomBotMaxLevelChance = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomBotMaxLevelChance", 0.15f);
randomBotRpgChance = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomBotRpgChance", 0.20f);
randomGearLoweringChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomGearLoweringChance", 0.15f);
randomBotMaxLevelChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomBotMaxLevelChance", 0.15f);
randomBotRpgChance = sConfigMgr->GetOption<float>("AiPlayerbot.RandomBotRpgChance", 0.20f);
iterationsPerTick = sConfigMgr->GetIntDefault("AiPlayerbot.IterationsPerTick", 100);
iterationsPerTick = sConfigMgr->GetOption<int32>("AiPlayerbot.IterationsPerTick", 100);
allowGuildBots = sConfigMgr->GetBoolDefault("AiPlayerbot.AllowGuildBots", true);
allowGuildBots = sConfigMgr->GetOption<bool>("AiPlayerbot.AllowGuildBots", true);
randomBotMapsAsString = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotMaps", "0,1,530,571");
randomBotMapsAsString = sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotMaps", "0,1,530,571");
LoadList<std::vector<uint32>>(randomBotMapsAsString, randomBotMaps);
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotQuestItems", "6948,5175,5176,5177,5178,16309,12382,13704,11000"), randomBotQuestItems);
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotSpellIds", "54197"), randomBotSpellIds);
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault("AiPlayerbot.PvpProhibitedZoneIds", "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323"), pvpProhibitedZoneIds);
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"), randomBotQuestIds);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestItems", "6948,5175,5176,5177,5178,16309,12382,13704,11000"), randomBotQuestItems);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotSpellIds", "54197"), randomBotSpellIds);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.PvpProhibitedZoneIds", "2255,656,2361,2362,2363,976,35,2268,3425,392,541,1446,3828,3712,3738,3565,3539,3623,4152,3988,4658,4284,4418,4436,4275,4323"), pvpProhibitedZoneIds);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotQuestIds", "7848,3802,5505,6502,7761"), randomBotQuestIds);
botAutologin = sConfigMgr->GetBoolDefault("AiPlayerbot.BotAutologin", false);
randomBotAutologin = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotAutologin", true);
minRandomBots = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBots", 50);
maxRandomBots = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBots", 200);
randomBotUpdateInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotUpdateInterval", MINUTE);
randomBotCountChangeMinInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotCountChangeMinInterval", 30 * MINUTE);
randomBotCountChangeMaxInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotCountChangeMaxInterval", 2 * HOUR);
minRandomBotInWorldTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotInWorldTime", 2 * HOUR);
maxRandomBotInWorldTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotInWorldTime", 12 * HOUR);
minRandomBotRandomizeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotRandomizeTime", 2 * HOUR);
maxRandomBotRandomizeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomRandomizeTime", 14 * 24 * HOUR);
minRandomBotChangeStrategyTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotChangeStrategyTime", 30 * MINUTE);
maxRandomBotChangeStrategyTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotChangeStrategyTime", 2 * HOUR);
minRandomBotReviveTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotReviveTime", MINUTE);
maxRandomBotReviveTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotReviveTime", 5 * MINUTE);
randomBotTeleportDistance = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotTeleportDistance", 100);
randomBotsPerInterval = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotsPerInterval", MINUTE);
minRandomBotsPriceChangeInterval = sConfigMgr->GetIntDefault("AiPlayerbot.MinRandomBotsPriceChangeInterval", 2 * HOUR);
maxRandomBotsPriceChangeInterval = sConfigMgr->GetIntDefault("AiPlayerbot.MaxRandomBotsPriceChangeInterval", 48 * HOUR);
randomBotJoinLfg = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotJoinLfg", true);
randomBotSuggestDungeons = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotSuggestDungeons", true);
suggestDungeonsInLowerCaseRandomly = sConfigMgr->GetBoolDefault("AiPlayerbot.SuggestDungeonsInLowerCaseRandomly", false);
randomBotJoinBG = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotJoinBG", true);
logInGroupOnly = sConfigMgr->GetBoolDefault("AiPlayerbot.LogInGroupOnly", true);
logValuesPerTick = sConfigMgr->GetBoolDefault("AiPlayerbot.LogValuesPerTick", false);
fleeingEnabled = sConfigMgr->GetBoolDefault("AiPlayerbot.FleeingEnabled", true);
summonAtInnkeepersEnabled = sConfigMgr->GetBoolDefault("AiPlayerbot.SummonAtInnkeepersEnabled", true);
randomBotMinLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotMinLevel", 1);
randomBotMaxLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotMaxLevel", 80);
randomBotLoginAtStartup = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotLoginAtStartup", true);
randomBotTeleLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotTeleLevel", 5);
openGoSpell = sConfigMgr->GetIntDefault("AiPlayerbot.OpenGoSpell", 6477);
botAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.BotAutologin", false);
randomBotAutologin = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotAutologin", true);
minRandomBots = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBots", 50);
maxRandomBots = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBots", 200);
randomBotUpdateInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotUpdateInterval", MINUTE);
randomBotCountChangeMinInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotCountChangeMinInterval", 30 * MINUTE);
randomBotCountChangeMaxInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotCountChangeMaxInterval", 2 * HOUR);
minRandomBotInWorldTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotInWorldTime", 2 * HOUR);
maxRandomBotInWorldTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotInWorldTime", 12 * HOUR);
minRandomBotRandomizeTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotRandomizeTime", 2 * HOUR);
maxRandomBotRandomizeTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomRandomizeTime", 14 * 24 * HOUR);
minRandomBotChangeStrategyTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotChangeStrategyTime", 30 * MINUTE);
maxRandomBotChangeStrategyTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotChangeStrategyTime", 2 * HOUR);
minRandomBotReviveTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotReviveTime", MINUTE);
maxRandomBotReviveTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotReviveTime", 5 * MINUTE);
randomBotTeleportDistance = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleportDistance", 100);
randomBotsPerInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotsPerInterval", MINUTE);
minRandomBotsPriceChangeInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.MinRandomBotsPriceChangeInterval", 2 * HOUR);
maxRandomBotsPriceChangeInterval = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxRandomBotsPriceChangeInterval", 48 * HOUR);
randomBotJoinLfg = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotJoinLfg", true);
randomBotSuggestDungeons = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotSuggestDungeons", true);
suggestDungeonsInLowerCaseRandomly = sConfigMgr->GetOption<bool>("AiPlayerbot.SuggestDungeonsInLowerCaseRandomly", false);
randomBotJoinBG = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotJoinBG", true);
logInGroupOnly = sConfigMgr->GetOption<bool>("AiPlayerbot.LogInGroupOnly", true);
logValuesPerTick = sConfigMgr->GetOption<bool>("AiPlayerbot.LogValuesPerTick", false);
fleeingEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.FleeingEnabled", true);
summonAtInnkeepersEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.SummonAtInnkeepersEnabled", true);
randomBotMinLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotMinLevel", 1);
randomBotMaxLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotMaxLevel", 80);
randomBotLoginAtStartup = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotLoginAtStartup", true);
randomBotTeleLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotTeleLevel", 5);
openGoSpell = sConfigMgr->GetOption<int32>("AiPlayerbot.OpenGoSpell", 6477);
randomChangeMultiplier = sConfigMgr->GetFloatDefault("AiPlayerbot.RandomChangeMultiplier", 1.0);
randomChangeMultiplier = sConfigMgr->GetOption<float>("AiPlayerbot.RandomChangeMultiplier", 1.0);
randomBotCombatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotCombatStrategies", "-threat");
randomBotNonCombatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotNonCombatStrategies", "");
combatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.CombatStrategies", "+custom::say");
nonCombatStrategies = sConfigMgr->GetStringDefault("AiPlayerbot.NonCombatStrategies", "+custom::say,+return");
randomBotCombatStrategies = sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotCombatStrategies", "-threat");
randomBotNonCombatStrategies = sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotNonCombatStrategies", "");
combatStrategies = sConfigMgr->GetOption<std::string>("AiPlayerbot.CombatStrategies", "+custom::say");
nonCombatStrategies = sConfigMgr->GetOption<std::string>("AiPlayerbot.NonCombatStrategies", "+custom::say,+return");
commandPrefix = sConfigMgr->GetStringDefault("AiPlayerbot.CommandPrefix", "");
commandSeparator = sConfigMgr->GetStringDefault("AiPlayerbot.CommandSeparator", "\\\\");
commandPrefix = sConfigMgr->GetOption<std::string>("AiPlayerbot.CommandPrefix", "");
commandSeparator = sConfigMgr->GetOption<std::string>("AiPlayerbot.CommandSeparator", "\\\\");
commandServerPort = sConfigMgr->GetIntDefault("AiPlayerbot.CommandServerPort", 8888);
perfMonEnabled = sConfigMgr->GetBoolDefault("AiPlayerbot.PerfMonEnabled", false);
commandServerPort = sConfigMgr->GetOption<int32>("AiPlayerbot.CommandServerPort", 8888);
perfMonEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.PerfMonEnabled", false);
LOG_INFO("server.loading", "---------------------------------------");
LOG_INFO("server.loading", " Loading TalentSpecs ");
@@ -164,12 +164,12 @@ bool PlayerbotAIConfig::Initialize()
std::ostringstream os;
os << "AiPlayerbot.PremadeSpecName." << cls << "." << spec;
std::string const specName = sConfigMgr->GetStringDefault(os.str().c_str(), "", false);
std::string const specName = sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false);
if (!specName.empty())
{
std::ostringstream os;
os << "AiPlayerbot.PremadeSpecProb." << cls << "." << spec;
uint32 probability = sConfigMgr->GetIntDefault(os.str().c_str(), 100, false);
uint32 probability = sConfigMgr->GetOption<int32>(os.str().c_str(), 100, false);
TalentPath talentPath(spec, specName, probability);
@@ -178,7 +178,7 @@ bool PlayerbotAIConfig::Initialize()
std::ostringstream os;
os << "AiPlayerbot.PremadeSpecLink." << cls << "." << spec << "." << level;
std::string specLink = sConfigMgr->GetStringDefault(os.str().c_str(), "", false);
std::string specLink = sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false);
specLink = specLink.substr(0, specLink.find("#", 0));;
specLink = specLink.substr(0, specLink.find(" ", 0));;
@@ -216,7 +216,7 @@ bool PlayerbotAIConfig::Initialize()
}
botCheats.clear();
LoadListString<std::vector<std::string>>(sConfigMgr->GetStringDefault("AiPlayerbot.BotCheats", "taxi"), botCheats);
LoadListString<std::vector<std::string>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.BotCheats", "taxi"), botCheats);
botCheatMask = 0;
@@ -231,7 +231,7 @@ bool PlayerbotAIConfig::Initialize()
if (std::find(botCheats.begin(), botCheats.end(), "power") != botCheats.end())
botCheatMask |= (uint32)BotCheatMask::power;
LoadListString<std::vector<std::string>>(sConfigMgr->GetStringDefault("AiPlayerbot.AllowedLogFiles", ""), allowedLogFiles);
LoadListString<std::vector<std::string>>(sConfigMgr->GetOption<std::string>("AiPlayerbot.AllowedLogFiles", ""), allowedLogFiles);
worldBuffs.clear();
@@ -249,60 +249,60 @@ bool PlayerbotAIConfig::Initialize()
}
}
randomBotAccountPrefix = sConfigMgr->GetStringDefault("AiPlayerbot.RandomBotAccountPrefix", "rndbot");
randomBotAccountCount = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotAccountCount", 200);
deleteRandomBotAccounts = sConfigMgr->GetBoolDefault("AiPlayerbot.DeleteRandomBotAccounts", false);
randomBotGuildCount = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotGuildCount", 20);
deleteRandomBotGuilds = sConfigMgr->GetBoolDefault("AiPlayerbot.DeleteRandomBotGuilds", false);
randomBotAccountPrefix = sConfigMgr->GetOption<std::string>("AiPlayerbot.RandomBotAccountPrefix", "rndbot");
randomBotAccountCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotAccountCount", 200);
deleteRandomBotAccounts = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotAccounts", false);
randomBotGuildCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotGuildCount", 20);
deleteRandomBotGuilds = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotGuilds", false);
guildTaskEnabled = sConfigMgr->GetBoolDefault("AiPlayerbot.EnableGuildTasks", true);
minGuildTaskChangeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinGuildTaskChangeTime", 3 * 24 * 3600);
maxGuildTaskChangeTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxGuildTaskChangeTime", 4 * 24 * 3600);
minGuildTaskAdvertisementTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinGuildTaskAdvertisementTime", 300);
maxGuildTaskAdvertisementTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxGuildTaskAdvertisementTime", 12 * 3600);
minGuildTaskRewardTime = sConfigMgr->GetIntDefault("AiPlayerbot.MinGuildTaskRewardTime", 300);
maxGuildTaskRewardTime = sConfigMgr->GetIntDefault("AiPlayerbot.MaxGuildTaskRewardTime", 3600);
guildTaskAdvertCleanupTime = sConfigMgr->GetIntDefault("AiPlayerbot.GuildTaskAdvertCleanupTime", 300);
guildTaskKillTaskDistance = sConfigMgr->GetIntDefault("AiPlayerbot.GuildTaskKillTaskDistance", 2000);
targetPosRecalcDistance = sConfigMgr->GetFloatDefault("AiPlayerbot.TargetPosRecalcDistance", 0.1f);
guildTaskEnabled = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGuildTasks", true);
minGuildTaskChangeTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinGuildTaskChangeTime", 3 * 24 * 3600);
maxGuildTaskChangeTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxGuildTaskChangeTime", 4 * 24 * 3600);
minGuildTaskAdvertisementTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinGuildTaskAdvertisementTime", 300);
maxGuildTaskAdvertisementTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxGuildTaskAdvertisementTime", 12 * 3600);
minGuildTaskRewardTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MinGuildTaskRewardTime", 300);
maxGuildTaskRewardTime = sConfigMgr->GetOption<int32>("AiPlayerbot.MaxGuildTaskRewardTime", 3600);
guildTaskAdvertCleanupTime = sConfigMgr->GetOption<int32>("AiPlayerbot.GuildTaskAdvertCleanupTime", 300);
guildTaskKillTaskDistance = sConfigMgr->GetOption<int32>("AiPlayerbot.GuildTaskKillTaskDistance", 2000);
targetPosRecalcDistance = sConfigMgr->GetOption<float>("AiPlayerbot.TargetPosRecalcDistance", 0.1f);
// cosmetics (by lidocain)
randomBotShowCloak = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotShowCloak", true);
randomBotShowHelmet = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotShowHelmet", true);
randomBotShowCloak = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotShowCloak", true);
randomBotShowHelmet = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotShowHelmet", true);
// SPP switches
enableGreet = sConfigMgr->GetBoolDefault("AiPlayerbot.EnableGreet", true);
disableRandomLevels = sConfigMgr->GetBoolDefault("AiPlayerbot.DisableRandomLevels", false);
randomBotRandomPassword = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotRandomPassword", true);
playerbotsXPrate = sConfigMgr->GetIntDefault("AiPlayerbot.KillXPRate", 1);
botActiveAlone = sConfigMgr->GetIntDefault("AiPlayerbot.BotActiveAlone", 10);
randombotsWalkingRPG = sConfigMgr->GetBoolDefault("AiPlayerbot.RandombotsWalkingRPG", false);
randombotsWalkingRPGInDoors = sConfigMgr->GetBoolDefault("AiPlayerbot.RandombotsWalkingRPG.InDoors", false);
minEnchantingBotLevel = sConfigMgr->GetIntDefault("AiPlayerbot.MinEnchantingBotLevel", 60);
randombotStartingLevel = sConfigMgr->GetIntDefault("AiPlayerbot.RandombotStartingLevel", 5);
gearscorecheck = sConfigMgr->GetBoolDefault("AiPlayerbot.GearScoreCheck", false);
randomBotPreQuests = sConfigMgr->GetBoolDefault("AiPlayerbot.PreQuests", true);
enableGreet = sConfigMgr->GetOption<bool>("AiPlayerbot.EnableGreet", true);
disableRandomLevels = sConfigMgr->GetOption<bool>("AiPlayerbot.DisableRandomLevels", false);
randomBotRandomPassword = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotRandomPassword", true);
playerbotsXPrate = sConfigMgr->GetOption<int32>("AiPlayerbot.KillXPRate", 1);
botActiveAlone = sConfigMgr->GetOption<int32>("AiPlayerbot.BotActiveAlone", 10);
randombotsWalkingRPG = sConfigMgr->GetOption<bool>("AiPlayerbot.RandombotsWalkingRPG", false);
randombotsWalkingRPGInDoors = sConfigMgr->GetOption<bool>("AiPlayerbot.RandombotsWalkingRPG.InDoors", false);
minEnchantingBotLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.MinEnchantingBotLevel", 60);
randombotStartingLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.RandombotStartingLevel", 5);
gearscorecheck = sConfigMgr->GetOption<bool>("AiPlayerbot.GearScoreCheck", false);
randomBotPreQuests = sConfigMgr->GetOption<bool>("AiPlayerbot.PreQuests", true);
// SPP automation
autoPickReward = sConfigMgr->GetStringDefault("AiPlayerbot.AutoPickReward", "yes");
autoEquipUpgradeLoot = sConfigMgr->GetBoolDefault("AiPlayerbot.AutoEquipUpgradeLoot", true);
syncQuestWithPlayer = sConfigMgr->GetBoolDefault("AiPlayerbot.SyncQuestWithPlayer", false);
syncQuestForPlayer = sConfigMgr->GetBoolDefault("AiPlayerbot.SyncQuestForPlayer", false);
autoTrainSpells = sConfigMgr->GetStringDefault("AiPlayerbot.AutoTrainSpells", "yes");
autoPickTalents = sConfigMgr->GetStringDefault("AiPlayerbot.AutoPickTalents", "full");
autoLearnTrainerSpells = sConfigMgr->GetBoolDefault("AiPlayerbot.AutoLearnTrainerSpells", false);
autoLearnQuestSpells = sConfigMgr->GetBoolDefault("AiPlayerbot.AutoLearnQuestSpells", false);
autoDoQuests = sConfigMgr->GetBoolDefault("AiPlayerbot.AutoDoQuests", false);
syncLevelWithPlayers = sConfigMgr->GetBoolDefault("AiPlayerbot.SyncLevelWithPlayers", false);
freeFood = sConfigMgr->GetBoolDefault("AiPlayerbot.FreeFood", true);
randomBotSayWithoutMaster = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotSayWithoutMaster", false);
randomBotGroupNearby = sConfigMgr->GetBoolDefault("AiPlayerbot.RandomBotGroupNearby", true);
autoPickReward = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoPickReward", "yes");
autoEquipUpgradeLoot = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoEquipUpgradeLoot", true);
syncQuestWithPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestWithPlayer", false);
syncQuestForPlayer = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncQuestForPlayer", false);
autoTrainSpells = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoTrainSpells", "yes");
autoPickTalents = sConfigMgr->GetOption<std::string>("AiPlayerbot.AutoPickTalents", "full");
autoLearnTrainerSpells = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoLearnTrainerSpells", false);
autoLearnQuestSpells = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoLearnQuestSpells", false);
autoDoQuests = sConfigMgr->GetOption<bool>("AiPlayerbot.AutoDoQuests", false);
syncLevelWithPlayers = sConfigMgr->GetOption<bool>("AiPlayerbot.SyncLevelWithPlayers", false);
freeFood = sConfigMgr->GetOption<bool>("AiPlayerbot.FreeFood", true);
randomBotSayWithoutMaster = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotSayWithoutMaster", false);
randomBotGroupNearby = sConfigMgr->GetOption<bool>("AiPlayerbot.RandomBotGroupNearby", true);
// arena
randomBotArenaTeamCount = sConfigMgr->GetIntDefault("AiPlayerbot.RandomBotArenaTeamCount", 20);
deleteRandomBotArenaTeams = sConfigMgr->GetBoolDefault("AiPlayerbot.DeleteRandomBotArenaTeams", false);
randomBotArenaTeamCount = sConfigMgr->GetOption<int32>("AiPlayerbot.RandomBotArenaTeamCount", 20);
deleteRandomBotArenaTeams = sConfigMgr->GetOption<bool>("AiPlayerbot.DeleteRandomBotArenaTeams", false);
selfBotLevel = sConfigMgr->GetIntDefault("AiPlayerbot.SelfBotLevel", 1);
selfBotLevel = sConfigMgr->GetOption<int32>("AiPlayerbot.SelfBotLevel", 1);
RandomPlayerbotFactory::CreateRandomBots();
PlayerbotFactory::Init();
@@ -424,7 +424,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32
std::ostringstream os;
os << "AiPlayerbot.WorldBuff." << factionId1 << "." << classId1 << "." << minLevel1 << "." << maxLevel1;
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false), buffs);
for (auto buff : buffs)
{
@@ -437,7 +437,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32
std::ostringstream os;
os << "AiPlayerbot.WorldBuff." << factionId1 << "." << classId1 << "." << minLevel1;
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false), buffs);
for (auto buff : buffs)
{
@@ -451,7 +451,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32
std::ostringstream os;
os << "AiPlayerbot.WorldBuff." << factionId1 << "." << factionId1 << "." << classId1;
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false), buffs);
for (auto buff : buffs)
{
@@ -465,7 +465,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32
std::ostringstream os;
os << "AiPlayerbot.WorldBuff." << factionId1;
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false), buffs);
for (auto buff : buffs)
{
@@ -479,7 +479,7 @@ void PlayerbotAIConfig::loadWorldBuf(uint32 factionId1, uint32 classId1, uint32
std::ostringstream os;
os << "AiPlayerbot.WorldBuff";
LoadList<std::vector<uint32>>(sConfigMgr->GetStringDefault(os.str().c_str(), "", false), buffs);
LoadList<std::vector<uint32>>(sConfigMgr->GetOption<std::string>(os.str().c_str(), "", false), buffs);
for (auto buff : buffs)
{

View File

@@ -35,7 +35,7 @@ class PlayerbotHolder : public PlayerbotAIBase
PlayerBotMap::const_iterator GetPlayerBotsBegin() const { return playerBots.begin(); }
PlayerBotMap::const_iterator GetPlayerBotsEnd() const { return playerBots.end(); }
void UpdateAIInternal(uint32 elapsed, bool minimal = false) override { };
void UpdateAIInternal([[maybe_unused]] uint32 elapsed, [[maybe_unused]] bool minimal = false) override { };
void UpdateSessions();
void HandleBotPackets(WorldSession* session);

View File

@@ -350,7 +350,7 @@ Map* WorldPosition::getMap()
return sMapMgr->FindMap(GetMapId(), getMapEntry()->Instanceable() ? getInstanceId() : 0);
}
const float WorldPosition::getHeight()
float WorldPosition::getHeight() // remove const - whipowill
{
return getMap()->GetHeight(getX(), getY(), getZ());
}

View File

@@ -242,7 +242,7 @@ class WorldPosition : public WorldLocation
MapEntry const* getMapEntry();
uint32 getInstanceId();
Map* getMap();
const float getHeight();
float getHeight(); // remove const - whipowill
std::set<Transport*> getTransports(uint32 entry = 0);
@@ -346,7 +346,7 @@ inline ByteBuffer& operator<<(ByteBuffer& b, WorldPosition& guidP)
return b;
}
inline ByteBuffer& operator>>(ByteBuffer& b, WorldPosition& g)
inline ByteBuffer& operator>>(ByteBuffer& b, [[maybe_unused]] WorldPosition& g)
{
uint32 mapid;
float coord_x;
@@ -557,7 +557,7 @@ class TravelDestination
}
virtual Quest const* GetQuestTemplate() { return nullptr; }
virtual bool isActive(Player* bot) { return false; }
virtual bool isActive([[maybe_unused]] Player* bot) { return false; }
bool isFull(bool ignoreFull = false);
@@ -600,13 +600,13 @@ class NullTravelDestination : public TravelDestination
Quest const* GetQuestTemplate() override { return nullptr; }
bool isActive(Player* bot) override { return false; }
bool isActive([[maybe_unused]] Player* bot) override { return false; }
std::string const getName() override { return "NullTravelDestination"; }
std::string const getTitle() override { return "no destination"; }
bool isIn(WorldPosition* pos, float radius = 0.f) override { return true; }
bool isOut(WorldPosition* pos, float radius = 0.f) override { return false; }
bool isIn([[maybe_unused]] WorldPosition* pos, [[maybe_unused]] float radius = 0.f) override { return true; }
bool isOut([[maybe_unused]] WorldPosition* pos, [[maybe_unused]] float radius = 0.f) override { return false; }
};
//A travel target specifically related to a quest.

View File

@@ -579,7 +579,7 @@ bool TravelNode::isEqual(TravelNode* compareNode)
return true;
}
void TravelNode::print(bool printFailed)
void TravelNode::print([[maybe_unused]] bool printFailed)
{
WorldPosition* startPosition = getPosition();
@@ -901,7 +901,7 @@ float TravelNodeRoute::getTotalDistance()
return totalLength;
}
TravelPath TravelNodeRoute::buildPath(std::vector<WorldPosition> pathToStart, std::vector<WorldPosition> pathToEnd, Unit* bot)
TravelPath TravelNodeRoute::buildPath(std::vector<WorldPosition> pathToStart, std::vector<WorldPosition> pathToEnd, [[maybe_unused]] Unit* bot)
{
TravelPath travelPath;
@@ -1036,7 +1036,7 @@ TravelNodeMap::TravelNodeMap(TravelNodeMap* baseMap)
baseMap->m_nMapMtx.unlock_shared();
}
TravelNode* TravelNodeMap::addNode(WorldPosition pos, std::string const preferedName, bool isImportant, bool checkDuplicate, bool transport,uint32 transportId)
TravelNode* TravelNodeMap::addNode(WorldPosition pos, std::string const preferedName, bool isImportant, bool checkDuplicate, [[maybe_unused]] bool transport, [[maybe_unused]] uint32 transportId)
{
TravelNode* newNode;
@@ -1124,7 +1124,7 @@ std::vector<TravelNode*> TravelNodeMap::getNodes(WorldPosition pos, float range)
return std::move(retVec);
}
TravelNode* TravelNodeMap::getNode(WorldPosition pos, std::vector<WorldPosition>& ppath, Unit* bot, float range)
TravelNode* TravelNodeMap::getNode(WorldPosition pos, [[maybe_unused]] std::vector<WorldPosition>& ppath, Unit* bot, float range)
{
float x = pos.getX();
float y = pos.getY();

View File

@@ -66,8 +66,7 @@ class TravelNodePath
//Constructor
TravelNodePath(float distance = 0.1f, float extraCost = 0, uint8 pathType = (uint8)TravelNodePathType::walk, uint32 pathObject = 0, bool calculated = false,
std::vector<uint8> maxLevelCreature = { 0, 0, 0 }, float swimDistance = 0)
: distance(distance), extraCost(extraCost), pathType(TravelNodePathType(pathType)), pathObject(pathObject), calculated(calculated),
maxLevelCreature(maxLevelCreature), swimDistance(swimDistance)
: extraCost(extraCost), calculated(calculated), distance(distance), maxLevelCreature(maxLevelCreature), swimDistance(swimDistance), pathType(TravelNodePathType(pathType)), pathObject(pathObject) // reorder args - whipowill
{
if (pathType != (uint8)TravelNodePathType::walk)
complete = true;

View File

@@ -16,8 +16,8 @@ class Unit;
class NextAction
{
public:
NextAction(std::string const name, float relevance = 0.0f) : name(name), relevance(relevance) { }
NextAction(NextAction const& o) : name(o.name), relevance(o.relevance) { }
NextAction(std::string const name, float relevance = 0.0f) : relevance(relevance), name(name) { } // name after relevance - whipowill
NextAction(NextAction const& o) : relevance(o.relevance), name(o.name) { } // name after relevance - whipowill
std::string const getName() { return name; }
float getRelevance() {return relevance;}
@@ -43,10 +43,10 @@ class Action : public AiNamedObject
Aoe = 2
};
Action(PlayerbotAI* botAI, std::string const name = "action") : verbose(false), AiNamedObject(botAI, name) { }
Action(PlayerbotAI* botAI, std::string const name = "action") : AiNamedObject(botAI, name), verbose(false) { } // verbose after ainamedobject - whipowill
virtual ~Action(void) { }
virtual bool Execute(Event event) { return true; }
virtual bool Execute([[maybe_unused]] Event event) { return true; }
virtual bool isPossible() { return true; }
virtual bool isUseful() { return true; }
virtual NextAction** getPrerequisites() { return nullptr; }
@@ -71,7 +71,7 @@ class ActionNode
{
public:
ActionNode(std::string const name, NextAction** prerequisites = nullptr, NextAction** alternatives = nullptr, NextAction** continuers = nullptr) :
action(nullptr), name(name), prerequisites(prerequisites), alternatives(alternatives), continuers(continuers) { }
name(name), action(nullptr), continuers(continuers), alternatives(alternatives), prerequisites(prerequisites) { } // reorder arguments - whipowill
virtual ~ActionNode()
{

View File

@@ -111,7 +111,7 @@ class FindItemsToTradeByClassVisitor : public IterateItemsVisitor
{
public:
FindItemsToTradeByClassVisitor(uint32 itemClass, uint32 itemSubClass, uint32 count)
: IterateItemsVisitor(), count(count), itemClass(itemClass), itemSubClass(itemSubClass) { }
: IterateItemsVisitor(), itemClass(itemClass), itemSubClass(itemSubClass), count(count) { } // reorder args - whipowill
bool Visit(Item* item) override
{
@@ -181,7 +181,7 @@ class QueryNamedItemCountVisitor : public QueryItemCountVisitor
class FindNamedItemVisitor : public FindItemVisitor
{
public:
FindNamedItemVisitor(Player* bot, std::string const name) : FindItemVisitor(), name(name) { }
FindNamedItemVisitor([[maybe_unused]] Player* bot, std::string const name) : FindItemVisitor(), name(name) { }
bool Accept(ItemTemplate const* proto) override
{

View File

@@ -16,7 +16,7 @@ class Multiplier : public AiNamedObject
Multiplier(PlayerbotAI* botAI, std::string const name) : AiNamedObject(botAI, name) {}
virtual ~Multiplier() { }
virtual float GetValue(Action* action) { return 1.0f; }
virtual float GetValue([[maybe_unused]] Action* action) { return 1.0f; }
};
#endif

View File

@@ -24,7 +24,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* melee(PlayerbotAI* botAI)
static ActionNode* melee([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("melee",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* healthstone(PlayerbotAI* botAI)
static ActionNode* healthstone([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("healthstone",
/*P*/ nullptr,
@@ -40,7 +40,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* follow_master_random(PlayerbotAI* botAI)
static ActionNode* follow_master_random([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("be near",
/*P*/ nullptr,
@@ -48,7 +48,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* attack_anything(PlayerbotAI* botAI)
static ActionNode* attack_anything([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("attack anything",
/*P*/ nullptr,
@@ -56,7 +56,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* move_random(PlayerbotAI* botAI)
static ActionNode* move_random([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("move random",
/*P*/ nullptr,
@@ -64,7 +64,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* move_to_loot(PlayerbotAI* botAI)
static ActionNode* move_to_loot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("move to loot",
/*P*/ nullptr,
@@ -72,7 +72,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* food(PlayerbotAI* botAI)
static ActionNode* food([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("food",
/*P*/ nullptr,
@@ -80,7 +80,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* drink(PlayerbotAI* botAI)
static ActionNode* drink([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("drink",
/*P*/ nullptr,
@@ -88,7 +88,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* mana_potion(PlayerbotAI* botAI)
static ActionNode* mana_potion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mana potion",
/*P*/ nullptr,
@@ -96,7 +96,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* healing_potion(PlayerbotAI* botAI)
static ActionNode* healing_potion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("healing potion",
/*P*/ nullptr,
@@ -104,7 +104,7 @@ class ActionNodeFactoryInternal : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* flee(PlayerbotAI* botAI)
static ActionNode* flee([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("flee",
/*P*/ nullptr,

View File

@@ -44,8 +44,8 @@ class Strategy : public PlayerbotAIAware
virtual ~Strategy() { }
virtual NextAction** getDefaultActions() { return nullptr; }
virtual void InitTriggers(std::vector<TriggerNode*> &triggers) { }
virtual void InitMultipliers(std::vector<Multiplier*> &multipliers) { }
virtual void InitTriggers([[maybe_unused]] std::vector<TriggerNode*> &triggers) { }
virtual void InitMultipliers([[maybe_unused]] std::vector<Multiplier*> &multipliers) { }
virtual std::string const getName() = 0;
virtual uint32 GetType() const { return STRATEGY_TYPE_GENERIC; }
virtual ActionNode* GetAction(std::string const name);

View File

@@ -19,8 +19,8 @@ class Trigger : public AiNamedObject
virtual ~Trigger() { }
virtual Event Check();
virtual void ExternalEvent(std::string const param, Player* owner = nullptr) { }
virtual void ExternalEvent(WorldPacket& packet, Player* owner = nullptr) { }
virtual void ExternalEvent([[maybe_unused]] std::string const param, [[maybe_unused]] Player* owner = nullptr) { }
virtual void ExternalEvent([[maybe_unused]] WorldPacket& packet, [[maybe_unused]] Player* owner = nullptr) { }
virtual bool IsActive() { return false; }
virtual NextAction** getHandlers() { return nullptr; }
void Update() { }
@@ -39,7 +39,7 @@ class Trigger : public AiNamedObject
class TriggerNode
{
public:
TriggerNode(std::string const name, NextAction** handlers = nullptr) : name(name), handlers(handlers), trigger(nullptr) { }
TriggerNode(std::string const name, NextAction** handlers = nullptr) : trigger(nullptr), handlers(handlers), name(name) { } // reorder args - whipowill
virtual ~TriggerNode()
{

View File

@@ -24,7 +24,7 @@ class UntypedValue : public AiNamedObject
virtual void Reset() { }
virtual std::string const Format() { return "?"; }
virtual std::string const Save() { return "?"; }
virtual bool Load(std::string const value) { return false; }
virtual bool Load([[maybe_unused]] std::string const value) { return false; }
};
template<class T>
@@ -135,7 +135,7 @@ class MemoryCalculatedValue : public CalculatedValue<T>
return true;
}
void Set(T value) override
void Set([[maybe_unused]] T value) override
{
CalculatedValue<T>::Set(this->value);
UpdateChange();

View File

@@ -15,9 +15,9 @@ struct Mail;
class MailProcessor
{
public:
virtual bool Before(PlayerbotAI* botAI) { return true; }
virtual bool Before([[maybe_unused]] PlayerbotAI* botAI) { return true; }
virtual bool Process(uint32 index, Mail* mail, PlayerbotAI* botAI) = 0;
virtual bool After(PlayerbotAI* botAI) { return true; }
virtual bool After([[maybe_unused]] PlayerbotAI* botAI) { return true; }
static ObjectGuid FindMailbox(PlayerbotAI* botAI);

View File

@@ -1048,7 +1048,7 @@ bool MovementAction::Flee(Unit *target)
}
}
HostileReference* ref = target->getThreatMgr().getCurrentVictim();
HostileReference* ref = target->GetThreatMgr().getCurrentVictim();
if (ref && ref->getTarget() == bot) // bot is target - try to flee to tank or master
{
if (Group* group = bot->GetGroup())

View File

@@ -33,7 +33,7 @@ class BloodDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* rune_strike(PlayerbotAI* botAI)
static ActionNode* rune_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("rune strike",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
@@ -41,7 +41,7 @@ class BloodDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* heart_strike(PlayerbotAI* botAI)
static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("heart strike",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),
@@ -49,7 +49,7 @@ class BloodDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* death_strike(PlayerbotAI* botAI)
static ActionNode* death_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death strike",
/*P*/ NextAction::array(0, new NextAction("frost presence"), nullptr),

View File

@@ -30,7 +30,7 @@ class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* obliterate(PlayerbotAI* botAI)
static ActionNode* obliterate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("obliterate",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
@@ -38,7 +38,7 @@ class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* rune_strike(PlayerbotAI* botAI)
static ActionNode* rune_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("rune strike",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
@@ -46,7 +46,7 @@ class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* frost_strike(PlayerbotAI* botAI)
static ActionNode* frost_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("frost strike",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),
@@ -54,7 +54,7 @@ class FrostDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* howling_blast(PlayerbotAI* botAI)
static ActionNode* howling_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("howling blast",
/*P*/ NextAction::array(0, new NextAction("blood presence"), nullptr),

View File

@@ -15,7 +15,7 @@ class GenericDKNonCombatStrategyActionNodeFactory : public NamedObjectFactory<Ac
}
private:
static ActionNode* bone_shield(PlayerbotAI* botAI)
static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("bone shield",
/*P*/ nullptr,
@@ -23,7 +23,7 @@ class GenericDKNonCombatStrategyActionNodeFactory : public NamedObjectFactory<Ac
/*C*/ nullptr);
}
static ActionNode* horn_of_winter(PlayerbotAI* botAI)
static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("horn of winter",
/*P*/ nullptr,

View File

@@ -50,7 +50,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* death_coil(PlayerbotAI* botAI)
static ActionNode* death_coil([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death coil",
/*P*/ nullptr,
@@ -58,7 +58,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* death_grip(PlayerbotAI* botAI)
static ActionNode* death_grip([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death grip",
/*P*/ nullptr,
@@ -66,7 +66,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* plague_strike(PlayerbotAI* botAI)
static ActionNode* plague_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("plague strike",
/*P*/ nullptr,
@@ -74,7 +74,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* icy_touch(PlayerbotAI* botAI)
static ActionNode* icy_touch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("icy touch",
/*P*/ nullptr,
@@ -82,7 +82,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* heart_strike(PlayerbotAI* botAI)
static ActionNode* heart_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("heart strike",
/*P*/ nullptr,
@@ -90,7 +90,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* pestilence(PlayerbotAI* botAI)
static ActionNode* pestilence([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("pestilence",
/*P*/ nullptr,
@@ -98,7 +98,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* horn_of_winter(PlayerbotAI* botAI)
static ActionNode* horn_of_winter([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("horn of winter",
/*P*/ nullptr,
@@ -106,7 +106,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* bone_shield(PlayerbotAI* botAI)
static ActionNode* bone_shield([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("bone shield",
/*P*/ nullptr,
@@ -114,7 +114,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* killing_machine(PlayerbotAI* botAI)
static ActionNode* killing_machine([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("killing machine",
/*P*/ nullptr,
@@ -122,7 +122,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* corpse_explosion(PlayerbotAI* botAI)
static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("corpse explosion",
/*P*/ nullptr,
@@ -130,7 +130,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* anti_magic_zone(PlayerbotAI* botAI)
static ActionNode* anti_magic_zone([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("anti magic zone",
/*P*/ nullptr,
@@ -138,7 +138,7 @@ class GenericDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* icebound_fortitude(PlayerbotAI* botAI)
static ActionNode* icebound_fortitude([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("icebound fortitude",
/*P*/ nullptr,

View File

@@ -30,7 +30,7 @@ class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* death_strike(PlayerbotAI* botAI)
static ActionNode* death_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("death strike",
/*P*/ NextAction::array(0, new NextAction("unholy pressence"), nullptr),
@@ -38,7 +38,7 @@ class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* corpse_explosion(PlayerbotAI* botAI)
static ActionNode* corpse_explosion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("corpse explosion",
/*P*/ NextAction::array(0, new NextAction("unholy pressence"), nullptr),
@@ -46,7 +46,7 @@ class UnholyDKStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* scourge_strike(PlayerbotAI* botAI)
static ActionNode* scourge_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("scourge strike",
/*P*/ NextAction::array(0, new NextAction("unholy pressence"), nullptr),

View File

@@ -25,7 +25,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
}
private:
static ActionNode* melee(PlayerbotAI* botAI)
static ActionNode* melee([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("melee",
/*P*/ NextAction::array(0, new NextAction("feral charge - bear"), nullptr),
@@ -33,7 +33,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* feral_charge_bear(PlayerbotAI* botAI)
static ActionNode* feral_charge_bear([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("feral charge - bear",
/*P*/ nullptr,
@@ -41,7 +41,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* swipe_bear(PlayerbotAI* botAI)
static ActionNode* swipe_bear([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("swipe (bear)",
/*P*/ nullptr,
@@ -49,7 +49,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* faerie_fire_feral(PlayerbotAI* botAI)
static ActionNode* faerie_fire_feral([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("faerie fire (feral)",
/*P*/ NextAction::array(0, new NextAction("feral charge - bear"), nullptr),
@@ -57,7 +57,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* bear_form(PlayerbotAI* botAI)
static ActionNode* bear_form([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("bear form",
/*P*/ nullptr,
@@ -65,7 +65,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* dire_bear_form(PlayerbotAI* botAI)
static ActionNode* dire_bear_form([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("dire bear form",
/*P*/ nullptr,
@@ -73,7 +73,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* mangle_bear(PlayerbotAI* botAI)
static ActionNode* mangle_bear([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mangle (bear)",
/*P*/ nullptr,
@@ -81,7 +81,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* maul(PlayerbotAI* botAI)
static ActionNode* maul([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("maul",
/*P*/ nullptr,
@@ -89,7 +89,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* bash(PlayerbotAI* botAI)
static ActionNode* bash([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("bash",
/*P*/ nullptr,
@@ -97,7 +97,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* swipe(PlayerbotAI* botAI)
static ActionNode* swipe([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("swipe",
/*P*/ nullptr,
@@ -105,7 +105,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* lacerate(PlayerbotAI* botAI)
static ActionNode* lacerate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("lacerate",
/*P*/ nullptr,
@@ -113,7 +113,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* growl(PlayerbotAI* botAI)
static ActionNode* growl([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("growl",
/*P*/ nullptr,
@@ -121,7 +121,7 @@ class BearTankDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* demoralizing_roar(PlayerbotAI* botAI)
static ActionNode* demoralizing_roar([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("demoralizing roar",
/*P*/ nullptr,

View File

@@ -23,7 +23,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
}
private:
static ActionNode* faerie_fire(PlayerbotAI* botAI)
static ActionNode* faerie_fire([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("faerie fire",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -31,7 +31,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* hibernate(PlayerbotAI* botAI)
static ActionNode* hibernate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("hibernate",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -39,7 +39,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* entangling_roots(PlayerbotAI* botAI)
static ActionNode* entangling_roots([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("entangling roots",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -47,7 +47,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* entangling_roots_on_cc(PlayerbotAI* botAI)
static ActionNode* entangling_roots_on_cc([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("entangling roots on cc",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -55,7 +55,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* wrath(PlayerbotAI* botAI)
static ActionNode* wrath([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("wrath",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -63,7 +63,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* starfall(PlayerbotAI* botAI)
static ActionNode* starfall([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("starfall",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -71,7 +71,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* insect_swarm(PlayerbotAI* botAI)
static ActionNode* insect_swarm([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("insect swarm",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -79,7 +79,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* moonfire(PlayerbotAI* botAI)
static ActionNode* moonfire([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("moonfire",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),
@@ -87,7 +87,7 @@ class CasterDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* starfire(PlayerbotAI* botAI)
static ActionNode* starfire([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("starfire",
/*P*/ NextAction::array(0, new NextAction("moonkin form"), nullptr),

View File

@@ -24,7 +24,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
}
private:
static ActionNode* faerie_fire_feral(PlayerbotAI* botAI)
static ActionNode* faerie_fire_feral([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("faerie fire (feral)",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* melee(PlayerbotAI* botAI)
static ActionNode* melee([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("melee",
/*P*/ NextAction::array(0, new NextAction("feral charge - cat"), nullptr),
@@ -40,7 +40,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* feral_charge_cat(PlayerbotAI* botAI)
static ActionNode* feral_charge_cat([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("feral charge - cat",
/*P*/ nullptr,
@@ -48,7 +48,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* cat_form(PlayerbotAI* botAI)
static ActionNode* cat_form([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("cat form",
/*P*/ nullptr,
@@ -56,7 +56,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* claw(PlayerbotAI* botAI)
static ActionNode* claw([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("claw",
/*P*/ nullptr,
@@ -64,7 +64,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* mangle_cat(PlayerbotAI* botAI)
static ActionNode* mangle_cat([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mangle (cat)",
/*P*/ nullptr,
@@ -72,7 +72,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* rake(PlayerbotAI* botAI)
static ActionNode* rake([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("rake",
/*P*/ nullptr,
@@ -80,7 +80,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* ferocious_bite(PlayerbotAI* botAI)
static ActionNode* ferocious_bite([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("ferocious bite",
/*P*/ nullptr,
@@ -88,7 +88,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* rip(PlayerbotAI* botAI)
static ActionNode* rip([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("rip",
/*P*/ nullptr,
@@ -96,7 +96,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* pounce(PlayerbotAI* botAI)
static ActionNode* pounce([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("pounce",
/*P*/ nullptr,
@@ -104,7 +104,7 @@ class CatDpsDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* ravage(PlayerbotAI* botAI)
static ActionNode* ravage([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("ravage",
/*P*/ nullptr,

View File

@@ -21,7 +21,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
}
private:
static ActionNode* survival_instincts(PlayerbotAI* botAI)
static ActionNode* survival_instincts([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("survival instincts",
/*P*/ nullptr,
@@ -29,7 +29,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* thorns(PlayerbotAI* botAI)
static ActionNode* thorns([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("thorns",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -37,7 +37,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* omen_of_clarity(PlayerbotAI* botAI)
static ActionNode* omen_of_clarity([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("omen of clarity",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -45,7 +45,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* cure_poison(PlayerbotAI* botAI)
static ActionNode* cure_poison([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("cure poison",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -53,7 +53,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* cure_poison_on_party(PlayerbotAI* botAI)
static ActionNode* cure_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("cure poison on party",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -61,7 +61,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* abolish_poison(PlayerbotAI* botAI)
static ActionNode* abolish_poison([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("abolish poison",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -69,7 +69,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* abolish_poison_on_party(PlayerbotAI* botAI)
static ActionNode* abolish_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("abolish poison on party",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -77,7 +77,7 @@ class FeralDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* prowl(PlayerbotAI* botAI)
static ActionNode* prowl([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("prowl",
/*P*/ NextAction::array(0, new NextAction("cat form"), nullptr),

View File

@@ -18,7 +18,7 @@ class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory
}
private:
static ActionNode* thorns(PlayerbotAI* botAI)
static ActionNode* thorns([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("thorns",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -26,7 +26,7 @@ class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory
/*C*/ nullptr);
}
static ActionNode* thorns_on_party(PlayerbotAI* botAI)
static ActionNode* thorns_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("thorns on party",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -34,7 +34,7 @@ class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory
/*C*/ nullptr);
}
static ActionNode* mark_of_the_wild(PlayerbotAI* botAI)
static ActionNode* mark_of_the_wild([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mark of the wild",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -42,7 +42,7 @@ class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory
/*C*/ nullptr);
}
static ActionNode* mark_of_the_wild_on_party(PlayerbotAI* botAI)
static ActionNode* mark_of_the_wild_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mark of the wild on party",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -50,7 +50,7 @@ class GenericDruidNonCombatStrategyActionNodeFactory : public NamedObjectFactory
/*C*/ nullptr);
}
static ActionNode* innervate(PlayerbotAI* botAI)
static ActionNode* innervate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("innervate",
/*P*/ nullptr,

View File

@@ -22,7 +22,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
}
private:
static ActionNode* melee(PlayerbotAI* botAI)
static ActionNode* melee([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("melee",
/*P*/ nullptr,
@@ -30,7 +30,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* caster_form(PlayerbotAI* botAI)
static ActionNode* caster_form([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("caster form",
/*P*/ nullptr,
@@ -38,7 +38,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* cure_poison(PlayerbotAI* botAI)
static ActionNode* cure_poison([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("cure poison",
/*P*/ nullptr,
@@ -46,7 +46,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* cure_poison_on_party(PlayerbotAI* botAI)
static ActionNode* cure_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("cure poison on party",
/*P*/ nullptr,
@@ -54,7 +54,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* abolish_poison(PlayerbotAI* botAI)
static ActionNode* abolish_poison([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("abolish poison",
/*P*/ nullptr,
@@ -62,7 +62,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* abolish_poison_on_party(PlayerbotAI* botAI)
static ActionNode* abolish_poison_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("abolish poison on party",
/*P*/ nullptr,
@@ -70,7 +70,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* rebirth(PlayerbotAI* botAI)
static ActionNode* rebirth([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("rebirth",
/*P*/ nullptr,
@@ -78,7 +78,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* entangling_roots_on_cc(PlayerbotAI* botAI)
static ActionNode* entangling_roots_on_cc([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("entangling roots on cc",
/*P*/ NextAction::array(0, new NextAction("caster form"), nullptr),
@@ -86,7 +86,7 @@ class GenericDruidStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
/*C*/ nullptr);
}
static ActionNode* innervate(PlayerbotAI* botAI)
static ActionNode* innervate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("innervate",
/*P*/ nullptr,

View File

@@ -18,7 +18,7 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* viper_sting(PlayerbotAI* botAI)
static ActionNode* viper_sting([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("viper sting",
/*P*/ nullptr,
@@ -26,7 +26,7 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* aimed_shot(PlayerbotAI* botAI)
static ActionNode* aimed_shot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("aimed shot",
/*P*/ nullptr,
@@ -34,7 +34,7 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* chimera_shot(PlayerbotAI* botAI)
static ActionNode* chimera_shot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("chimera shot",
/*P*/ nullptr,
@@ -42,7 +42,7 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* explosive_shot(PlayerbotAI* botAI)
static ActionNode* explosive_shot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("explosive shot",
/*P*/ nullptr,
@@ -50,7 +50,7 @@ class DpsHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* concussive_shot(PlayerbotAI* botAI)
static ActionNode* concussive_shot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("concussive shot",
/*P*/ nullptr,

View File

@@ -16,7 +16,7 @@ class GenericHunterNonCombatStrategyActionNodeFactory : public NamedObjectFactor
}
private:
static ActionNode* rapid_fire(PlayerbotAI* botAI)
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("rapid fire",
/*P*/ nullptr,
@@ -24,7 +24,7 @@ class GenericHunterNonCombatStrategyActionNodeFactory : public NamedObjectFactor
/*C*/ nullptr);
}
static ActionNode* aspect_of_the_pack(PlayerbotAI* botAI)
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("aspect of the pack",
/*P*/ nullptr,

View File

@@ -19,7 +19,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
}
private:
static ActionNode* rapid_fire(PlayerbotAI* botAI)
static ActionNode* rapid_fire([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("rapid fire",
/*P*/ nullptr,
@@ -27,7 +27,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* aspect_of_the_pack(PlayerbotAI* botAI)
static ActionNode* aspect_of_the_pack([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("aspect of the pack",
/*P*/ nullptr,
@@ -35,7 +35,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* feign_death(PlayerbotAI* botAI)
static ActionNode* feign_death([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("feign death",
/*P*/ nullptr,
@@ -43,7 +43,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* wing_clip(PlayerbotAI* botAI)
static ActionNode* wing_clip([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("wing clip",
/*P*/ nullptr,
@@ -51,7 +51,7 @@ class GenericHunterStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ NextAction::array(0, new NextAction("flee"), nullptr));
}
static ActionNode* raptor_strike(PlayerbotAI* botAI)
static ActionNode* raptor_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("raptor strike",
/*P*/ NextAction::array(0, new NextAction("melee"), nullptr),

View File

@@ -16,7 +16,7 @@ class ArcaneMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
}
private:
static ActionNode* arcane_blast(PlayerbotAI* botAI)
static ActionNode* arcane_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("arcane blast",
/*P*/ nullptr,
@@ -24,7 +24,7 @@ class ArcaneMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* arcane_barrage(PlayerbotAI* botAI)
static ActionNode* arcane_barrage([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("arcane barrage",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class ArcaneMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* arcane_missiles(PlayerbotAI* botAI)
static ActionNode* arcane_missiles([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("arcane missiles",
/*P*/ nullptr,

View File

@@ -16,7 +16,7 @@ class GenericMageNonCombatStrategyActionNodeFactory : public NamedObjectFactory<
}
private:
static ActionNode* molten_armor(PlayerbotAI* botAI)
static ActionNode* molten_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("molten armor",
/*P*/ nullptr,
@@ -24,7 +24,7 @@ class GenericMageNonCombatStrategyActionNodeFactory : public NamedObjectFactory<
/*C*/ nullptr);
}
static ActionNode* mage_armor(PlayerbotAI* botAI)
static ActionNode* mage_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mage armor",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class GenericMageNonCombatStrategyActionNodeFactory : public NamedObjectFactory<
/*C*/ nullptr);
}
static ActionNode* ice_armor(PlayerbotAI* botAI)
static ActionNode* ice_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("ice armor",
/*P*/ nullptr,

View File

@@ -24,7 +24,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
}
private:
static ActionNode* frostbolt(PlayerbotAI* botAI)
static ActionNode* frostbolt([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("frostbolt",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* fire_blast(PlayerbotAI* botAI)
static ActionNode* fire_blast([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("fire blast",
/*P*/ nullptr,
@@ -40,7 +40,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* scorch(PlayerbotAI* botAI)
static ActionNode* scorch([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("scorch",
/*P*/ nullptr,
@@ -48,7 +48,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* frost_nova(PlayerbotAI* botAI)
static ActionNode* frost_nova([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("frost nova",
/*P*/ nullptr,
@@ -56,7 +56,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ NextAction::array(0, new NextAction("flee"), nullptr));
}
static ActionNode* icy_veins(PlayerbotAI* botAI)
static ActionNode* icy_veins([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("icy veins",
/*P*/ nullptr,
@@ -64,7 +64,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* combustion(PlayerbotAI* botAI)
static ActionNode* combustion([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("combustion",
/*P*/ nullptr,
@@ -72,7 +72,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* evocation(PlayerbotAI* botAI)
static ActionNode* evocation([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("evocation",
/*P*/ nullptr,
@@ -80,7 +80,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* dragons_breath(PlayerbotAI* botAI)
static ActionNode* dragons_breath([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("dragon's breath",
/*P*/ nullptr,
@@ -88,7 +88,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ NextAction::array(0, new NextAction("flamestrike", 71.0f), nullptr));
}
static ActionNode* blast_wave(PlayerbotAI* botAI)
static ActionNode* blast_wave([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("blast wave",
/*P*/ nullptr,
@@ -96,7 +96,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ NextAction::array(0, new NextAction("flamestrike", 71.0f), nullptr));
}
static ActionNode* remove_curse(PlayerbotAI* botAI)
static ActionNode* remove_curse([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("remove curse",
/*P*/ nullptr,
@@ -104,7 +104,7 @@ class GenericMageStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* remove_curse_on_party(PlayerbotAI* botAI)
static ActionNode* remove_curse_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("remove curse on party",
/*P*/ nullptr,

View File

@@ -17,7 +17,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
}
private:
static ActionNode* seal_of_vengeance(PlayerbotAI* botAI)
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of vengeance",
/*P*/ nullptr,
@@ -25,7 +25,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* seal_of_command(PlayerbotAI* botAI)
static ActionNode* seal_of_command([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("seal of command",
/*P*/ nullptr,
@@ -33,7 +33,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* blessing_of_might(PlayerbotAI* botAI)
static ActionNode* blessing_of_might([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("blessing of might",
/*P*/ nullptr,
@@ -41,7 +41,7 @@ class DpsPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* crusader_strike(PlayerbotAI* botAI)
static ActionNode* crusader_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("crusader strike",
/*P*/ nullptr,

View File

@@ -15,7 +15,7 @@ class TankPaladinStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
}
private:
static ActionNode* seal_of_vengeance(PlayerbotAI* botAI)
static ActionNode* seal_of_vengeance([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("seal of vengeance",
/*P*/ nullptr,

View File

@@ -14,7 +14,7 @@ class HolyPriestStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
}
private:
static ActionNode* smite(PlayerbotAI* botAI)
static ActionNode* smite([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("smite",
/*P*/ nullptr,

View File

@@ -20,7 +20,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
}
private:
static ActionNode* riposte(PlayerbotAI* botAI)
static ActionNode* riposte([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("riposte",
/*P*/ nullptr,
@@ -28,7 +28,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* mutilate(PlayerbotAI* botAI)
static ActionNode* mutilate([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mutilate",
/*P*/ nullptr,
@@ -36,7 +36,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* sinister_strike(PlayerbotAI* botAI)
static ActionNode* sinister_strike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("sinister strike",
/*P*/ nullptr,
@@ -44,7 +44,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* kick(PlayerbotAI* botAI)
static ActionNode* kick([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("kick",
/*P*/ nullptr,
@@ -52,7 +52,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* kidney_shot(PlayerbotAI* botAI)
static ActionNode* kidney_shot([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("kidney shot",
/*P*/ nullptr,
@@ -60,7 +60,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* rupture(PlayerbotAI* botAI)
static ActionNode* rupture([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("rupture",
/*P*/ nullptr,
@@ -68,7 +68,7 @@ class DpsRogueStrategyActionNodeFactory : public NamedObjectFactory<ActionNode>
/*C*/ nullptr);
}
static ActionNode* backstab(PlayerbotAI* botAI)
static ActionNode* backstab([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("backstab",
/*P*/ nullptr,

View File

@@ -14,7 +14,7 @@ class CasterShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNo
}
private:
static ActionNode* magma_totem(PlayerbotAI* botAI)
static ActionNode* magma_totem([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("magma totem",
/*P*/ nullptr,

View File

@@ -23,7 +23,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
}
private:
static ActionNode* earth_shock(PlayerbotAI* botAI)
static ActionNode* earth_shock([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("earth shock",
/*P*/ nullptr,
@@ -31,7 +31,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* flametongue_weapon(PlayerbotAI* botAI)
static ActionNode* flametongue_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("flametongue weapon",
/*P*/ nullptr,
@@ -39,7 +39,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* frostbrand_weapon(PlayerbotAI* botAI)
static ActionNode* frostbrand_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("frostbrand weapon",
/*P*/ nullptr,
@@ -47,7 +47,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* windfury_weapon(PlayerbotAI* botAI)
static ActionNode* windfury_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("windfury weapon",
/*P*/ nullptr,
@@ -55,7 +55,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* lesser_healing_wave(PlayerbotAI* botAI)
static ActionNode* lesser_healing_wave([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("lesser healing wave",
/*P*/ nullptr,
@@ -63,7 +63,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* lesser_healing_wave_on_party(PlayerbotAI* botAI)
static ActionNode* lesser_healing_wave_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("lesser healing wave on party",
/*P*/ nullptr,
@@ -71,7 +71,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* chain_heal(PlayerbotAI* botAI)
static ActionNode* chain_heal([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("chain heal",
/*P*/ nullptr,
@@ -79,7 +79,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* riptide(PlayerbotAI* botAI)
static ActionNode* riptide([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("riptide",
/*P*/ nullptr,
@@ -87,7 +87,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* chain_heal_on_party(PlayerbotAI* botAI)
static ActionNode* chain_heal_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("chain heal on party",
/*P*/ nullptr,
@@ -95,7 +95,7 @@ class GenericShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionN
/*C*/ nullptr);
}
static ActionNode* riptide_on_party(PlayerbotAI* botAI)
static ActionNode* riptide_on_party([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("riptide on party",
/*P*/ nullptr,

View File

@@ -15,7 +15,7 @@ class HealShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
}
private:
static ActionNode* earthliving_weapon(PlayerbotAI* botAI)
static ActionNode* earthliving_weapon([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("earthliving weapon",
/*P*/ nullptr,
@@ -23,7 +23,7 @@ class HealShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
/*C*/ nullptr);
}
static ActionNode* mana_tide_totem(PlayerbotAI* botAI)
static ActionNode* mana_tide_totem([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("mana tide totem",
/*P*/ nullptr,

View File

@@ -16,7 +16,7 @@ class MeleeShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
}
private:
static ActionNode* stormstrike(PlayerbotAI* botAI)
static ActionNode* stormstrike([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("stormstrike",
/*P*/ nullptr,
@@ -24,7 +24,7 @@ class MeleeShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* lava_lash(PlayerbotAI* botAI)
static ActionNode* lava_lash([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("lava lash",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class MeleeShamanStrategyActionNodeFactory : public NamedObjectFactory<ActionNod
/*C*/ nullptr);
}
static ActionNode* magma_totem(PlayerbotAI* botAI)
static ActionNode* magma_totem([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("magma totem",
/*P*/ nullptr,

View File

@@ -124,7 +124,7 @@ class DeadTrigger : public Trigger
class AoeHealTrigger : public Trigger
{
public:
AoeHealTrigger(PlayerbotAI* botAI, std::string const name, std::string const type, int32 count) : Trigger(botAI, name), type(type), count(count) { }
AoeHealTrigger(PlayerbotAI* botAI, std::string const name, std::string const type, int32 count) : Trigger(botAI, name), count(count), type(type) { } // reorder args - whipowill
bool IsActive() override;
protected:

View File

@@ -31,7 +31,7 @@ bool HasAggroValue::Calculate()
ref = ref->next();
}
ref = target->getThreatMgr().getCurrentVictim();
ref = target->GetThreatMgr().getCurrentVictim();
if (ref)
{
if (Unit* victim = ref->getTarget())

View File

@@ -72,7 +72,7 @@ void AttackersValue::AddAttackersOf(Player* player, std::set<Unit*>& targets)
{
if (!player->GetGroup())
{
if (!unit->getThreatMgr().getThreat(player) && (!unit->getThreatMgr().getCurrentVictim() || unit->getThreatMgr().getCurrentVictim()->getTarget() != player))
if (!unit->GetThreatMgr().getThreat(player) && (!unit->GetThreatMgr().getCurrentVictim() || unit->GetThreatMgr().getCurrentVictim()->getTarget() != player))
continue;
}
@@ -107,7 +107,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range)
bool leaderHasThreat = false;
if (attacker && bot->GetGroup() && botAI->GetMaster())
leaderHasThreat = attacker->getThreatMgr().getThreat(botAI->GetMaster());
leaderHasThreat = attacker->GetThreatMgr().getThreat(botAI->GetMaster());
bool isMemberBotGroup = false;
if (bot->GetGroup() && botAI->GetMaster())
@@ -131,7 +131,7 @@ bool AttackersValue::IsPossibleTarget(Unit* attacker, Player* bot, float range)
bool AttackersValue::IsValidTarget(Unit *attacker, Player *bot)
{
return IsPossibleTarget(attacker, bot) && (attacker->getThreatMgr().getCurrentVictim() || attacker->GetGuidValue(UNIT_FIELD_TARGET) ||
return IsPossibleTarget(attacker, bot) && (attacker->GetThreatMgr().getCurrentVictim() || attacker->GetGuidValue(UNIT_FIELD_TARGET) ||
attacker->GetGUID().IsPlayer() || attacker->GetGUID() == GET_PLAYERBOT_AI(bot)->GetAiObjectContext()->GetValue<ObjectGuid>("pull target")->Get());
}
bool PossibleAddsValue::Calculate()
@@ -146,7 +146,7 @@ bool PossibleAddsValue::Calculate()
if (Unit* add = botAI->GetUnit(guid))
{
if (!add->GetTarget() && !add->getThreatMgr().getCurrentVictim() && add->IsHostileTo(bot))
if (!add->GetTarget() && !add->GetThreatMgr().getCurrentVictim() && add->IsHostileTo(bot))
{
for (ObjectGuid const attackerGUID : attackers)
{

View File

@@ -21,7 +21,7 @@ Unit* TargetValue::FindTarget(FindTargetStrategy* strategy)
if (!unit)
continue;
ThreatMgr &ThreatMgr = unit->getThreatMgr();
ThreatMgr &ThreatMgr = unit->GetThreatMgr();
strategy->CheckAttacker(unit, &ThreatMgr);
}

View File

@@ -42,7 +42,7 @@ uint8 ThreatValue::Calculate(Unit* target)
if (!group)
return 0;
float botThreat = target->getThreatMgr().getThreat(bot);
float botThreat = target->GetThreatMgr().getThreat(bot);
float maxThreat = -1.0f;
bool hasTank = false;
@@ -55,7 +55,7 @@ uint8 ThreatValue::Calculate(Unit* target)
if (botAI->IsTank(player))
{
hasTank = true;
float threat = target->getThreatMgr().getThreat(player);
float threat = target->GetThreatMgr().getThreat(player);
if (maxThreat < threat)
maxThreat = threat;
}

View File

@@ -14,7 +14,7 @@ class DpsWarlockStrategyActionNodeFactory : public NamedObjectFactory<ActionNode
}
private:
static ActionNode* shadow_bolt(PlayerbotAI* botAI)
static ActionNode* shadow_bolt([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("shadow bolt",
/*P*/ nullptr,

View File

@@ -18,7 +18,7 @@ class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFacto
}
private:
static ActionNode* fel_armor(PlayerbotAI* botAI)
static ActionNode* fel_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("fel armor",
/*P*/ nullptr,
@@ -26,7 +26,7 @@ class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFacto
/*C*/ nullptr);
}
static ActionNode* demon_armor(PlayerbotAI* botAI)
static ActionNode* demon_armor([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("demon armor",
/*P*/ nullptr,
@@ -34,7 +34,7 @@ class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFacto
/*C*/ nullptr);
}
static ActionNode* summon_voidwalker(PlayerbotAI* botAI)
static ActionNode* summon_voidwalker([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("summon voidwalker",
/*P*/ nullptr,
@@ -42,7 +42,7 @@ class GenericWarlockNonCombatStrategyActionNodeFactory : public NamedObjectFacto
/*C*/ nullptr);
}
static ActionNode* summon_felguard(PlayerbotAI* botAI)
static ActionNode* summon_felguard([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("summon felguard",
/*P*/ nullptr,

View File

@@ -15,14 +15,14 @@ class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<Action
}
private:
//static ActionNode* summon_voidwalker(PlayerbotAI* botAI)
//static ActionNode* summon_voidwalker([[maybe_unused]] PlayerbotAI* botAI)
//{
//return new ActionNode ("summon voidwalker",
/*P*/ //nullptr,
/*A*/ //NextAction::array(0, new NextAction("drain soul"), nullptr),
/*C*/ //nullptr);
//}
static ActionNode* banish(PlayerbotAI* botAI)
static ActionNode* banish([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("banish",
/*P*/ nullptr,

View File

@@ -16,7 +16,7 @@ class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<Action
}
private:
static ActionNode* summon_voidwalker(PlayerbotAI* botAI)
static ActionNode* summon_voidwalker([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("summon voidwalker",
/*P*/ nullptr,
@@ -24,7 +24,7 @@ class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<Action
/*C*/ nullptr);
}
static ActionNode* summon_felguard(PlayerbotAI* botAI)
static ActionNode* summon_felguard([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode ("summon felguard",
/*P*/ nullptr,
@@ -32,7 +32,7 @@ class GenericWarlockStrategyActionNodeFactory : public NamedObjectFactory<Action
/*C*/ nullptr);
}
static ActionNode* summon_succubus(PlayerbotAI* botAI)
static ActionNode* summon_succubus([[maybe_unused]] PlayerbotAI* botAI)
{
return new ActionNode("summon succubus",
/*P*/ nullptr,