From a8dda550ad0c7405d5b7a3e4986b8f48c6cf1a83 Mon Sep 17 00:00:00 2001 From: kadeshar Date: Sun, 8 Mar 2026 08:49:45 +0100 Subject: [PATCH] Requirement fix to use bigobj parameter to compile (#2176) # Pull Request Compilation fix which making possible compiling without bigobj parameter --- ## How to Test the Changes - compile using Visual Studio without bigobj parameter ## Complexity & Impact Does this change add new decision branches? - - [x] No - - [ ] Yes (**explain below**) Does this change increase per-bot or per-tick processing? - - [x] No - - [ ] Yes (**describe and justify impact**) Could this logic scale poorly under load? - - [x] No - - [ ] Yes (**explain why**) --- ## Defaults & Configuration Does this change modify default bot behavior? - - [x] No - - [ ] Yes (**explain why**) ## AI Assistance Was AI assistance (e.g. ChatGPT or similar tools) used while working on this change? - - [ ] No - - [x] Yes (**explain below**) Automate file creation --- ## Final Checklist - - [x] Stability is not compromised - - [x] Performance impact is understood, tested, and acceptable - - [x] Added logic complexity is justified and explained - - [x] Documentation updated if needed --- .../2026_02_13_00_ai_playerbot_texts.sql | 2 +- src/Bot/Engine/AiObjectContext.cpp | 135 +----------------- src/Bot/Engine/BuildSharedActionContexts.cpp | 57 ++++++++ .../Engine/BuildSharedStrategyContexts.cpp | 14 ++ src/Bot/Engine/BuildSharedTriggerContexts.cpp | 57 ++++++++ src/Bot/Engine/BuildSharedValueContexts.cpp | 7 + 6 files changed, 137 insertions(+), 135 deletions(-) create mode 100644 src/Bot/Engine/BuildSharedActionContexts.cpp create mode 100644 src/Bot/Engine/BuildSharedStrategyContexts.cpp create mode 100644 src/Bot/Engine/BuildSharedTriggerContexts.cpp create mode 100644 src/Bot/Engine/BuildSharedValueContexts.cpp diff --git a/data/sql/playerbots/updates/2026_02_13_00_ai_playerbot_texts.sql b/data/sql/playerbots/updates/2026_02_13_00_ai_playerbot_texts.sql index 90bf69a0..9d254eb4 100644 --- a/data/sql/playerbots/updates/2026_02_13_00_ai_playerbot_texts.sql +++ b/data/sql/playerbots/updates/2026_02_13_00_ai_playerbot_texts.sql @@ -1 +1 @@ -UPDATE `ai_playerbot_texts` SET `text_loc3`='%s, du hörst den triefenden Sarkasmus in meinem text nicht' WHERE `id`=1353; +UPDATE `ai_playerbot_texts` SET `text_loc3`='%s, du hörst den triefenden Sarkasmus in meinem text nicht' WHERE `id`=1353; diff --git a/src/Bot/Engine/AiObjectContext.cpp b/src/Bot/Engine/AiObjectContext.cpp index e6333708..f8036975 100644 --- a/src/Bot/Engine/AiObjectContext.cpp +++ b/src/Bot/Engine/AiObjectContext.cpp @@ -4,61 +4,17 @@ */ #include "AiObjectContext.h" - -#include "ActionContext.h" -#include "ChatActionContext.h" -#include "ChatTriggerContext.h" +#include "Helpers.h" #include "DKAiObjectContext.h" #include "DruidAiObjectContext.h" #include "HunterAiObjectContext.h" #include "MageAiObjectContext.h" #include "PaladinAiObjectContext.h" -#include "Playerbots.h" #include "PriestAiObjectContext.h" #include "RogueAiObjectContext.h" #include "ShamanAiObjectContext.h" -#include "SharedValueContext.h" -#include "StrategyContext.h" -#include "TriggerContext.h" -#include "ValueContext.h" #include "WarlockAiObjectContext.h" #include "WarriorAiObjectContext.h" -#include "WorldPacketActionContext.h" -#include "WorldPacketTriggerContext.h" -#include "Ai/Dungeon/DungeonStrategyContext.h" -#include "Ai/Dungeon/WotlkDungeonActionContext.h" -#include "Ai/Dungeon/WotlkDungeonTriggerContext.h" -#include "Ai/Raid/RaidStrategyContext.h" -#include "Ai/Raid/Aq20/RaidAq20ActionContext.h" -#include "Ai/Raid/Aq20/RaidAq20TriggerContext.h" -#include "Ai/Raid/MoltenCore/RaidMcActionContext.h" -#include "Ai/Raid/MoltenCore/RaidMcTriggerContext.h" -#include "Ai/Raid/BlackwingLair/RaidBwlActionContext.h" -#include "Ai/Raid/BlackwingLair/RaidBwlTriggerContext.h" -#include "Ai/Raid/Karazhan/RaidKarazhanActionContext.h" -#include "Ai/Raid/Karazhan/RaidKarazhanTriggerContext.h" -#include "Ai/Raid/GruulsLair/RaidGruulsLairActionContext.h" -#include "Ai/Raid/GruulsLair/RaidGruulsLairTriggerContext.h" -#include "Ai/Raid/Magtheridon/RaidMagtheridonActionContext.h" -#include "Ai/Raid/Magtheridon/RaidMagtheridonTriggerContext.h" -#include "Ai/Raid/Naxxramas/RaidNaxxActionContext.h" -#include "Ai/Raid/Naxxramas/RaidNaxxTriggerContext.h" -#include "Ai/Raid/SerpentshrineCavern/RaidSSCActionContext.h" -#include "Ai/Raid/SerpentshrineCavern/RaidSSCTriggerContext.h" -#include "Ai/Raid/TempestKeep/RaidTempestKeepActionContext.h" -#include "Ai/Raid/TempestKeep/RaidTempestKeepTriggerContext.h" -#include "Ai/Raid/EyeOfEternity/RaidEoEActionContext.h" -#include "Ai/Raid/EyeOfEternity/RaidEoETriggerContext.h" -#include "Ai/Raid/VaultOfArchavon/RaidVoAActionContext.h" -#include "Ai/Raid/VaultOfArchavon/RaidVoATriggerContext.h" -#include "Ai/Raid/ObsidianSanctum/RaidOsActionContext.h" -#include "Ai/Raid/ObsidianSanctum/RaidOsTriggerContext.h" -#include "Ai/Raid/Ulduar/RaidUlduarActionContext.h" -#include "Ai/Raid/Ulduar/RaidUlduarTriggerContext.h" -#include "Ai/Raid/Onyxia/RaidOnyxiaActionContext.h" -#include "Ai/Raid/Onyxia/RaidOnyxiaTriggerContext.h" -#include "Ai/Raid/Icecrown/RaidIccActionContext.h" -#include "Ai/Raid/Icecrown/RaidIccTriggerContext.h" SharedNamedObjectContextList AiObjectContext::sharedStrategyContexts; SharedNamedObjectContextList AiObjectContext::sharedActionContexts; @@ -100,95 +56,6 @@ void AiObjectContext::BuildSharedContexts() BuildSharedValueContexts(sharedValueContexts); } -void AiObjectContext::BuildSharedStrategyContexts(SharedNamedObjectContextList& strategyContexts) -{ - strategyContexts.Add(new StrategyContext()); - strategyContexts.Add(new MovementStrategyContext()); - strategyContexts.Add(new AssistStrategyContext()); - strategyContexts.Add(new QuestStrategyContext()); - strategyContexts.Add(new DungeonStrategyContext()); - strategyContexts.Add(new RaidStrategyContext()); -} - -void AiObjectContext::BuildSharedActionContexts(SharedNamedObjectContextList& actionContexts) -{ - actionContexts.Add(new ActionContext()); - actionContexts.Add(new ChatActionContext()); - actionContexts.Add(new WorldPacketActionContext()); - actionContexts.Add(new RaidAq20ActionContext()); - actionContexts.Add(new RaidMcActionContext()); - actionContexts.Add(new RaidBwlActionContext()); - actionContexts.Add(new RaidKarazhanActionContext()); - actionContexts.Add(new RaidGruulsLairActionContext()); - actionContexts.Add(new RaidMagtheridonActionContext()); - actionContexts.Add(new RaidNaxxActionContext()); - actionContexts.Add(new RaidSSCActionContext()); - actionContexts.Add(new RaidTempestKeepActionContext()); - actionContexts.Add(new RaidOsActionContext()); - actionContexts.Add(new RaidEoEActionContext()); - actionContexts.Add(new RaidVoAActionContext()); - actionContexts.Add(new RaidUlduarActionContext()); - actionContexts.Add(new RaidOnyxiaActionContext()); - actionContexts.Add(new RaidIccActionContext()); - actionContexts.Add(new WotlkDungeonUKActionContext()); - actionContexts.Add(new WotlkDungeonNexActionContext()); - actionContexts.Add(new WotlkDungeonANActionContext()); - actionContexts.Add(new WotlkDungeonOKActionContext()); - actionContexts.Add(new WotlkDungeonDTKActionContext()); - actionContexts.Add(new WotlkDungeonVHActionContext()); - actionContexts.Add(new WotlkDungeonGDActionContext()); - actionContexts.Add(new WotlkDungeonHoSActionContext()); - actionContexts.Add(new WotlkDungeonHoLActionContext()); - actionContexts.Add(new WotlkDungeonOccActionContext()); - actionContexts.Add(new WotlkDungeonUPActionContext()); - actionContexts.Add(new WotlkDungeonCoSActionContext()); - actionContexts.Add(new WotlkDungeonFoSActionContext()); - actionContexts.Add(new WotlkDungeonPoSActionContext()); - actionContexts.Add(new WotlkDungeonToCActionContext()); -} - -void AiObjectContext::BuildSharedTriggerContexts(SharedNamedObjectContextList& triggerContexts) -{ - triggerContexts.Add(new TriggerContext()); - triggerContexts.Add(new ChatTriggerContext()); - triggerContexts.Add(new WorldPacketTriggerContext()); - triggerContexts.Add(new RaidAq20TriggerContext()); - triggerContexts.Add(new RaidMcTriggerContext()); - triggerContexts.Add(new RaidBwlTriggerContext()); - triggerContexts.Add(new RaidKarazhanTriggerContext()); - triggerContexts.Add(new RaidGruulsLairTriggerContext()); - triggerContexts.Add(new RaidMagtheridonTriggerContext()); - triggerContexts.Add(new RaidNaxxTriggerContext()); - triggerContexts.Add(new RaidSSCTriggerContext()); - triggerContexts.Add(new RaidTempestKeepTriggerContext()); - triggerContexts.Add(new RaidOsTriggerContext()); - triggerContexts.Add(new RaidEoETriggerContext()); - triggerContexts.Add(new RaidVoATriggerContext()); - triggerContexts.Add(new RaidUlduarTriggerContext()); - triggerContexts.Add(new RaidOnyxiaTriggerContext()); - triggerContexts.Add(new RaidIccTriggerContext()); - triggerContexts.Add(new WotlkDungeonUKTriggerContext()); - triggerContexts.Add(new WotlkDungeonNexTriggerContext()); - triggerContexts.Add(new WotlkDungeonANTriggerContext()); - triggerContexts.Add(new WotlkDungeonOKTriggerContext()); - triggerContexts.Add(new WotlkDungeonDTKTriggerContext()); - triggerContexts.Add(new WotlkDungeonVHTriggerContext()); - triggerContexts.Add(new WotlkDungeonGDTriggerContext()); - triggerContexts.Add(new WotlkDungeonHoSTriggerContext()); - triggerContexts.Add(new WotlkDungeonHoLTriggerContext()); - triggerContexts.Add(new WotlkDungeonOccTriggerContext()); - triggerContexts.Add(new WotlkDungeonUPTriggerContext()); - triggerContexts.Add(new WotlkDungeonCoSTriggerContext()); - triggerContexts.Add(new WotlkDungeonFoSTriggerContext()); - triggerContexts.Add(new WotlkDungeonPoSTriggerContext()); - triggerContexts.Add(new WotlkDungeonToCTriggerContext()); -} - -void AiObjectContext::BuildSharedValueContexts(SharedNamedObjectContextList& valueContexts) -{ - valueContexts.Add(new ValueContext()); -} - std::vector AiObjectContext::Save() { std::vector result; diff --git a/src/Bot/Engine/BuildSharedActionContexts.cpp b/src/Bot/Engine/BuildSharedActionContexts.cpp new file mode 100644 index 00000000..dc4ccdfe --- /dev/null +++ b/src/Bot/Engine/BuildSharedActionContexts.cpp @@ -0,0 +1,57 @@ +#include "AiObjectContext.h" +#include "ActionContext.h" +#include "ChatActionContext.h" +#include "WorldPacketActionContext.h" +#include "Ai/Raid/Aq20/RaidAq20ActionContext.h" +#include "Ai/Raid/MoltenCore/RaidMcActionContext.h" +#include "Ai/Raid/BlackwingLair/RaidBwlActionContext.h" +#include "Ai/Raid/Karazhan/RaidKarazhanActionContext.h" +#include "Ai/Raid/GruulsLair/RaidGruulsLairActionContext.h" +#include "Ai/Raid/Naxxramas/RaidNaxxActionContext.h" +#include "Ai/Raid/Magtheridon/RaidMagtheridonActionContext.h" +#include "Ai/Raid/SerpentshrineCavern/RaidSSCActionContext.h" +#include "Ai/Raid/TempestKeep/RaidTempestKeepActionContext.h" +#include "Ai/Raid/ObsidianSanctum/RaidOsActionContext.h" +#include "Ai/Raid/EyeOfEternity/RaidEoEActionContext.h" +#include "Ai/Raid/VaultOfArchavon/RaidVoAActionContext.h" +#include "Ai/Raid/Ulduar/RaidUlduarActionContext.h" +#include "Ai/Raid/Onyxia/RaidOnyxiaActionContext.h" +#include "Ai/Raid/Icecrown/RaidIccActionContext.h" +#include "Ai/Dungeon/WotlkDungeonActionContext.h" + +void AiObjectContext::BuildSharedActionContexts(SharedNamedObjectContextList& actionContexts) +{ + actionContexts.Add(new ActionContext()); + actionContexts.Add(new ChatActionContext()); + actionContexts.Add(new WorldPacketActionContext()); + actionContexts.Add(new RaidAq20ActionContext()); + actionContexts.Add(new RaidMcActionContext()); + actionContexts.Add(new RaidBwlActionContext()); + actionContexts.Add(new RaidKarazhanActionContext()); + actionContexts.Add(new RaidGruulsLairActionContext()); + actionContexts.Add(new RaidMagtheridonActionContext()); + actionContexts.Add(new RaidSSCActionContext()); + actionContexts.Add(new RaidTempestKeepActionContext()); + actionContexts.Add(new RaidNaxxActionContext()); + actionContexts.Add(new RaidOsActionContext()); + actionContexts.Add(new RaidEoEActionContext()); + actionContexts.Add(new RaidVoAActionContext()); + actionContexts.Add(new RaidUlduarActionContext()); + actionContexts.Add(new RaidOnyxiaActionContext()); + actionContexts.Add(new RaidIccActionContext()); + actionContexts.Add(new WotlkDungeonUKActionContext()); + actionContexts.Add(new WotlkDungeonNexActionContext()); + actionContexts.Add(new WotlkDungeonANActionContext()); + actionContexts.Add(new WotlkDungeonOKActionContext()); + actionContexts.Add(new WotlkDungeonDTKActionContext()); + actionContexts.Add(new WotlkDungeonVHActionContext()); + actionContexts.Add(new WotlkDungeonGDActionContext()); + actionContexts.Add(new WotlkDungeonHoSActionContext()); + actionContexts.Add(new WotlkDungeonHoLActionContext()); + actionContexts.Add(new WotlkDungeonOccActionContext()); + actionContexts.Add(new WotlkDungeonUPActionContext()); + actionContexts.Add(new WotlkDungeonCoSActionContext()); + actionContexts.Add(new WotlkDungeonFoSActionContext()); + actionContexts.Add(new WotlkDungeonPoSActionContext()); + actionContexts.Add(new WotlkDungeonToCActionContext()); +} diff --git a/src/Bot/Engine/BuildSharedStrategyContexts.cpp b/src/Bot/Engine/BuildSharedStrategyContexts.cpp new file mode 100644 index 00000000..171276d2 --- /dev/null +++ b/src/Bot/Engine/BuildSharedStrategyContexts.cpp @@ -0,0 +1,14 @@ +#include "AiObjectContext.h" +#include "StrategyContext.h" +#include "Ai/Dungeon/DungeonStrategyContext.h" +#include "Ai/Raid/RaidStrategyContext.h" + +void AiObjectContext::BuildSharedStrategyContexts(SharedNamedObjectContextList& strategyContexts) +{ + strategyContexts.Add(new StrategyContext()); + strategyContexts.Add(new MovementStrategyContext()); + strategyContexts.Add(new AssistStrategyContext()); + strategyContexts.Add(new QuestStrategyContext()); + strategyContexts.Add(new DungeonStrategyContext()); + strategyContexts.Add(new RaidStrategyContext()); +} diff --git a/src/Bot/Engine/BuildSharedTriggerContexts.cpp b/src/Bot/Engine/BuildSharedTriggerContexts.cpp new file mode 100644 index 00000000..241e850b --- /dev/null +++ b/src/Bot/Engine/BuildSharedTriggerContexts.cpp @@ -0,0 +1,57 @@ +#include "AiObjectContext.h" +#include "TriggerContext.h" +#include "ChatTriggerContext.h" +#include "WorldPacketTriggerContext.h" +#include "Ai/Raid/Aq20/RaidAq20TriggerContext.h" +#include "Ai/Raid/MoltenCore/RaidMcTriggerContext.h" +#include "Ai/Raid/BlackwingLair/RaidBwlTriggerContext.h" +#include "Ai/Raid/Karazhan/RaidKarazhanTriggerContext.h" +#include "Ai/Raid/GruulsLair/RaidGruulsLairTriggerContext.h" +#include "Ai/Raid/Magtheridon/RaidMagtheridonTriggerContext.h" +#include "Ai/Raid/Naxxramas/RaidNaxxTriggerContext.h" +#include "Ai/Raid/SerpentshrineCavern/RaidSSCTriggerContext.h" +#include "Ai/Raid/TempestKeep/RaidTempestKeepTriggerContext.h" +#include "Ai/Raid/ObsidianSanctum/RaidOsTriggerContext.h" +#include "Ai/Raid/EyeOfEternity/RaidEoETriggerContext.h" +#include "Ai/Raid/VaultOfArchavon/RaidVoATriggerContext.h" +#include "Ai/Raid/Ulduar/RaidUlduarTriggerContext.h" +#include "Ai/Raid/Onyxia/RaidOnyxiaTriggerContext.h" +#include "Ai/Raid/Icecrown/RaidIccTriggerContext.h" +#include "Ai/Dungeon/WotlkDungeonTriggerContext.h" + +void AiObjectContext::BuildSharedTriggerContexts(SharedNamedObjectContextList& triggerContexts) +{ + triggerContexts.Add(new TriggerContext()); + triggerContexts.Add(new ChatTriggerContext()); + triggerContexts.Add(new WorldPacketTriggerContext()); + triggerContexts.Add(new RaidAq20TriggerContext()); + triggerContexts.Add(new RaidMcTriggerContext()); + triggerContexts.Add(new RaidBwlTriggerContext()); + triggerContexts.Add(new RaidKarazhanTriggerContext()); + triggerContexts.Add(new RaidGruulsLairTriggerContext()); + triggerContexts.Add(new RaidMagtheridonTriggerContext()); + triggerContexts.Add(new RaidNaxxTriggerContext()); + triggerContexts.Add(new RaidSSCTriggerContext()); + triggerContexts.Add(new RaidTempestKeepTriggerContext()); + triggerContexts.Add(new RaidOsTriggerContext()); + triggerContexts.Add(new RaidEoETriggerContext()); + triggerContexts.Add(new RaidVoATriggerContext()); + triggerContexts.Add(new RaidUlduarTriggerContext()); + triggerContexts.Add(new RaidOnyxiaTriggerContext()); + triggerContexts.Add(new RaidIccTriggerContext()); + triggerContexts.Add(new WotlkDungeonUKTriggerContext()); + triggerContexts.Add(new WotlkDungeonNexTriggerContext()); + triggerContexts.Add(new WotlkDungeonANTriggerContext()); + triggerContexts.Add(new WotlkDungeonOKTriggerContext()); + triggerContexts.Add(new WotlkDungeonDTKTriggerContext()); + triggerContexts.Add(new WotlkDungeonVHTriggerContext()); + triggerContexts.Add(new WotlkDungeonGDTriggerContext()); + triggerContexts.Add(new WotlkDungeonHoSTriggerContext()); + triggerContexts.Add(new WotlkDungeonHoLTriggerContext()); + triggerContexts.Add(new WotlkDungeonOccTriggerContext()); + triggerContexts.Add(new WotlkDungeonUPTriggerContext()); + triggerContexts.Add(new WotlkDungeonCoSTriggerContext()); + triggerContexts.Add(new WotlkDungeonFoSTriggerContext()); + triggerContexts.Add(new WotlkDungeonPoSTriggerContext()); + triggerContexts.Add(new WotlkDungeonToCTriggerContext()); +} diff --git a/src/Bot/Engine/BuildSharedValueContexts.cpp b/src/Bot/Engine/BuildSharedValueContexts.cpp new file mode 100644 index 00000000..31f12da5 --- /dev/null +++ b/src/Bot/Engine/BuildSharedValueContexts.cpp @@ -0,0 +1,7 @@ +#include "AiObjectContext.h" +#include "ValueContext.h" + +void AiObjectContext::BuildSharedValueContexts(SharedNamedObjectContextList& valueContexts) +{ + valueContexts.Add(new ValueContext()); +}