diff --git a/conf/playerbots.conf.dist b/conf/playerbots.conf.dist index 6ea92b2d6..d673cd53e 100644 --- a/conf/playerbots.conf.dist +++ b/conf/playerbots.conf.dist @@ -22,7 +22,6 @@ # THRESHOLDS # QUESTS # COMBAT -# GREATER BUFFS STRATEGIES # CHEATS # SPELLS # FLIGHTPATH @@ -38,7 +37,7 @@ # RPG STRATEGY # TELEPORTS # BATTLEGROUND & ARENA & PVP -# RANDOM BOT TIMING AND BEHAVIOR +# RANDOMBOT TIMING AND BEHAVIOR # PREMADE SPECS # INFORMATION # WARRIOR @@ -62,15 +61,13 @@ # MAGE # WARLOCK # DRUID +# RAIDS # PLAYERBOTS SYSTEM SETTINGS # DATABASE & CONNECTIONS # DEBUG # CHAT SETTINGS # LOGS -# DEPRECIATED (TEMPORARY) -# -# -# +# DEPRECATED (TEMPORARY) #################################################################################################### ################################### @@ -123,7 +120,6 @@ AiPlayerbot.DisabledWithoutRealPlayerLogoutDelay = 300 #################################################################################################### # GENERAL # -# # The maximum number of bots that a player can control simultaneously AiPlayerbot.MaxAddedBots = 40 @@ -139,7 +135,7 @@ AiPlayerbot.AddClassAccountPoolSize = 50 # Default: 1 (accept based on level) AiPlayerbot.GroupInvitationPermission = 1 -# Keep alt bots in the party even when the master leaves +# Keep altbots in the party even when the master leaves # 0 = disabled (default behavior) # 1 = enabled (prevents bots from automatically leaving the group) AiPlayerbot.KeepAltsInGroup = 0 @@ -188,18 +184,22 @@ AiPlayerbot.SelfBotLevel = 1 # Default: 0 (non-GM player can use any intialization commands) AiPlayerbot.AutoInitOnly = 0 +# Allow .bot refresh=raid to unbind instances on player-created alt +# bots (non-addclass bots). When 0, refresh=raid is denied on alts +# with "non-addclass bot" error. UnbindInstance is DB-light, no lag +# risk from enabling this. +# Default: 0 +AiPlayerbot.ResetInstanceIdForAltBots = 0 + # The upper limit ratio of bot equipment level for init=auto # Default: 1.0 (same with the player) AiPlayerbot.AutoInitEquipLevelLimitRatio = 1.0 -# -# AllowLearnTrainerSpells -# Description: Allow the bot to learn trainers' spells as long as it has the money. -# Default: 1 - (Enabled) -# 0 - (Disabled) +# AllowLearnTrainerSpells +# Description: Allow the bot to learn trainers' spells as long as it has the money. +# Default: 1 - (enabled) AiPlayerbot.AllowLearnTrainerSpells = 1 -# # # #################################################################################################### @@ -207,7 +207,6 @@ AiPlayerbot.AllowLearnTrainerSpells = 1 #################################################################################################### # SUMMON OPTIONS # -# # Enable/Disable summoning bots when the master is in combat # Default: 1 (enabled) @@ -229,7 +228,6 @@ AiPlayerbot.ReviveBotWhenSummoned = 1 # Default: 1 (enabled) AiPlayerbot.BotRepairWhenSummon = 1 -# # # #################################################################################################### @@ -237,7 +235,6 @@ AiPlayerbot.BotRepairWhenSummon = 1 #################################################################################################### # MOUNT # -# # Defines at what level a bot will naturally use its 60% ground mount # Note: was level 20 during WotLK, 30 during TBC, 40 during Vanilla @@ -259,7 +256,6 @@ AiPlayerbot.UseFlyMountAtMinLevel = 60 # Default: 70 AiPlayerbot.UseFastFlyMountAtMinLevel = 70 -# # # #################################################################################################### @@ -267,7 +263,6 @@ AiPlayerbot.UseFastFlyMountAtMinLevel = 70 #################################################################################################### # GEAR # -# # Show helmet and cloak on randombots (reset required) AiPlayerbot.RandomBotShowHelmet = 1 @@ -284,7 +279,6 @@ AiPlayerbot.EquipUpgradeThreshold = 1.1 # Two rounds of equipment initialization to create more suitable gear AiPlayerbot.TwoRoundsGearInit = 0 -# # # #################################################################################################### @@ -292,7 +286,6 @@ AiPlayerbot.TwoRoundsGearInit = 0 #################################################################################################### # LOOTING # -# # Bots keep looting when loot system is set to free for all # Default: 0 (disabled) @@ -317,7 +310,16 @@ AiPlayerbot.LootRollRecipe = 0 # Default: 0 (disabled) AiPlayerbot.LootRollDisenchant = 0 -# +# A list of GameObject GUIDs that bots will not interact with. +# List of default GUIDs: +# QuestItems: +# Blood of Heroes = 176213, Defias Gunpowder = 17155, Waterlogged Envelope = 2656, Baelog's Chest = 123329, Half-Buried Bottle = 2560 +# Chests: +# Large Solid Chest = 74448, Box of Assorted Parts = 19020, Food Crate = 3719, Water Barrel = 3658, Barrel of Milk = 3705, Barrel of sweet Nectar = 3706, Tattered Chest = 105579, Large bettered Chest = 75293, Solid Chest = 2857, Battered Foodlocker = 179490, Witch Doctor's Chest = 141596, Relic Coffer = 160836, Dark Coffer = 160845, Fengus's Chest = 179516, Supply Crate = 176224/181085, Malor's Strongbox = 176112 +# Other: +# Shallow Grave (Zul'Farrak) = 128308/128403, Grim Guzzler Boar (Blackrock Depths) = 165739, Dark Iron Ale Mug (Blackrock Depths) = 165738, Father Flame (Blackrock Spire) = 175245, Unforged Runic Breastplate (Blackrock Spire) = 175970, Blacksmithing Plans (Stratholme) = 176325/176327 +AiPlayerbot.DisallowedGameObjects = 176213,17155,2656,74448,19020,3719,3658,3705,3706,105579,75293,2857,179490,141596,160836,160845,179516,176224,181085,176112,128308,128403,165739,165738,175245,175970,176325,176327,123329,2560 + # # #################################################################################################### @@ -325,7 +327,6 @@ AiPlayerbot.LootRollDisenchant = 0 #################################################################################################### # TIMERS # -# # Max AI iterations per tick AiPlayerbot.IterationsPerTick = 10 @@ -373,7 +374,6 @@ AiPlayerbot.SitDelay = 20000 AiPlayerbot.ReturnDelay = 2000 AiPlayerbot.LootDelay = 1000 -# # # #################################################################################################### @@ -381,7 +381,6 @@ AiPlayerbot.LootDelay = 1000 #################################################################################################### # DISTANCES # -# # Distances are in yards AiPlayerbot.FarDistance = 20.0 @@ -402,7 +401,6 @@ AiPlayerbot.RpgDistance = 200 AiPlayerbot.GrindDistance = 75.0 AiPlayerbot.ReactDistance = 150.0 -# # # #################################################################################################### @@ -410,7 +408,6 @@ AiPlayerbot.ReactDistance = 150.0 #################################################################################################### # THRESHOLDS # -# # Health/Mana levels AiPlayerbot.CriticalHealth = 25 @@ -421,7 +418,6 @@ AiPlayerbot.LowMana = 15 AiPlayerbot.MediumMana = 40 AiPlayerbot.HighMana = 65 -# # # #################################################################################################### @@ -429,7 +425,6 @@ AiPlayerbot.HighMana = 65 #################################################################################################### # QUESTS # -# # Bots pick their quest rewards # yes = picks the most useful item, no = list all rewards, ask = pick useful item and lists if multiple @@ -447,7 +442,6 @@ AiPlayerbot.SyncQuestForPlayer = 0 # Default: 1 (enabled) AiPlayerbot.DropObsoleteQuests = 1 -# # # #################################################################################################### @@ -455,7 +449,6 @@ AiPlayerbot.DropObsoleteQuests = 1 #################################################################################################### # COMBAT # -# # Auto add dungeon/raid strategies when entering the instance if implemented AiPlayerbot.ApplyInstanceStrategies = 1 @@ -478,28 +471,26 @@ AiPlayerbot.AutoSaveMana = 1 # Default: 60 (60%) AiPlayerbot.SaveManaThreshold = 60 +# Enable Paladin bots to use greater blessings, with the blessing used being based on the +# number of Paladins in the raid/group and the spec of the recipient. Priorities for each +# spec are hardcoded in GreaterBlessingActions.h. +# 0 = disabled +# 1 = enabled in raid groups only +# 2 = enabled in all groups +# Default: 1 (raid only) +AiPlayerbot.AutoGreaterBlessings = 1 + +# Enable bots to use group reagent buffs: Gift of the Wild, Arcane Brilliance, +# Prayer of Fortitude, Prayer of Spirit, and Prayer of Shadow Protection. +# 0 = disabled +# 1 = enabled in raid groups only +# 2 = enabled in all groups +# Default: 2 (all groups) +AiPlayerbot.AutoPartyBuffs = 2 + # Bots can flee from enemies AiPlayerbot.FleeingEnabled = 1 -# -# -# -#################################################################################################### - -#################################################################################################### -# GREATER BUFFS STRATEGIES -# -# - -# Min group size to use Greater buffs (Paladin, Mage, Druid) -# Default: 3 -AiPlayerbot.MinBotsForGreaterBuff = 3 - -# Cooldown (seconds) between reagent-missing RP warnings, per bot & per buff -# Default: 30 -AiPlayerbot.RPWarningCooldown = 30 - -# # # #################################################################################################### @@ -507,7 +498,6 @@ AiPlayerbot.RPWarningCooldown = 30 #################################################################################################### # CHEATS # -# # Enable/Disable maintenance command # Learn all available spells and skills, assign talent points, refresh consumables, repair, enchant equipment, socket gems, etc. @@ -515,8 +505,8 @@ AiPlayerbot.RPWarningCooldown = 30 # Default: 1 (enabled) AiPlayerbot.MaintenanceCommand = 1 -# Enable/Disable specific maintenance command functionality for alt bots -# Disable to prevent players from giving free bags, spells, skill levels, etc. to their alt bots +# Enable/Disable specific maintenance command functionality for altbots +# Disable to prevent players from giving free bags, spells, skill levels, etc. to their altbots # Default: 1 (enabled) AiPlayerbot.AltMaintenanceAmmo = 1 AiPlayerbot.AltMaintenanceFood = 1 @@ -596,44 +586,35 @@ AiPlayerbot.BotCheats = "food,taxi,raid" # While mod-playerbots does not restore removed attunement requirements, other mods, such as mod-individual-progression, may do so. # This is meant to exclude bots from such requirements. # -# Default: +# Defaults: # Caverns of Time - Part 1 # - 10279, To The Master's Lair # - 10277, The Caverns of Time -# # Caverns of Time - Part 2 (Escape from Durnholde Keep) # - 10282, Old Hillsbrad # - 10283, Taretha's Diversion # - 10284, Escape from Durnholde # - 10285, Return to Andormu -# # Caverns of Time - Part 2 (The Black Morass) # - 10296, The Black Morass # - 10297, The Opening of the Dark Portal # - 10298, Hero of the Brood -# -# Magister's Terrace Attunement +# Magister's Terrace # - 11481, Crisis at the Sunwell # - 11482, Duty Calls # - 11488, Magisters' Terrace # - 11490, The Scryer's Scryer # - 11492, Hard to Kill -# # Serpentshrine Cavern # - 10901, The Cudgel of Kar'desh -# -# The Eye +# Tempest Keep: The Eye # - 10888, Trial of the Naaru: Magtheridon -# -# Mount Hyjal +# Battle for Mount Hyjal (Hyjal Summit) # - 10445, The Vials of Eternity -# # Black Temple # - 10985, A Distraction for Akama -# AiPlayerbot.AttunementQuests = 10279,10277,10282,10283,10284,10285,10296,10297,10298,11481,11482,11488,11490,11492,10901,10888,10445,10985 -# # # #################################################################################################### @@ -641,7 +622,6 @@ AiPlayerbot.AttunementQuests = 10279,10277,10282,10283,10284,10285,10296,10297,1 #################################################################################################### # FLIGHTPATH # -# # Min random delay before the 1st follower bot clicks the flight-master (ms) AiPlayerbot.BotTaxiDelayMinMs = 350 @@ -655,7 +635,6 @@ AiPlayerbot.BotTaxiGapMs = 200 # Extra small randomness added to each gap so launches don’t look robotic (ms) AiPlayerbot.BotTaxiGapJitterMs = 100 -# # # #################################################################################################### @@ -684,21 +663,19 @@ AiPlayerbot.FishingDistance = 40.0 # Distance from water (in yards) beyond which a bot will remove the 'master fishing' strategy AiPlayerbot.EndFishingWithMaster = 30.0 -# # # #################################################################################################### ####################################### # # -# RANDOMBOT-SPECIFIC SETTINGS # +# RANDOMBOT-SPECIFIC SETTINGS # # # ####################################### #################################################################################################### # GENERAL # -# # Enable/Disable randomly generated password for randombot accounts AiPlayerbot.RandomBotRandomPassword = 0 @@ -740,8 +717,8 @@ AiPlayerbot.RandomBotHordeRatio = 50 AiPlayerbot.DisableDeathKnightLogin = 0 # Enable simulated expansion limitation for talents and glyphs -# If enabled, limits talent trees to 5 rows plus the middle talent of the 6th row for bots until level 61 -# and 7 rows plus the middle talent of the 8th row for bots from level 61 until level 71 +# If enabled, limits talent trees to 6 rows plus the middle talent of the 7th row for bots until level 61 +# and 8 rows plus the middle talent of the 9th row for bots from level 61 until level 71 # Default: 0 (disabled) AiPlayerbot.LimitTalentsExpansion = 0 @@ -752,7 +729,11 @@ AiPlayerbot.EnableRandomBotTrading = 1 # Configure message prefixes which will be excluded in analysis in trade action to open trade window AiPlayerbot.TradeActionExcludedPrefixes = "RPLL_H_,DBMv4,{звезда} Questie,{rt1} Questie" -# +# Allow bots to send mail. When disabled, bots will not mail items or money in +# response to chat commands ("send mail"). +# Default: 1 (enabled) +AiPlayerbot.BotSendMailEnabled = 1 + # # #################################################################################################### @@ -760,13 +741,12 @@ AiPlayerbot.TradeActionExcludedPrefixes = "RPLL_H_,DBMv4,{звезда} Questie, #################################################################################################### # LEVELS # -# # Disable randombots being generated with a random level # If disabled, every randombot starts on a specified level (but can still level up by killing mobs and questing) AiPlayerbot.DisableRandomLevels = 0 -# Set randombots' starting level here if "AiPlayerbot.DisableRandomLevels" enabled +# Set randombots' starting level here if "AiPlayerbot.DisableRandomLevels" is enabled AiPlayerbot.RandombotStartingLevel = 1 # Chance randombot has min level on first randomize @@ -785,11 +765,10 @@ AiPlayerbot.RandomBotFixedLevel = 0 # Default: 0 (disabled) AiPlayerbot.DowngradeMaxLevelBot = 0 -# Set XP rate for random bots (Default: 1.0) +# Set XP rate for randombots (Default: 1.0) # Server XP Rate * AiPlayerbot.RandomBotXPRate AiPlayerbot.RandomBotXPRate = 1.0 -# # # #################################################################################################### @@ -797,7 +776,20 @@ AiPlayerbot.RandomBotXPRate = 1.0 #################################################################################################### # GEAR # -# + +# Randombots automatically receive upgraded equipment on levelup +# Default: 1 (enabled) +AiPlayerbot.AutoUpgradeEquip = 1 + +# Enable/disable which (if any) randombots preserve their current equipment and spec during login +# and periodic randomization (i.e., persistence). +# Default: 1 (enabled) +AiPlayerbot.EquipAndSpecPersistence = 1 + +# If EquipAndSpecPersistence is enabled, equipment and talent persistence will affect randombots of this +# level or higher. +# Default: 1 (enable persistence for randombots of at least level 1 (i.e., all levels)) +AiPlayerbot.EquipAndSpecPersistenceLevel = 1 # Equipment quality limitation for randombots (1 = normal, 2 = uncommon, 3 = rare, 4 = epic, 5 = legendary) # This also sets the maximum quality that can be generated by autogear for randombots and altbots @@ -823,25 +815,20 @@ AiPlayerbot.RandomGearScoreLimit = 0 # armor of the preferred type will score 3x higher and be equipped instead. # # ARMOR TYPE PREFERENCES: -# Plate: Warriors, Paladins, Death Knights -# Mail: Hunters, Shamans +# Plate: Warriors, Paladins, Death Knights +# Mail: Hunters, Shamans # Leather: Rogues, Druids -# Cloth: Priests, Mages, Warlocks +# Cloth: Priests, Mages, Warlocks # # Default: 0 (disabled) AiPlayerbot.PreferClassArmorType = 0 - # When enabled, bots prefer spec-appropriate weapons based on speed and weapon type during autogear. # Examples: Arms Warriors favor slow 2H axes/polearms (Axe Specialization), Combat Rogues # favor a slow MH with a fast OH, and Enhancement Shamans favor synchronized slow 1H weapons. # Default: 0 (disabled) AiPlayerbot.PreferredSpecWeapons = 0 -# If disabled, random bots can only upgrade equipment through looting and quests -# Default: 1 (enabled) -AiPlayerbot.IncrementalGearInit = 1 - # Set minimum level of bots that will enchant and socket gems into their equipment with maintenance # If greater than RandomBotMaxlevel, bots will not automatically enchant equipment or socket gems # Default: 60 @@ -862,24 +849,14 @@ AiPlayerbot.LimitGearExpansion = 1 AiPlayerbot.RandomGearLoweringChance = 0 # Unobtainable or unusable items (comma-separated list of item IDs) -# Default: Chilton Wand (12468), Totem of the Earthen Ring (46978) -AiPlayerbot.UnobtainableItems = 12468,46978 +# Defaults: Chilton Wand (12468), Frenzyheart Insignia of Fury test/on-use row (44869), +# Oracle Talisman of Ablution test/on-use row (44870), Totem of the Earthen Ring (46978) +AiPlayerbot.UnobtainableItems = 12468,44869,44870,46978 # Randombots check player's gearscore level and deny the group invitation if it's too low # Default: 0 (disabled) AiPlayerbot.GearScoreCheck = 0 -# Enable/Disable bot equipment persistence (stop random initialization) after certain level (EquipmentPersistenceLevel) -# Default: 0 (disabled) -AiPlayerbot.EquipmentPersistence = 0 - -# Default level if enabled: 80 -AiPlayerbot.EquipmentPersistenceLevel = 80 - -# Randombots automatically upgrade their equipment on levelup -# Default: 1 (enabled) -AiPlayerbot.AutoUpgradeEquip = 1 - # Only set wolf pets for hunters for optimal raid performance (0 = disabled, 1 = enabled only for max-level bots, 2 = enabled) # Default: 0 (disabled) AiPlayerbot.HunterWolfPet = 0 @@ -898,13 +875,14 @@ AiPlayerbot.PetChatCommandDebug = 0 # See the creature_family database table for all pet families by ID (note: ID for spiders is 3) AiPlayerbot.ExcludedHunterPetFamilies = "" -# # # #################################################################################################### + #################################################################################################### # ACTIVITY # + # BotActiveAlone # - Controls how many bots are active when no real players are nearby. # - Think of it as a rough percentage: 10 means approximately 10% of bots will be active. @@ -926,7 +904,6 @@ AiPlayerbot.ExcludedHunterPetFamilies = "" AiPlayerbot.BotActiveAlone = 10 AiPlayerbot.BotActiveAloneDurationSeconds = 30 -# # Force-active rules (1 = on, 0 = off) # These override the percentage above. If any of these conditions is true, the bot stays active. # @@ -968,7 +945,6 @@ AiPlayerbot.botActiveAloneSmartScaleDiffLimitCeiling = 200 AiPlayerbot.botActiveAloneSmartScaleWhenMinLevel = 1 AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80 -# # # #################################################################################################### @@ -976,22 +952,21 @@ AiPlayerbot.botActiveAloneSmartScaleWhenMaxLevel = 80 #################################################################################################### # QUESTS # -# -# Quest that will be completed and rewarded for all randombots +# Quests that will be completed and rewarded for all randombots AiPlayerbot.RandomBotQuestIds = "3802,5505,6502,7761,7848,10277,10285,11492,13188,13189,24499,24511,24710,24712" # Randombots will group with nearby randombots to do shared quests +# Note: Currently not functioning properly AiPlayerbot.RandomBotGroupNearby = 0 # Randombots will pick quests on their own and try to complete them # Default: 1 (enabled) AiPlayerbot.AutoDoQuests = 1 -# Quest items to keep in bots' inventories (do not destroy) +# Quest items to keep in bots' inventories (do not automatically destroy) AiPlayerbot.RandomBotQuestItems = "5175,5176,5177,5178,6948,11000,12382,13704,16309" -# # # #################################################################################################### @@ -999,7 +974,6 @@ AiPlayerbot.RandomBotQuestItems = "5175,5176,5177,5178,6948,11000,12382,13704,16 #################################################################################################### # SPELLS # -# # Randombots automatically learn class quest reward spells on levelup # Default: 0 (disabled) @@ -1013,13 +987,13 @@ AiPlayerbot.AutoLearnTrainerSpells = 1 # Default: 1 (enabled) AiPlayerbot.AutoPickTalents = 1 -# Spells every randombot will learn automatically and every altbot will learn with maintenance (54197 - cold weather flying) +# Spells every randombot will learn automatically and every altbot will learn with maintenance +# Default: 54197 (Cold Weather Flying) AiPlayerbot.RandomBotSpellIds = "54197" # ID of spell to open lootable chests AiPlayerbot.OpenGoSpell = 6477 -# # # #################################################################################################### @@ -1027,7 +1001,6 @@ AiPlayerbot.OpenGoSpell = 6477 #################################################################################################### # STRATEGIES # -# # Additional randombot strategies # Strategies added here are applied to all randombots, in addition (or subtraction) to spec/role-based default strategies. @@ -1050,7 +1023,6 @@ AiPlayerbot.HealerDPSMapRestriction = 1 # Default: (Dungeon and Raid maps) "33,34,36,43,47,48,70,90,109,129,209,229,230,329,349,389,429,1001,1004,1007,269,540,542,543,545,546,547,552,553,554,555,556,557,558,560,585,574,575,576,578,595,599,600,601,602,604,608,619,632,650,658,668,409,469,509,531,532,534,544,548,550,564,565,580,249,533,603,615,616,624,631,649,724" AiPlayerbot.RestrictedHealerDPSMaps = "33,34,36,43,47,48,70,90,109,129,209,229,230,329,349,389,429,1001,1004,1007,269,540,542,543,545,546,547,552,553,554,555,556,557,558,560,585,574,575,576,578,595,599,600,601,602,604,608,619,632,650,658,668,409,469,509,531,532,534,544,548,550,564,565,580,249,533,603,615,616,624,631,649,724" -# # # #################################################################################################### @@ -1058,7 +1030,6 @@ AiPlayerbot.RestrictedHealerDPSMaps = "33,34,36,43,47,48,70,90,109,129,209,229,2 #################################################################################################### # RPG STRATEGY # -# # Randombots will behave more like real players (experimental) # This option will override AiPlayerbot.AutoDoQuests, RandomBotTeleLowerLevel, and RandomBotTeleHigherLevel @@ -1220,7 +1191,6 @@ AiPlayerbot.ZoneBracket.3537 = 68,75 AiPlayerbot.ZoneBracket.3711 = 75,80 AiPlayerbot.ZoneBracket.4197 = 79,80 -# # # #################################################################################################### @@ -1228,13 +1198,12 @@ AiPlayerbot.ZoneBracket.4197 = 79,80 #################################################################################################### # TELEPORTS # -# # Map IDs where bots can be teleported to # Defaults: 0 = Eastern Kingdoms, 1 = Kalimdor, 530 = Outland, 571 = Northrend AiPlayerbot.RandomBotMaps = 0,1,530,571 -# Probabilty bots teleport to banker (city) +# Probability bots teleport to banker (city) # Default: 0.25 AiPlayerbot.ProbTeleToBankers = 0.25 @@ -1252,7 +1221,7 @@ AiPlayerbot.TeleToSilvermoonCityWeight = 1 AiPlayerbot.TeleToShattrathCityWeight = 1 AiPlayerbot.TeleToDalaranWeight = 1 -# How far randombots are teleported after death +# How far randombots are teleported after death in yards AiPlayerbot.RandomBotTeleportDistance = 100 # How many levels below the lowest-level creature in a zone, can a bot be @@ -1269,7 +1238,6 @@ AiPlayerbot.RandomBotTeleHigherLevel = 3 # Default: 1 (enabled) AiPlayerbot.AutoTeleportForLevel = 1 -# # # #################################################################################################### @@ -1277,7 +1245,6 @@ AiPlayerbot.AutoTeleportForLevel = 1 #################################################################################################### # BATTLEGROUNDS & ARENAS & PVP # -# # Enable battlegrounds/arenas for randombots AiPlayerbot.RandomBotJoinBG = 1 @@ -1287,49 +1254,53 @@ AiPlayerbot.RandomBotAutoJoinBG = 0 # Required Configuration for RandomBotAutoJoinBG # -# Known issue: When enabling many brackats in combination with multiple instances, it can lead to more instances created by bots than intended (over-queuing). +# Known issue: When enabling many brackets in combination with multiple instances, it can lead to more +# instances created by bots than intended (over-queuing). # # This section controls the level brackets and automatic bot participation in battlegrounds and arenas. # # Brackets: -# - Specify the level ranges for bots to auto-join: -# - Warsong Gulch (WS): 0 = 10-19, 1 = 20-29, 2 = 30-39, ..., 7 = 80 (Default: 7) -# - Rated Arena: 0 = 10-14, 1 = 15-19, ..., 14 = 80-84 (Default: 14) -# - Multiple brackets can be specified as a comma-separated list (e.g., "0,2,5"). +# - Specify the level ranges for bots to auto-join (bracket IDs are per-BG and start at 0 from each BG's minimum level): +# - Warsong Gulch (WS): 0=10-19, 1=20-29, 2=30-39, 3=40-49, 4=50-59, 5=60-69, 6=70-79, 7=80 (Default: 7) +# - Arathi Basin (AB): 0=20-29, 1=30-39, 2=40-49, 3=50-59, 4=60-69, 5=70-79, 6=80 (Default: 6) +# - Alterac Valley (AV): 0=51-60, 1=61-70, 2=71-79, 3=80 (Default: 3) +# - Eye of the Storm (EY): 0=61-69, 1=70-79, 2=80 (Default: 2) +# - Isle of Conquest (IC): 0=71-79, 1=80 (Default: 1) +# - Multiple BG brackets can be specified as a comma-separated list (e.g., "0,2,5"). Not applicable for Rated Arena. +# - Rated Arena: 0=10-14, 1=15-19, 2=20-24, ..., 13=75-79, 14=80-84 (Default: 14) # # Counts: -# - Specify the number of battlegrounds to auto-fill per bracket. -# - For battlegrounds, 'Count" is the number of bots per bracket. For example: -# - Warsong Gulch Count = 1 adds 20 bots (10 per team). +# - Specify the number of battles to auto-fill per bracket. +# - For battlegrounds, 'Count" is the number of battles per bracket. For example: +# - RandomBotAutoJoinWSBrackets = 6,7 +# - RandomBotAutoJoinBGWSCount = 1 +# - These configs would create two battles, one for bracket 6 and one for bracket 7. # - Ensure there are enough eligible bots to meet the specified counts. -# -# Arena Considerations: -# - Rated arena brackets default to level 80-84 (bracket 14). -# - Custom code changes are required for lower-level arena brackets to function properly. -# + # Battleground bracket range possibilities: -# AiPlayerbot.RandomBotAutoJoinICBrackets = 0,1 -# AiPlayerbot.RandomBotAutoJoinEYBrackets = 0,1,2 -# AiPlayerbot.RandomBotAutoJoinAVBrackets = 0,1,2,3 -# AiPlayerbot.RandomBotAutoJoinABBrackets = 0,1,2,3,4,5,6 # AiPlayerbot.RandomBotAutoJoinWSBrackets = 0,1,2,3,4,5,6,7 - -AiPlayerbot.RandomBotAutoJoinICBrackets = 1 -AiPlayerbot.RandomBotAutoJoinEYBrackets = 2 -AiPlayerbot.RandomBotAutoJoinAVBrackets = 3 -AiPlayerbot.RandomBotAutoJoinABBrackets = 6 +# AiPlayerbot.RandomBotAutoJoinABBrackets = 0,1,2,3,4,5,6 +# AiPlayerbot.RandomBotAutoJoinAVBrackets = 0,1,2,3 +# AiPlayerbot.RandomBotAutoJoinEYBrackets = 0,1,2 +# AiPlayerbot.RandomBotAutoJoinICBrackets = 0,1 AiPlayerbot.RandomBotAutoJoinWSBrackets = 7 +AiPlayerbot.RandomBotAutoJoinABBrackets = 6 +AiPlayerbot.RandomBotAutoJoinAVBrackets = 3 +AiPlayerbot.RandomBotAutoJoinEYBrackets = 2 +AiPlayerbot.RandomBotAutoJoinICBrackets = 1 -# Battlegrounds count (per bracket!): -AiPlayerbot.RandomBotAutoJoinBGICCount = 0 -AiPlayerbot.RandomBotAutoJoinBGEYCount = 1 -AiPlayerbot.RandomBotAutoJoinBGAVCount = 0 -AiPlayerbot.RandomBotAutoJoinBGABCount = 1 +# Battlegrounds battles count (per bracket): AiPlayerbot.RandomBotAutoJoinBGWSCount = 1 +AiPlayerbot.RandomBotAutoJoinBGABCount = 1 +AiPlayerbot.RandomBotAutoJoinBGAVCount = 0 +AiPlayerbot.RandomBotAutoJoinBGEYCount = 1 +AiPlayerbot.RandomBotAutoJoinBGICCount = 0 -# Arena configuration: +# Arena bracket (single bracket only): +# Custom code changes are required for lower-level arena brackets to function properly. AiPlayerbot.RandomBotAutoJoinArenaBracket = 14 +# Arena battles count: AiPlayerbot.RandomBotAutoJoinBGRatedArena2v2Count = 0 AiPlayerbot.RandomBotAutoJoinBGRatedArena3v3Count = 0 AiPlayerbot.RandomBotAutoJoinBGRatedArena5v5Count = 0 @@ -1352,41 +1323,41 @@ AiPlayerbot.RandomBotArenaTeamMinRating = 1000 # Delete all randombot arena teams AiPlayerbot.DeleteRandomBotArenaTeams = 0 -# PvP Restricted Zones (bots don't pvp) +# PvP Restricted Zones (bots will not initiate PvP or defend themselves if attacked) 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,4395,3703,4298,3951" -# PvP Restricted Areas (bots don't pvp) +# PvP Restricted Areas (bots will not initiate PvP or defend themselves if attacked) AiPlayerbot.PvpProhibitedAreaIds = "976,35,392,2268,4161,4010,4317,4312,3649,3887,3958,3724,4080,3938,3754,3786,3973,4085,4086,4087,4088" # Improve reaction speeds in battlegrounds and arenas (may cause lag) AiPlayerbot.FastReactInBG = 1 -# # # #################################################################################################### #################################################################################################### -# RANDOM BOT TIMING AND BEHAVIOR -# +# RANDOMBOT TIMING AND BEHAVIOR # -# How often (in seconds) the random bot manager runs its main update loop +# How often (in seconds) the randombot manager runs its main update loop # Default: 20 AiPlayerbot.RandomBotUpdateInterval = 20 -# Minimum and maximum seconds before the manager re-evaluates and adjusts total random bot count +# Minimum and maximum seconds before the manager re-evaluates and adjusts total randombot count # Defaults: 1800 (min), 7200 (max) AiPlayerbot.RandomBotCountChangeMinInterval = 1800 AiPlayerbot.RandomBotCountChangeMaxInterval = 7200 -# Minimum and maximum seconds a random bot will stay online before logging out +# Minimum and maximum seconds a randombot will stay online before logging out # Defaults: 600 (min), 28800 (max) AiPlayerbot.MinRandomBotInWorldTime = 600 AiPlayerbot.MaxRandomBotInWorldTime = 28800 -# Minimum and maximum seconds before a bot is eligible for re-randomization (gear, class, talents, etc.) -# Defaults: 7200 (min), 1209600 (max) +# Some aspects of randombots are periodically randomized while they are logged in and idle, +# including their inventories and, if EquipAndSpecPersistence is disabled, their equipment and specs. +# This config sets the minimum and maximum seconds between such randomization events. +# Defaults: 7200 (min - 2 hours), 1209600 (max - 14 days) AiPlayerbot.MinRandomBotRandomizeTime = 7200 AiPlayerbot.MaxRandomBotRandomizeTime = 1209600 @@ -1408,7 +1379,6 @@ AiPlayerbot.MaxRandomBotTeleportInterval = 18000 # Default: 31104000 AiPlayerbot.PermanentlyInWorldTime = 31104000 -# # # #################################################################################################### @@ -1422,7 +1392,6 @@ AiPlayerbot.PermanentlyInWorldTime = 31104000 #################################################################################################### # INFORMATION # -# # AiPlayerbot.PremadeSpecName.. = #Name of the talent specialisation # AiPlayerbot.PremadeSpecLink... = #Wowhead style link the bot should work towards at given level. @@ -1430,7 +1399,6 @@ AiPlayerbot.PermanentlyInWorldTime = 31104000 # e.g., formulate the link on https://www.wowhead.com/wotlk/talent-calc/warrior/3022032123335100202012013031251-32505010002 # 0 <= specno < 20, 1 <= level <= 80 -# # # #################################################################################################### @@ -1438,7 +1406,6 @@ AiPlayerbot.PermanentlyInWorldTime = 31104000 #################################################################################################### # WARRIOR # -# AiPlayerbot.PremadeSpecName.1.0 = arms pve AiPlayerbot.PremadeSpecGlyph.1.0 = 43418,43395,43423,43399,43397,43421 @@ -1465,7 +1432,6 @@ AiPlayerbot.PremadeSpecGlyph.1.5 = 43425,43397,43415,43396,49084,45792 AiPlayerbot.PremadeSpecLink.1.5.60 = --250031220223012520332113321 AiPlayerbot.PremadeSpecLink.1.5.80 = 0502300123-3-250031220223012521332113321 -# # # #################################################################################################### @@ -1473,7 +1439,6 @@ AiPlayerbot.PremadeSpecLink.1.5.80 = 0502300123-3-250031220223012521332113321 #################################################################################################### # PALADIN # -# AiPlayerbot.PremadeSpecName.2.0 = holy pve AiPlayerbot.PremadeSpecGlyph.2.0 = 41106,43367,45741,43368,43365,41109 @@ -1501,7 +1466,6 @@ AiPlayerbot.PremadeSpecGlyph.2.5 = 41095,43367,41102,43369,43365,45747 AiPlayerbot.PremadeSpecLink.2.5.60 = --05230250203331222133201321 AiPlayerbot.PremadeSpecLink.2.5.80 = -1532013022-05230250203331322133201321 -# # # #################################################################################################### @@ -1509,7 +1473,6 @@ AiPlayerbot.PremadeSpecLink.2.5.80 = -1532013022-05230250203331322133201321 #################################################################################################### # HUNTER # -# AiPlayerbot.PremadeSpecName.3.0 = bm pve AiPlayerbot.PremadeSpecGlyph.3.0 = 42912,43350,42902,43351,43338,42914 @@ -1550,7 +1513,6 @@ AiPlayerbot.PremadeHunterPetLink.1.20 = 21303010300120101002 AiPlayerbot.PremadeHunterPetLink.2.16 = 2100020330000211001 AiPlayerbot.PremadeHunterPetLink.2.20 = 21000203300002110221 -# # # #################################################################################################### @@ -1558,7 +1520,6 @@ AiPlayerbot.PremadeHunterPetLink.2.20 = 21000203300002110221 #################################################################################################### # ROGUE # -# AiPlayerbot.PremadeSpecName.4.0 = as pve AiPlayerbot.PremadeSpecGlyph.4.0 = 45768,43379,45761,43380,43378,45766 @@ -1585,7 +1546,6 @@ AiPlayerbot.PremadeSpecGlyph.4.5 = 42968,43376,45764,43380,43379,42971 AiPlayerbot.PremadeSpecLink.4.5.60 = --5120212030320121330133221251 AiPlayerbot.PremadeSpecLink.4.5.80 = 3023031-3-5120212030320121350135231251 -# # # #################################################################################################### @@ -1593,7 +1553,6 @@ AiPlayerbot.PremadeSpecLink.4.5.80 = 3023031-3-5120212030320121350135231251 #################################################################################################### # PRIEST # -# AiPlayerbot.PremadeSpecName.5.0 = disc pve AiPlayerbot.PremadeSpecGlyph.5.0 = 42408,43371,42400,43374,43342,45756 @@ -1620,7 +1579,6 @@ AiPlayerbot.PremadeSpecGlyph.5.5 = 42407,43371,45753,43370,43374,42408 AiPlayerbot.PremadeSpecLink.5.5.60 = --005323241223112003102311351 AiPlayerbot.PremadeSpecLink.5.5.80 = 50332031003--005323241223112003102311351 -# # # #################################################################################################### @@ -1628,7 +1586,6 @@ AiPlayerbot.PremadeSpecLink.5.5.80 = 50332031003--005323241223112003102311351 #################################################################################################### # DEATH KNIGHT # -# AiPlayerbot.PremadeSpecName.6.0 = blood pve AiPlayerbot.PremadeSpecGlyph.6.0 = 45805,43673,43538,43544,43672,43542 @@ -1659,8 +1616,6 @@ AiPlayerbot.PremadeSpecGlyph.6.6 = 45804,43539,43549,43673,43672,45805 AiPlayerbot.PremadeSpecLink.6.6.60 = --2301323301002152230101203103151 AiPlayerbot.PremadeSpecLink.6.6.80 = -320050410002-2301323301002152230101203133151 - -# # # #################################################################################################### @@ -1668,7 +1623,6 @@ AiPlayerbot.PremadeSpecLink.6.6.80 = -320050410002-23013233010021522301012031331 #################################################################################################### # SHAMAN # -# AiPlayerbot.PremadeSpecName.7.0 = ele pve AiPlayerbot.PremadeSpecGlyph.7.0 = 41536,43385,41532,43386,44923,45776 @@ -1695,8 +1649,6 @@ AiPlayerbot.PremadeSpecGlyph.7.5 = 45778,43388,45775,43725,43344,41535 AiPlayerbot.PremadeSpecLink.7.5.60 = --05032331331013501120321251 AiPlayerbot.PremadeSpecLink.7.5.80 = -023222301004-05032331331013501120331251 - -# # # #################################################################################################### @@ -1704,7 +1656,6 @@ AiPlayerbot.PremadeSpecLink.7.5.80 = -023222301004-05032331331013501120331251 #################################################################################################### # MAGE # -# AiPlayerbot.PremadeSpecName.8.0 = arcane pve AiPlayerbot.PremadeSpecGlyph.8.0 = 42735,43339,44955,43364,43361,42751 @@ -1735,8 +1686,6 @@ AiPlayerbot.PremadeSpecGlyph.8.6 = 42738,43364,45740,43357,43360,42752 AiPlayerbot.PremadeSpecLink.8.6.60 = --3533203210203100232102231151 AiPlayerbot.PremadeSpecLink.8.6.80 = 23032103010203--3533203210203100232102231151 - -# # # #################################################################################################### @@ -1744,7 +1693,6 @@ AiPlayerbot.PremadeSpecLink.8.6.80 = 23032103010203--353320321020310023210223115 #################################################################################################### # WARLOCK # -# AiPlayerbot.PremadeSpecName.9.0 = affli pve AiPlayerbot.PremadeSpecGlyph.9.0 = 45785,43390,50077,43394,43393,45779 @@ -1773,8 +1721,6 @@ AiPlayerbot.PremadeSpecGlyph.9.5 = 42471,43392,42454,43390,43389,45783 AiPlayerbot.PremadeSpecLink.9.5.60 = --05230015220331351005031051 AiPlayerbot.PremadeSpecLink.9.5.80 = -2032003311302-05230015220331351005031051 - -# # # #################################################################################################### @@ -1782,7 +1728,6 @@ AiPlayerbot.PremadeSpecLink.9.5.80 = -2032003311302-05230015220331351005031051 #################################################################################################### # DRUID # -# AiPlayerbot.PremadeSpecName.11.0 = balance pve AiPlayerbot.PremadeSpecGlyph.11.0 = 40916,43331,40921,43335,44922,40919 @@ -1813,8 +1758,6 @@ AiPlayerbot.PremadeSpecGlyph.11.6 = 40913,43331,40906,43335,43674,45623 AiPlayerbot.PremadeSpecLink.11.6.60 = --230033312031500511350013051 AiPlayerbot.PremadeSpecLink.11.6.80 = 05320021--230033312031500531353013251 - -# # # #################################################################################################### @@ -1828,7 +1771,6 @@ AiPlayerbot.PremadeSpecLink.11.6.80 = 05320021--230033312031500531353013251 #################################################################################################### # # -# # Applies automatically refreshing buffs to bots simulating effects of spells, flasks, food, runes, etc. # Requires sending the command "nc +worldbuff" in chat to a bot (or a group of bots) to enable @@ -1839,7 +1781,6 @@ AiPlayerbot.PremadeSpecLink.11.6.80 = 05320021--230033312031500531353013251 AiPlayerbot.WorldBuffMatrix = # WARRIOR ARMS 1:0,1,0,80,80:53760,57358; # WARRIOR FURY 2:0,1,1,80,80:53760,57358; # WARRIOR PROTECTION 3:0,1,2,80,80:53758,57356; # PALADIN HOLY 4:0,2,0,80,80:53749,57332,60347; # PALADIN PROTECTION 5:0,2,1,80,80:53758,57356; # PALADIN RETRIBUTION 6:0,2,2,80,80:53760,57371; # HUNTER BEAST 7:0,3,0,80,80:53760,57325; # HUNTER MARKSMANSHIP 8:0,3,1,80,80:53760,57358; # HUNTER SURVIVAL 9:0,3,2,80,80:53760,57367; # ROGUE ASSASSINATION 10:0,4,0,80,80:53760,57325; # ROGUE COMBAT 11:0,4,1,80,80:53760,57358; # ROGUE SUBTLETY 12:0,4,2,80,80:53760,57367; # PRIEST DISCIPLINE 13:0,5,0,80,80:53755,57327; # PRIEST HOLY 14:0,5,1,80,80:53755,57327; # PRIEST SHADOW 15:0,5,2,80,80:53755,57327; # DEATH KNIGHT BLOOD 16:0,6,0,80,80:53758,57356; # DEATH KNIGHT FROST 17:0,6,1,80,80:53760,57358; # DEATH KNIGHT UNHOLY 18:0,6,2,80,80:53760,57358; # DEATH KNIGHT BLOOD DPS 19:0,6,3,80,80:53760,57371; # SHAMAN ELEMENTAL 20:0,7,0,80,80:53755,57327; # SHAMAN ENHANCEMENT 21:0,7,1,80,80:53760,57325; # SHAMAN RESTORATION 22:0,7,2,80,80:53755,57327; # MAGE ARCANE 23:0,8,0,80,80:53755,57327; # MAGE FIRE 24:0,8,1,80,80:53755,57327; # MAGE FROST 25:0,8,2,80,80:53755,57327; # WARLOCK AFFLICTION 26:0,9,0,80,80:53755,57327; # WARLOCK DEMONOLOGY 27:0,9,1,80,80:53755,57327; # WARLOCK DESTRUCTION 28:0,9,2,80,80:53755,57327; # DRUID BALANCE 29:0,11,0,80,80:53755,57327; # DRUID FERAL BEAR 30:0,11,1,80,80:53749,53763,57367; # DRUID RESTORATION 31:0,11,2,80,80:54212,57334; # DRUID FERAL CAT 32:0,11,3,80,80:53760,57358; # WARRIOR ARMS TBC 33:0,1,0,70,79:28520,33256; # WARRIOR FURY TBC 34:0,1,1,70,79:28520,33256; # WARRIOR PROTECTION TBC 35:0,1,2,70,79:28518,33257; # PALADIN HOLY TBC 36:0,2,0,70,79:28491,39627,33263; # PALADIN PROTECTION TBC 37:0,2,1,70,79:28518,33257; # PALADIN RETRIBUTION TBC 38:0,2,2,70,79:28520,33256; # HUNTER BEAST TBC 39:0,3,0,70,79:28520,33261; # HUNTER MARKSMANSHIP TBC 40:0,3,1,70,79:28520,33261; # HUNTER SURVIVAL TBC 41:0,3,2,70,79:28520,33261; # ROGUE ASSASSINATION TBC 42:0,4,0,70,79:28520,33261; # ROGUE COMBAT TBC 43:0,4,1,70,79:28520,33261; # ROGUE SUBTLETY TBC 44:0,4,2,70,79:28520,33261; # PRIEST DISCIPLINE TBC 45:0,5,0,70,79:28491,39627,33263; # PRIEST HOLY TBC 46:0,5,1,70,79:28491,39627,33263; # PRIEST SHADOW TBC 47:0,5,2,70,79:28540,33263; # SHAMAN ELEMENTAL TBC 48:0,7,0,70,79:28521,33263; # SHAMAN ENHANCEMENT TBC 49:0,7,1,70,79:28520,33261; # SHAMAN RESTORATION TBC 50:0,7,2,70,79:28491,39627,33263; # MAGE ARCANE TBC 51:0,8,0,70,79:28521,33263; # MAGE FIRE TBC 52:0,8,1,70,79:28540,33263; # MAGE FROST TBC 53:0,8,2,70,79:28540,33263; # WARLOCK AFFLICTION TBC 54:0,9,0,70,79:28540,33263; # WARLOCK DEMONOLOGY TBC 55:0,9,1,70,79:28540,33263; # WARLOCK DESTRUCTION TBC 56:0,9,2,70,79:28540,33263; # DRUID BALANCE TBC 57:0,11,0,70,79:28521,33263; # DRUID FERAL BEAR TBC 58:0,11,1,70,79:28518,33257; # DRUID RESTORATION TBC 59:0,11,2,70,79:28491,39627,33263; # DRUID FERAL CAT TBC 60:0,11,3,70,79:28520,33261; # WARRIOR ARMS VANILLA 61:0,1,0,60,69:17538,24799; # WARRIOR FURY VANILLA 62:0,1,1,60,69:17538,24799; # WARRIOR PROTECTION VANILLA 63:0,1,2,60,69:17626,25661; # PALADIN HOLY VANILLA 64:0,2,0,60,69:17627,18194; # PALADIN PROTECTION VANILLA 65:0,2,1,60,69:17626,25661; # PALADIN RETRIBUTION VANILLA 66:0,2,2,60,69:17628,24799; # HUNTER BEAST VANILLA 67:0,3,0,60,69:17538,18192; # HUNTER MARKSMANSHIP VANILLA 68:0,3,1,60,69:17538,18192; # HUNTER SURVIVAL VANILLA 69:0,3,2,60,69:17538,18192; # ROGUE ASSASSINATION VANILLA 70:0,4,0,60,69:17538,18192; # ROGUE COMBAT VANILLA 71:0,4,1,60,69:17538,18192; # ROGUE SUBTLETY VANILLA 72:0,4,2,60,69:17538,18192; # PRIEST DISCIPLINE VANILLA 73:0,5,0,60,69:17628,18194; # PRIEST HOLY VANILLA 74:0,5,1,60,69:17627,18194; # PRIEST SHADOW VANILLA 75:0,5,2,60,69:17628,18194; # SHAMAN ELEMENTAL VANILLA 76:0,7,0,60,69:17628,18194; # SHAMAN ENHANCEMENT VANILLA 77:0,7,1,60,69:17538,24799; # SHAMAN RESTORATION VANILLA 78:0,7,2,60,69:17627,18194; # MAGE ARCANE VANILLA 79:0,8,0,60,69:17628,18194; # MAGE FIRE VANILLA 80:0,8,1,60,69:17628,18194; # MAGE FROST VANILLA 81:0,8,2,60,69:17628,18194; # WARLOCK AFFLICTION VANILLA 82:0,9,0,60,69:17628,25661; # WARLOCK DEMONOLOGY VANILLA 83:0,9,1,60,69:17628,25661; # WARLOCK DESTRUCTION VANILLA 84:0,9,2,60,69:17628,25661; # DRUID BALANCE VANILLA 85:0,11,0,60,69:17628,18194; # DRUID FERAL BEAR VANILLA 86:0,11,1,60,69:17626,25661; # DRUID RESTORATION VANILLA 87:0,11,2,60,69:17627,18194; # DRUID FERAL CAT VANILLA 88:0,11,3,60,69:17538,24799 -# # # #################################################################################################### @@ -1853,12 +1794,10 @@ AiPlayerbot.WorldBuffMatrix = # WARRIOR ARMS 1:0,1,0,80,80:53760,57358; # WARRIO #################################################################################################### # # -# # AiPlayerbot.RandomClassSpecProb.. # The probability to choose the spec # AiPlayerbot.RandomClassSpecIndex.. # The spec index in PremadeSpec -# # # #################################################################################################### @@ -1866,7 +1805,6 @@ AiPlayerbot.WorldBuffMatrix = # WARRIOR ARMS 1:0,1,0,80,80:53760,57358; # WARRIO #################################################################################################### # WARRIOR # -# # arms pve AiPlayerbot.RandomClassSpecProb.1.0 = 20 @@ -1887,7 +1825,6 @@ AiPlayerbot.RandomClassSpecIndex.1.4 = 4 AiPlayerbot.RandomClassSpecProb.1.5 = 0 AiPlayerbot.RandomClassSpecIndex.1.5 = 5 -# # # #################################################################################################### @@ -1895,7 +1832,6 @@ AiPlayerbot.RandomClassSpecIndex.1.5 = 5 #################################################################################################### # PALADIN # -# # holy pve AiPlayerbot.RandomClassSpecProb.2.0 = 30 @@ -1916,7 +1852,6 @@ AiPlayerbot.RandomClassSpecIndex.2.4 = 4 AiPlayerbot.RandomClassSpecProb.2.5 = 0 AiPlayerbot.RandomClassSpecIndex.2.5 = 5 -# # # #################################################################################################### @@ -1924,7 +1859,6 @@ AiPlayerbot.RandomClassSpecIndex.2.5 = 5 #################################################################################################### # HUNTER # -# # bm pve AiPlayerbot.RandomClassSpecProb.3.0 = 33 @@ -1945,7 +1879,6 @@ AiPlayerbot.RandomClassSpecIndex.3.4 = 4 AiPlayerbot.RandomClassSpecProb.3.5 = 0 AiPlayerbot.RandomClassSpecIndex.3.5 = 5 -# # # #################################################################################################### @@ -1953,7 +1886,6 @@ AiPlayerbot.RandomClassSpecIndex.3.5 = 5 #################################################################################################### # ROGUE # -# # as pve AiPlayerbot.RandomClassSpecProb.4.0 = 45 @@ -1974,7 +1906,6 @@ AiPlayerbot.RandomClassSpecIndex.4.4 = 4 AiPlayerbot.RandomClassSpecProb.4.5 = 0 AiPlayerbot.RandomClassSpecIndex.4.5 = 5 -# # # #################################################################################################### @@ -1982,7 +1913,6 @@ AiPlayerbot.RandomClassSpecIndex.4.5 = 5 #################################################################################################### # PRIEST # -# # disc pve AiPlayerbot.RandomClassSpecProb.5.0 = 40 @@ -2003,7 +1933,6 @@ AiPlayerbot.RandomClassSpecIndex.5.4 = 4 AiPlayerbot.RandomClassSpecProb.5.5 = 0 AiPlayerbot.RandomClassSpecIndex.5.5 = 5 -# # # #################################################################################################### @@ -2011,7 +1940,6 @@ AiPlayerbot.RandomClassSpecIndex.5.5 = 5 #################################################################################################### # DEATH KNIGHT # -# # blood pve AiPlayerbot.RandomClassSpecProb.6.0 = 30 @@ -2035,7 +1963,6 @@ AiPlayerbot.RandomClassSpecIndex.6.5 = 5 AiPlayerbot.RandomClassSpecProb.6.6 = 0 AiPlayerbot.RandomClassSpecIndex.6.6 = 6 -# # # #################################################################################################### @@ -2043,7 +1970,6 @@ AiPlayerbot.RandomClassSpecIndex.6.6 = 6 #################################################################################################### # SHAMAN # -# # ele pve AiPlayerbot.RandomClassSpecProb.7.0 = 33 @@ -2064,7 +1990,6 @@ AiPlayerbot.RandomClassSpecIndex.7.4 = 4 AiPlayerbot.RandomClassSpecProb.7.5 = 0 AiPlayerbot.RandomClassSpecIndex.7.5 = 5 -# # # #################################################################################################### @@ -2072,7 +1997,6 @@ AiPlayerbot.RandomClassSpecIndex.7.5 = 5 #################################################################################################### # MAGE # -# # arcane pve AiPlayerbot.RandomClassSpecProb.8.0 = 30 @@ -2096,7 +2020,6 @@ AiPlayerbot.RandomClassSpecIndex.8.5 = 5 AiPlayerbot.RandomClassSpecProb.8.6 = 0 AiPlayerbot.RandomClassSpecIndex.8.6 = 6 -# # # #################################################################################################### @@ -2104,7 +2027,6 @@ AiPlayerbot.RandomClassSpecIndex.8.6 = 6 #################################################################################################### # WARLOCK # -# # affli pve AiPlayerbot.RandomClassSpecProb.9.0 = 33 @@ -2125,7 +2047,6 @@ AiPlayerbot.RandomClassSpecIndex.9.4 = 4 AiPlayerbot.RandomClassSpecProb.9.5 = 0 AiPlayerbot.RandomClassSpecIndex.9.5 = 5 -# # # #################################################################################################### @@ -2133,7 +2054,6 @@ AiPlayerbot.RandomClassSpecIndex.9.5 = 5 #################################################################################################### # DRUID # -# # balance pve AiPlayerbot.RandomClassSpecProb.11.0 = 20 @@ -2157,7 +2077,6 @@ AiPlayerbot.RandomClassSpecIndex.11.5 = 5 AiPlayerbot.RandomClassSpecProb.11.6 = 0 AiPlayerbot.RandomClassSpecIndex.11.6 = 6 -# # # #################################################################################################### @@ -2171,15 +2090,14 @@ AiPlayerbot.RandomClassSpecIndex.11.6 = 6 #################################################################################################### # # -# -# Enable buffs in ICC to make Heroic easier and more casual. Default is 1. +# Enable buffs in ICC to make Heroic easier and more casual. # 30% more damage, 40% damage reduction (tank bots), increased all resistances, reduced threat for -# non tank bots, increased threat for tank bots. +# non-tank bots, increased threat for tank bots. # Buffs will be applied on LDW, PP, Sindragosa and Lich King. +# Default: 1 (enabled) AiPlayerbot.EnableICCBuffs = 1 -# # # #################################################################################################### @@ -2193,8 +2111,6 @@ AiPlayerbot.EnableICCBuffs = 1 #################################################################################################### # DATABASE & CONNECTIONS # -# - # PlayerbotsDatabaseInfo # Description: Database connection settings for the playerbots server. # Example: "hostname;port;username;password;database" @@ -2207,7 +2123,6 @@ AiPlayerbot.EnableICCBuffs = 1 PlayerbotsDatabaseInfo = "127.0.0.1;3306;acore;acore;acore_playerbots" -# # PlayerbotsDatabase.WorkerThreads # Description: The amount of worker threads spawned to handle asynchronous (delayed) MySQL # statements. Each worker thread is mirrored with its own connection to the @@ -2216,7 +2131,6 @@ PlayerbotsDatabaseInfo = "127.0.0.1;3306;acore;acore;acore_playerbots" PlayerbotsDatabase.WorkerThreads = 1 -# # PlayerbotsDatabase.SynchThreads # Description: The amount of MySQL connections spawned to handle. # Default: 1 - (PlayerbotDatabase.WorkerThreads) @@ -2234,7 +2148,6 @@ Playerbots.Updates.EnableDatabases = 1 # Command server port, 0 - disabled AiPlayerbot.CommandServerPort = 8888 -# # # #################################################################################################### @@ -2242,7 +2155,6 @@ AiPlayerbot.CommandServerPort = 8888 #################################################################################################### # DEBUG SWITCHES # -# AiPlayerbot.SpellDump = 0 AiPlayerbot.LogInGroupOnly = 1 @@ -2256,7 +2168,6 @@ AiPlayerbot.TellWhenAvoidAoe = 0 # Enable/Disable performance monitor AiPlayerbot.PerfMonEnabled = 0 -# # # #################################################################################################### @@ -2264,7 +2175,6 @@ AiPlayerbot.PerfMonEnabled = 0 #################################################################################################### # CHAT SETTINGS # -# # Prefix for bot chat commands (e.g., follow, stay) AiPlayerbot.CommandPrefix = "" @@ -2299,7 +2209,6 @@ AiPlayerbot.GuildRepliesRate = 100 # Bots without a master will say their lines AiPlayerbot.RandomBotSayWithoutMaster = 0 -# # # #################################################################################################### @@ -2307,17 +2216,15 @@ AiPlayerbot.RandomBotSayWithoutMaster = 0 #################################################################################################### # Broadcast rates # -# # Enable/disable broadcasts globally # Default: 1 (enabled) AiPlayerbot.EnableBroadcasts = 1 -# + # All broadcast chances should be in range 0-30000 # Value of 0 will disable this particular broadcast # Setting value to 30000 does not guarantee the broadcast, as there are some internal randoms as well -# -# Setting channel broadcast chance to 0, will re-route most broadcasts to other available channels +# Setting channel broadcast chance to 0 will re-route most broadcasts to other available channels # Setting all channel broadcasts to 0 will disable most broadcasts AiPlayerbot.BroadcastToGuildGlobalChance = 30000 AiPlayerbot.BroadcastToWorldGlobalChance = 30000 @@ -2327,7 +2234,7 @@ AiPlayerbot.BroadcastToLFGGlobalChance = 30000 AiPlayerbot.BroadcastToLocalDefenseGlobalChance = 30000 AiPlayerbot.BroadcastToWorldDefenseGlobalChance = 30000 AiPlayerbot.BroadcastToGuildRecruitmentGlobalChance = 30000 -# + # Individual settings # Setting one of these to 0 will disable the particular broadcast AiPlayerbot.BroadcastChanceLootingItemPoor = 30 @@ -2337,14 +2244,14 @@ AiPlayerbot.BroadcastChanceLootingItemRare = 20000 AiPlayerbot.BroadcastChanceLootingItemEpic = 30000 AiPlayerbot.BroadcastChanceLootingItemLegendary = 30000 AiPlayerbot.BroadcastChanceLootingItemArtifact = 30000 -# + AiPlayerbot.BroadcastChanceQuestAccepted = 6000 AiPlayerbot.BroadcastChanceQuestUpdateObjectiveCompleted = 300 AiPlayerbot.BroadcastChanceQuestUpdateObjectiveProgress = 300 AiPlayerbot.BroadcastChanceQuestUpdateFailedTimer = 300 AiPlayerbot.BroadcastChanceQuestUpdateComplete = 1000 AiPlayerbot.BroadcastChanceQuestTurnedIn = 10000 -# + AiPlayerbot.BroadcastChanceKillNormal = 30 AiPlayerbot.BroadcastChanceKillElite = 300 AiPlayerbot.BroadcastChanceKillRareelite = 3000 @@ -2353,39 +2260,40 @@ AiPlayerbot.BroadcastChanceKillRare = 10000 AiPlayerbot.BroadcastChanceKillUnknown = 100 AiPlayerbot.BroadcastChanceKillPet = 10 AiPlayerbot.BroadcastChanceKillPlayer = 30 -# + AiPlayerbot.BroadcastChanceLevelupGeneric = 20000 AiPlayerbot.BroadcastChanceLevelupTenX = 30000 AiPlayerbot.BroadcastChanceLevelupMaxLevel = 30000 -# + AiPlayerbot.BroadcastChanceSuggestInstance = 5000 AiPlayerbot.BroadcastChanceSuggestQuest = 10000 AiPlayerbot.BroadcastChanceSuggestGrindMaterials = 5000 AiPlayerbot.BroadcastChanceSuggestGrindReputation = 5000 AiPlayerbot.BroadcastChanceSuggestSell = 300 AiPlayerbot.BroadcastChanceSuggestSomething = 30000 -# + # Bots will say very rude things AiPlayerbot.BroadcastChanceSuggestSomethingToxic = 0 -# + # Specifically for " [item link]" AiPlayerbot.BroadcastChanceSuggestToxicLinks = 0 -# + # Prefix is used as a word in " [item link]" AiPlayerbot.ToxicLinksPrefix = gnomes -# + # Chance to suggest Thunderfury AiPlayerbot.BroadcastChanceSuggestThunderfury = 1 -# + # Does not depend on global chance AiPlayerbot.BroadcastChanceGuildManagement = 30000 + +# # #################################################################################################### #################################################################################################### # LOGS # -# # Custom config to allow logfiles to be created. # Example: AiPlayerbot.AllowedLogFiles = travelNodes.csv,travelPaths.csv,TravelNodeStore.h,bot_movement.csv,bot_location.csv @@ -2393,38 +2301,15 @@ AiPlayerbot.AllowedLogFiles = "" # # -# -#################################################################################################### - -#################################################################################################### -# A list of gameObject GUID's that are not allowed for bots to interact with. -# -AiPlayerbot.DisallowedGameObjects = 176213,17155,2656,74448,19020,3719,3658,3705,3706,105579,75293,2857,179490,141596,160836,160845,179516,176224,181085,176112,128308,128403,165739,165738,175245,175970,176325,176327,123329,2560 -# -# List of GUID's: -# QuestItems: -# 176213 = Blood of Heroes, 17155 = Defias Gunpowder, 2656 = Waterlogged Envelope, 123329 = Baelogs Chest, 2560 = Half-Buried Bottle -# Chests: -# Large Solid Chest = 74448, Box of Assorted Parts = 19020, Food Crate = 3719, Water Barrel = 3658, Barrel of Milk = 3705, Barrel of sweet Nectar = 3706, Tattered Chest = 105579, Large bettered Chest = 75293, Solid Chest = 2857, Battered Foodlocker = 179490, Witch Doctor's Chest = 141596, Relic Coffer = 160836, Dark Coffer = 160845, Fengus's Chest = 179516, Supply Crate = 176224/181085, Malor's Strongbox = 176112 -# Other: -# Shallow Grave (Zul'Farrak) = 128308/128403, Grim Guzzler Boar (Blackrock Depths) = 165739, Dark Iron Ale Mug (Blackrock Depths) = 165738, Father Flame (Blackrock Spire) = 175245, Unforged Runic Breastplate (Blackrock Spire) = 175970, Blacksmithing Plans (Stratholme) = 176325/176327 -# Feel free to edit and help to complete. -# #################################################################################################### ############################################## # Deprecated Settings (yet still in use) # ############################################## -# Log on all randombots on start -AiPlayerbot.RandomBotLoginAtStartup = 1 - # Guild Task system AiPlayerbot.EnableGuildTasks = 0 -# Enable dungeon suggestions in lower case randomly -AiPlayerbot.SuggestDungeonsInLowerCaseRandomly = 0 - # Chance bot chooses RPG (Teleport to random camp for their level) instead of grinding AiPlayerbot.RandomBotRpgChance = 0.20 @@ -2434,10 +2319,6 @@ AiPlayerbot.RandombotsWalkingRPG = 0 # Set randombots movement speed to walking only inside buildings AiPlayerbot.RandombotsWalkingRPG.InDoors = 0 -# Premade spell to avoid (undetected spells) -# spellid-radius, ... -AiPlayerbot.PremadeAvoidAoe = 62234-4 - AiPlayerbot.MinRandomBotsPriceChangeInterval = 7200 AiPlayerbot.MaxRandomBotsPriceChangeInterval = 172800 AiPlayerbot.MinRandomBotChangeStrategyTime = 180 @@ -2465,4 +2346,4 @@ AiPlayerbot.GuildTaskKillTaskDistance = 200 AiPlayerbot.TargetPosRecalcDistance = 0.1 # Allow bots to be summoned near innkeepers -AiPlayerbot.SummonAtInnkeepersEnabled = 1 \ No newline at end of file +AiPlayerbot.SummonAtInnkeepersEnabled = 1 diff --git a/data/sql/playerbots/updates/2026_05_22_00_ai_playerbot_send_mail_disabled_text.sql b/data/sql/playerbots/updates/2026_05_22_00_ai_playerbot_send_mail_disabled_text.sql new file mode 100644 index 000000000..9ed05e8b5 --- /dev/null +++ b/data/sql/playerbots/updates/2026_05_22_00_ai_playerbot_send_mail_disabled_text.sql @@ -0,0 +1,13 @@ +DELETE FROM ai_playerbot_texts WHERE name IN ( + 'send_mail_disabled' +); + +DELETE FROM ai_playerbot_texts_chance WHERE name IN ( + 'send_mail_disabled' +); + +INSERT INTO ai_playerbot_texts (id, name, text, say_type, reply_type, text_loc1, text_loc2, text_loc3, text_loc4, text_loc5, text_loc6, text_loc7, text_loc8) VALUES +(1899, 'send_mail_disabled', 'I cannot send mail', 0, 0, '우편을 보낼 수 없습니다', 'Je ne peux pas envoyer de courrier', 'Ich kann keine Post senden', '我不能寄送邮件', '我不能寄送郵件', 'No puedo enviar correo', 'No puedo enviar correo', 'Я не могу отправить почту'); + +INSERT INTO ai_playerbot_texts_chance (name, probability) VALUES +('send_mail_disabled', 100); diff --git a/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp b/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp index 75152d87b..cfca69cb9 100644 --- a/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp +++ b/src/Ai/Base/Actions/AutoMaintenanceOnLevelupAction.cpp @@ -12,8 +12,8 @@ bool AutoMaintenanceOnLevelupAction::Execute(Event /*event*/) { AutoPickTalents(); AutoLearnSpell(); - AutoUpgradeEquip(); AutoTeleportForLevel(); + AutoUpgradeEquip(); return true; } @@ -21,13 +21,11 @@ bool AutoMaintenanceOnLevelupAction::Execute(Event /*event*/) void AutoMaintenanceOnLevelupAction::AutoTeleportForLevel() { if (!sPlayerbotAIConfig.autoTeleportForLevel || !sRandomPlayerbotMgr.IsRandomBot(bot)) - { return; - } + if (botAI->HasRealPlayerMaster()) - { return; - } + sRandomPlayerbotMgr.RandomTeleportForLevel(bot); return; } @@ -89,21 +87,17 @@ void AutoMaintenanceOnLevelupAction::LearnQuestSpells(std::ostringstream* out) { Quest const* quest = i->second; - // only process class-specific quests to learn class-related spells, cuz - // we don't want all these bunch of entries to be handled! - if (!quest->GetRequiredClasses()) + if (!quest->GetRequiredClasses() || quest->IsRepeatable() || quest->GetMinLevel() < 10 || + quest->GetMinLevel() > bot->GetLevel()) + { continue; + } - // skip quests that are repeatable, too low level, or above bots' level - if (quest->IsRepeatable() || quest->GetMinLevel() < 10 || quest->GetMinLevel() > bot->GetLevel()) - continue; - - // skip if bot doesnt satisfy class, race, or skill requirements if (!bot->SatisfyQuestClass(quest, false) || !bot->SatisfyQuestRace(quest, false) || !bot->SatisfyQuestSkill(quest, false)) + { continue; - - // use the same logic and impl from Player::learnQuestRewardedSpells + } int32 spellId = quest->GetRewSpellCast(); if (!spellId) @@ -113,31 +107,26 @@ void AutoMaintenanceOnLevelupAction::LearnQuestSpells(std::ostringstream* out) if (!spellInfo) continue; - // xinef: find effect with learn spell and check if we have this spell bool found = false; for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) { if (spellInfo->Effects[i].Effect == SPELL_EFFECT_LEARN_SPELL && spellInfo->Effects[i].TriggerSpell && !bot->HasSpell(spellInfo->Effects[i].TriggerSpell)) { - // pusywizard: don't re-add profession specialties! if (SpellInfo const* triggeredInfo = sSpellMgr->GetSpellInfo(spellInfo->Effects[i].TriggerSpell)) if (triggeredInfo->Effects[0].Effect == SPELL_EFFECT_TRADE_SKILL) - break; // pussywizard: break and not cast the spell (found is false) + break; found = true; break; } } - // xinef: we know the spell, continue if (!found) continue; bot->CastSpell(bot, spellId, true); - // Check if RewardDisplaySpell is set to output the proper spell learned - // after processing quests. Output the original RewardSpell otherwise. uint32 rewSpellId = quest->GetRewSpell(); if (rewSpellId) { @@ -167,12 +156,11 @@ std::string const AutoMaintenanceOnLevelupAction::FormatSpell(SpellInfo const* s void AutoMaintenanceOnLevelupAction::AutoUpgradeEquip() { - if (!sPlayerbotAIConfig.autoUpgradeEquip || !sRandomPlayerbotMgr.IsRandomBot(bot)) + if (!sRandomPlayerbotMgr.IsRandomBot(bot)) return; PlayerbotFactory factory(bot, bot->GetLevel()); - // Clean up old consumables before adding new ones factory.CleanupConsumables(); factory.InitAmmo(); @@ -181,9 +169,6 @@ void AutoMaintenanceOnLevelupAction::AutoUpgradeEquip() factory.InitConsumables(); factory.InitPotions(); - if (!sPlayerbotAIConfig.equipmentPersistence || bot->GetLevel() < sPlayerbotAIConfig.equipmentPersistenceLevel) - { - if (sPlayerbotAIConfig.incrementalGearInit) - factory.InitEquipment(true); - } + if (sPlayerbotAIConfig.autoUpgradeEquip) + factory.InitEquipment(true); } diff --git a/src/Ai/Base/Actions/EquipAction.cpp b/src/Ai/Base/Actions/EquipAction.cpp index a4086f371..4cd11de3c 100644 --- a/src/Ai/Base/Actions/EquipAction.cpp +++ b/src/Ai/Base/Actions/EquipAction.cpp @@ -154,9 +154,11 @@ void EquipAction::EquipItem(Item* item) calculator.SetOverflowPenalty(false); // Calculate item scores once and store them - float newItemScore = calculator.CalculateItem(itemId); - float mainHandScore = mainHandItem ? calculator.CalculateItem(mainHandItem->GetTemplate()->ItemId) : 0.0f; - float offHandScore = offHandItem ? calculator.CalculateItem(offHandItem->GetTemplate()->ItemId) : 0.0f; + float newItemScore = calculator.CalculateItem(itemId, item->GetItemRandomPropertyId()); + float mainHandScore = mainHandItem + ? calculator.CalculateItem(mainHandItem->GetTemplate()->ItemId, mainHandItem->GetItemRandomPropertyId()) : 0.0f; + float offHandScore = offHandItem + ? calculator.CalculateItem(offHandItem->GetTemplate()->ItemId, offHandItem->GetItemRandomPropertyId()) : 0.0f; // Determine where this weapon can go bool canGoMain = (invType == INVTYPE_WEAPON || diff --git a/src/Ai/Base/Actions/GenericActions.cpp b/src/Ai/Base/Actions/GenericActions.cpp index 354cb456e..4371cb402 100644 --- a/src/Ai/Base/Actions/GenericActions.cpp +++ b/src/Ai/Base/Actions/GenericActions.cpp @@ -86,7 +86,7 @@ bool TogglePetSpellAutoCastAction::Execute(Event /*event*/) uint32 spellId = itr->first; const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId); - if (!spellInfo->IsAutocastable()) + if (!spellInfo || !spellInfo->IsAutocastable()) continue; bool shouldApply = true; diff --git a/src/Ai/Base/Actions/GenericSpellActions.cpp b/src/Ai/Base/Actions/GenericSpellActions.cpp index 587862a29..657fda7cd 100644 --- a/src/Ai/Base/Actions/GenericSpellActions.cpp +++ b/src/Ai/Base/Actions/GenericSpellActions.cpp @@ -6,6 +6,7 @@ #include "GenericSpellActions.h" #include +#include #include "Event.h" #include "ItemTemplate.h" @@ -23,11 +24,119 @@ using ai::buff::MakeAuraQualifierForBuff; using ai::spell::HasSpellOrCategoryCooldown; -CastSpellAction::CastSpellAction(PlayerbotAI* botAI, std::string const spell) - : Action(botAI, spell), range(botAI->GetRange("spell")), spell(spell) +namespace { + std::unordered_set const& GetMixedTriggerTrinketSpellIds() + { + static std::unordered_set const mixedTriggerSpellIds = []() + { + std::unordered_set onUseSpellIds; + std::unordered_set onEquipSpellIds; + std::unordered_set mixedSpellIds; + + auto const* itemTemplates = sObjectMgr->GetItemTemplateStore(); + if (!itemTemplates) + return mixedSpellIds; + + auto const markSpellId = [&](int32 spellId, uint8 spellTrigger) + { + if (spellId <= 0) + return; + + if (spellTrigger == ITEM_SPELLTRIGGER_ON_USE) + { + if (onEquipSpellIds.find(spellId) != onEquipSpellIds.end()) + mixedSpellIds.insert(spellId); + + onUseSpellIds.insert(spellId); + } + else if (spellTrigger == ITEM_SPELLTRIGGER_ON_EQUIP) + { + if (onUseSpellIds.find(spellId) != onUseSpellIds.end()) + mixedSpellIds.insert(spellId); + + onEquipSpellIds.insert(spellId); + } + }; + + for (auto const& itr : *itemTemplates) + { + ItemTemplate const& proto = itr.second; + if (proto.InventoryType != INVTYPE_TRINKET) + continue; + + for (uint8 spellIndex = 0; spellIndex < MAX_ITEM_PROTO_SPELLS; ++spellIndex) + { + auto const& spellData = proto.Spells[spellIndex]; + markSpellId(spellData.SpellId, spellData.SpellTrigger); + } + } + + return mixedSpellIds; + }(); + + return mixedTriggerSpellIds; + } + + bool IsManaRestoreEffect(SpellEffectInfo const& effectInfo) + { + return (effectInfo.Effect == SPELL_EFFECT_ENERGIZE && + effectInfo.MiscValue == POWER_MANA) || + (effectInfo.Effect == SPELL_EFFECT_APPLY_AURA && + effectInfo.ApplyAuraName == SPELL_AURA_PERIODIC_ENERGIZE && + effectInfo.MiscValue == POWER_MANA); + } + + bool IsManaEfficiencyEffect(SpellEffectInfo const& effectInfo) + { + return effectInfo.Effect == SPELL_EFFECT_APPLY_AURA && + (((effectInfo.ApplyAuraName == SPELL_AURA_MOD_POWER_REGEN || + effectInfo.ApplyAuraName == SPELL_AURA_MOD_POWER_REGEN_PERCENT) && + effectInfo.MiscValue == POWER_MANA) || + effectInfo.ApplyAuraName == SPELL_AURA_MOD_POWER_COST_SCHOOL || + effectInfo.ApplyAuraName == SPELL_AURA_MOD_POWER_COST_SCHOOL_PCT || + effectInfo.ApplyAuraName == SPELL_AURA_MOD_MANA_REGEN_INTERRUPT); + } + + bool IsDefensiveTankEffect(SpellEffectInfo const& effectInfo) + { + if (effectInfo.Effect != SPELL_EFFECT_APPLY_AURA) + return false; + + uint32 const tankRatingsMask = + (1u << CR_DEFENSE_SKILL) | + (1u << CR_DODGE) | + (1u << CR_PARRY) | + (1u << CR_BLOCK) | + (1u << CR_HIT_TAKEN_MELEE) | + (1u << CR_HIT_TAKEN_RANGED) | + (1u << CR_HIT_TAKEN_SPELL) | + (1u << CR_CRIT_TAKEN_MELEE) | + (1u << CR_CRIT_TAKEN_RANGED) | + (1u << CR_CRIT_TAKEN_SPELL); + + switch (effectInfo.ApplyAuraName) + { + case SPELL_AURA_MOD_RESISTANCE: + return (effectInfo.MiscValue & SPELL_SCHOOL_MASK_NORMAL) != 0; + case SPELL_AURA_MOD_RATING: + return (effectInfo.MiscValue & tankRatingsMask) != 0; + case SPELL_AURA_MOD_INCREASE_HEALTH: + case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT: + case SPELL_AURA_MOD_PARRY_PERCENT: + case SPELL_AURA_MOD_DODGE_PERCENT: + case SPELL_AURA_MOD_BLOCK_PERCENT: + case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN: + return true; + default: + return false; + } + } } +CastSpellAction::CastSpellAction(PlayerbotAI* botAI, std::string const spell) + : Action(botAI, spell), range(botAI->GetRange("spell")), spell(spell) {} + bool CastSpellAction::Execute(Event /*event*/) { if (spell == "conjure food" || spell == "conjure water") @@ -53,18 +162,12 @@ bool CastSpellAction::Execute(Event /*event*/) wstrToLower(wnamepart); - if (!Utf8FitTo(spell, wnamepart)) - continue; - - if (spellInfo->Effects[0].Effect != SPELL_EFFECT_CREATE_ITEM) + if (!Utf8FitTo(spell, wnamepart) || spellInfo->Effects[0].Effect != SPELL_EFFECT_CREATE_ITEM) continue; uint32 itemId = spellInfo->Effects[0].ItemType; ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId); - if (!proto) - continue; - - if (bot->CanUseItem(proto) != EQUIP_ERR_OK) + if (!proto || bot->CanUseItem(proto) != EQUIP_ERR_OK) continue; if (spellInfo->Id > castId) @@ -92,10 +195,7 @@ bool CastSpellAction::isUseful() } Unit* spellTarget = GetTarget(); - if (!spellTarget) - return false; - - if (!spellTarget->IsInWorld() || spellTarget->GetMapId() != bot->GetMapId()) + if (!spellTarget || !spellTarget->IsInWorld() || spellTarget->GetMapId() != bot->GetMapId()) return false; // float combatReach = bot->GetCombatReach() + target->GetCombatReach(); @@ -143,10 +243,7 @@ CastMeleeSpellAction::CastMeleeSpellAction( bool CastMeleeSpellAction::isUseful() { Unit* target = GetTarget(); - if (!target) - return false; - - if (!bot->IsWithinMeleeRange(target)) + if (!target || !bot->IsWithinMeleeRange(target)) return false; return CastSpellAction::isUseful(); @@ -162,10 +259,7 @@ CastMeleeDebuffSpellAction::CastMeleeDebuffSpellAction( bool CastMeleeDebuffSpellAction::isUseful() { Unit* target = GetTarget(); - if (!target) - return false; - - if (!bot->IsWithinMeleeRange(target)) + if (!target || !bot->IsWithinMeleeRange(target)) return false; return CastDebuffSpellAction::isUseful(); @@ -175,14 +269,55 @@ bool CastAuraSpellAction::isUseful() { if (!GetTarget() || !CastSpellAction::isUseful()) return false; + Aura* aura = botAI->GetAura(spell, GetTarget(), isOwner, checkDuration); - if (!aura) - return true; - if (beforeDuration && aura->GetDuration() < beforeDuration) + if (!aura || (beforeDuration && aura->GetDuration() < beforeDuration)) return true; + return false; } +bool CastBuffSpellAction::isUseful() +{ + Unit* target = GetTarget(); + if (!target || !CastSpellAction::isUseful()) + return false; + + Aura* aura = botAI->GetAura(spell, target, isOwner, checkDuration); + return !aura || (beforeDuration && aura->GetDuration() < beforeDuration); +} + +bool CastBuffSpellAction::Execute(Event /*event*/) +{ + return botAI->CastSpell(spell, GetTarget()); +} + +bool GroupBuffSpellAction::isUseful() +{ + Unit* target = GetTarget(); + if (!target || !CastSpellAction::isUseful()) + return false; + + if (ai::buff::IsGroupVariantEnabled(bot, spell)) + { + std::string const groupVariant = ai::buff::GroupVariantFor(spell); + if (!groupVariant.empty() && botAI->HasAura(groupVariant, target, false, isOwner, -1, checkDuration)) + return false; + } + + Aura* aura = botAI->GetAura(spell, target, isOwner, checkDuration); + if (!aura || (beforeDuration && aura->GetDuration() < beforeDuration)) + return true; + + return false; +} + +bool GroupBuffSpellAction::Execute(Event /*event*/) +{ + std::string const castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, spell); + return botAI->CastSpell(castName, GetTarget()); +} + CastEnchantItemMainHandAction::CastEnchantItemMainHandAction( PlayerbotAI* botAI, std::string const spell) : CastSpellAction(botAI, spell) {} @@ -248,25 +383,16 @@ Value* CurePartyMemberAction::GetTargetValue() return context->GetValue("party member to dispel", dispelType); } -// Make Bots Paladin, druid, mage use the greater buff rank spell -// TODO Priest doen't verify il he have components Value* BuffOnPartyAction::GetTargetValue() +{ + return context->GetValue("party member without aura", spell); +} + +Value* GroupBuffOnPartyAction::GetTargetValue() { return context->GetValue("party member without aura", MakeAuraQualifierForBuff(spell)); } -bool BuffOnPartyAction::Execute(Event /*event*/) -{ - std::string castName = spell; // default = mono - - auto SendGroupRP = ai::chat::MakeGroupAnnouncer(bot); - castName = ai::buff::UpgradeToGroupIfAppropriate( - bot, botAI, castName, /*announceOnMissing=*/true, SendGroupRP); - - return botAI->CastSpell(castName, GetTarget()); -} -// End greater buff fix - CastShootAction::CastShootAction( PlayerbotAI* botAI) : CastSpellAction(botAI, "shoot"), shootSpellId(0) { @@ -365,50 +491,32 @@ bool CastVehicleSpellAction::Execute(Event /*event*/) bool CastEveryManForHimselfAction::isPossible() { uint32 spellId = AI_VALUE2(uint32, "spell id", spell); - if (!spellId) - return false; - - if (!bot->HasSpell(spellId)) - return false; - - if (HasSpellOrCategoryCooldown(bot, spellId)) - return false; - - return true; + return spellId && bot->HasSpell(spellId) && !HasSpellOrCategoryCooldown(bot, spellId); } bool CastEveryManForHimselfAction::isUseful() { return (bot->HasAuraType(SPELL_AURA_MOD_STUN) || - bot->HasAuraType(SPELL_AURA_MOD_FEAR) || - bot->HasAuraType(SPELL_AURA_MOD_ROOT) || - bot->HasAuraType(SPELL_AURA_MOD_CONFUSE) || - bot->HasAuraType(SPELL_AURA_MOD_CHARM)) - && CastSpellAction::isUseful(); + bot->HasAuraType(SPELL_AURA_MOD_FEAR) || + bot->HasAuraType(SPELL_AURA_MOD_ROOT) || + bot->HasAuraType(SPELL_AURA_MOD_CONFUSE) || + bot->HasAuraType(SPELL_AURA_MOD_CHARM)) + && CastSpellAction::isUseful(); } bool CastWillOfTheForsakenAction::isPossible() { uint32 spellId = AI_VALUE2(uint32, "spell id", spell); - if (!spellId) - return false; - - if (!bot->HasSpell(spellId)) - return false; - - if (HasSpellOrCategoryCooldown(bot, spellId)) - return false; - - return true; + return spellId && bot->HasSpell(spellId) && !HasSpellOrCategoryCooldown(bot, spellId); } bool CastWillOfTheForsakenAction::isUseful() { return (bot->HasAuraType(SPELL_AURA_MOD_FEAR) || - bot->HasAuraType(SPELL_AURA_MOD_CHARM) || - bot->HasAuraType(SPELL_AURA_AOE_CHARM) || - bot->HasAuraWithMechanic(1 << MECHANIC_SLEEP)) - && CastSpellAction::isUseful(); + bot->HasAuraType(SPELL_AURA_MOD_CHARM) || + bot->HasAuraType(SPELL_AURA_AOE_CHARM) || + bot->HasAuraWithMechanic(1 << MECHANIC_SLEEP)) + && CastSpellAction::isUseful(); } bool UseTrinketAction::Execute(Event /*event*/) @@ -427,70 +535,141 @@ bool UseTrinketAction::Execute(Event /*event*/) bool UseTrinketAction::UseTrinket(Item* item) { - if (bot->CanUseItem(item) != EQUIP_ERR_OK) - return false; - - if (bot->IsNonMeleeSpellCast(true)) + if (bot->CanUseItem(item) != EQUIP_ERR_OK || bot->IsNonMeleeSpellCast(true)) return false; uint8 bagIndex = item->GetBagSlot(); uint8 slot = item->GetSlot(); - // uint8 spell_index = 0; //not used, line marked for removal. uint8 cast_count = 1; ObjectGuid item_guid = item->GetGUID(); uint32 glyphIndex = 0; uint8 castFlags = 0; uint32 targetFlag = TARGET_FLAG_NONE; uint32 spellId = 0; + int32 itemSpellCooldown = 0; + uint32 itemSpellCategory = 0; + int32 itemSpellCategoryCooldown = 0; + for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i) { if (item->GetTemplate()->Spells[i].SpellId > 0 && item->GetTemplate()->Spells[i].SpellTrigger == ITEM_SPELLTRIGGER_ON_USE) { spellId = item->GetTemplate()->Spells[i].SpellId; - const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId); + itemSpellCooldown = item->GetTemplate()->Spells[i].SpellCooldown; + itemSpellCategory = item->GetTemplate()->Spells[i].SpellCategory; + itemSpellCategoryCooldown = item->GetTemplate()->Spells[i].SpellCategoryCooldown; + uint64 const itemCooldownKey = (static_cast(item->GetEntry()) << 32) | spellId; + uint32 const now = getMSTime(); + if (itemSpellCooldown > 0) + { + auto const itemCooldownItr = trinketItemCooldownExpiries.find(itemCooldownKey); + if (itemCooldownItr != trinketItemCooldownExpiries.end()) + { + if (itemCooldownItr->second > now) + return false; + + trinketItemCooldownExpiries.erase(itemCooldownItr); + } + } + + if (itemSpellCategory && itemSpellCategoryCooldown > 0) + { + auto const categoryCooldownItr = trinketCategoryCooldownExpiries.find(itemSpellCategory); + if (categoryCooldownItr != trinketCategoryCooldownExpiries.end()) + { + if (categoryCooldownItr->second > now) + return false; + + trinketCategoryCooldownExpiries.erase(categoryCooldownItr); + } + } + + const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId); if (!spellInfo || !spellInfo->IsPositive()) return false; bool applyAura = false; + bool restoresMana = false; + bool improvesManaEfficiency = false; + bool defensiveTankEffect = false; for (int i = 0; i < MAX_SPELL_EFFECTS; i++) { const SpellEffectInfo& effectInfo = spellInfo->Effects[i]; if (effectInfo.Effect == SPELL_EFFECT_APPLY_AURA) - { applyAura = true; - break; + + restoresMana = restoresMana || IsManaRestoreEffect(effectInfo); + improvesManaEfficiency = improvesManaEfficiency || IsManaEfficiencyEffect(effectInfo); + defensiveTankEffect = defensiveTankEffect || IsDefensiveTankEffect(effectInfo); + } + + if (!applyAura && !restoresMana) + return false; + + if (restoresMana || improvesManaEfficiency) + { + if (!AI_VALUE2(bool, "has mana", "self target")) + return false; + + uint8 const manaPct = AI_VALUE2(uint8, "mana", "self target"); + if ((restoresMana && manaPct >= sPlayerbotAIConfig.mediumMana) || + manaPct >= sPlayerbotAIConfig.highMana) + { + return false; } } - if (!applyAura) - return false; - - uint32 spellProcFlag = spellInfo->ProcFlags; - - // Handle items with procflag "if you kill a target that grants honor or experience" - // Bots will "learn" the trinket proc, so CanCastSpell() will be true - // e.g. on Item https://www.wowhead.com/wotlk/item=44074/oracle-talisman-of-ablution leading to - // constant casting of the proc spell onto themselfes https://www.wowhead.com/wotlk/spell=59787/oracle-ablutions - // This will lead to multiple hundreds of entries in m_appliedAuras -> Once killing an enemy -> Big diff time spikes - if (spellProcFlag != 0) return false; - - if (!botAI->CanCastSpell(spellId, bot, false)) + if (defensiveTankEffect) { - return false; + uint8 const healthPct = AI_VALUE2(uint8, "health", "self target"); + if (healthPct > sPlayerbotAIConfig.lowHealth) + return false; } + + auto const& mixedTriggerTrinketSpellIds = GetMixedTriggerTrinketSpellIds(); + // Exclude trinkets that expose the same spell as both ON_EQUIP and ON_USE across + // item templates. Those are equip/proc effects leaking into the active-use path, + // as seen with the error versions of Oracle Talisman of Ablution (44870) and + // Frenzyheart Insignia of Fury (44869). + if (mixedTriggerTrinketSpellIds.find(spellId) != mixedTriggerTrinketSpellIds.end()) + return false; + + if (!botAI->CanCastSpell(spellId, bot, false, nullptr, item)) + return false; + break; } } + if (!spellId) return false; + WorldPacket packet(CMSG_USE_ITEM); packet << bagIndex << slot << cast_count << spellId << item_guid << glyphIndex << castFlags; targetFlag = TARGET_FLAG_NONE; packet << targetFlag << bot->GetPackGUID(); + bot->GetSession()->HandleUseItemOpcode(packet); + + uint32 const now = getMSTime(); + uint32 const cooldownDelay = bot->GetSpellCooldownDelay(spellId); + if (cooldownDelay > 0) + { + if (itemSpellCooldown > 0) + { + uint64 const itemCooldownKey = (static_cast(item->GetEntry()) << 32) | spellId; + trinketItemCooldownExpiries[itemCooldownKey] = now + static_cast(itemSpellCooldown); + } + + if (itemSpellCategory && itemSpellCategoryCooldown > 0) + { + trinketCategoryCooldownExpiries[itemSpellCategory] = now + static_cast(itemSpellCategoryCooldown); + } + } + return true; } @@ -500,9 +679,8 @@ bool CastDebuffSpellAction::isUseful() { Unit* target = GetTarget(); if (!target || !target->IsAlive() || !target->IsInWorld()) - { return false; - } + return CastAuraSpellAction::isUseful() && (target->GetHealth() / AI_VALUE(float, "estimated group dps")) >= needLifeTime; } diff --git a/src/Ai/Base/Actions/GenericSpellActions.h b/src/Ai/Base/Actions/GenericSpellActions.h index b87bd0a1f..c17d96907 100644 --- a/src/Ai/Base/Actions/GenericSpellActions.h +++ b/src/Ai/Base/Actions/GenericSpellActions.h @@ -69,9 +69,7 @@ class CastDebuffSpellAction : public CastAuraSpellAction { public: CastDebuffSpellAction(PlayerbotAI* botAI, std::string const spell, bool isOwner = false, float needLifeTime = 8.0f) - : CastAuraSpellAction(botAI, spell, isOwner), needLifeTime(needLifeTime) - { - } + : CastAuraSpellAction(botAI, spell, isOwner), needLifeTime(needLifeTime) {} bool isUseful() override; private: @@ -90,9 +88,7 @@ class CastDebuffSpellOnAttackerAction : public CastDebuffSpellAction public: CastDebuffSpellOnAttackerAction(PlayerbotAI* botAI, std::string const spell, bool isOwner = true, float needLifeTime = 8.0f) - : CastDebuffSpellAction(botAI, spell, isOwner, needLifeTime) - { - } + : CastDebuffSpellAction(botAI, spell, isOwner, needLifeTime) {} Value* GetTargetValue() override; std::string const getName() override { return spell + " on attacker"; } @@ -104,9 +100,7 @@ class CastDebuffSpellOnMeleeAttackerAction : public CastDebuffSpellAction public: CastDebuffSpellOnMeleeAttackerAction(PlayerbotAI* botAI, std::string const spell, bool isOwner = true, float needLifeTime = 8.0f) - : CastDebuffSpellAction(botAI, spell, isOwner, needLifeTime) - { - } + : CastDebuffSpellAction(botAI, spell, isOwner, needLifeTime) {} Value* GetTargetValue() override; std::string const getName() override { return spell + " on attacker"; } @@ -119,6 +113,19 @@ public: CastBuffSpellAction(PlayerbotAI* botAI, std::string const spell, bool checkIsOwner = false, uint32 beforeDuration = 0); std::string const GetTargetName() override { return "self target"; } + bool isUseful() override; + bool Execute(Event event) override; +}; + +class GroupBuffSpellAction : public CastBuffSpellAction +{ +public: + GroupBuffSpellAction(PlayerbotAI* botAI, std::string const spell, bool checkIsOwner = false, + uint32 beforeDuration = 0) + : CastBuffSpellAction(botAI, spell, checkIsOwner, beforeDuration) {} + + bool isUseful() override; + bool Execute(Event event) override; }; class CastEnchantItemMainHandAction : public CastSpellAction @@ -151,8 +158,6 @@ public: // Yunfan: Mana efficiency tell the bot how to save mana. The higher the better. HealingManaEfficiency manaEfficiency; uint8 estAmount; - - // protected: }; class CastAoeHealSpellAction : public CastHealingSpellAction @@ -192,9 +197,7 @@ class HealPartyMemberAction : public CastHealingSpellAction, public PartyMemberA public: HealPartyMemberAction(PlayerbotAI* botAI, std::string const spell, uint8 estAmount = 15.0f, HealingManaEfficiency manaEfficiency = HealingManaEfficiency::MEDIUM, bool isOwner = true) - : CastHealingSpellAction(botAI, spell, estAmount, manaEfficiency, isOwner), PartyMemberActionNameSupport(spell) - { - } + : CastHealingSpellAction(botAI, spell, estAmount, manaEfficiency, isOwner), PartyMemberActionNameSupport(spell) {} std::string const GetTargetName() override { return "party member to heal"; } std::string const getName() override { return PartyMemberActionNameSupport::getName(); } @@ -219,9 +222,7 @@ class CurePartyMemberAction : public CastSpellAction, public PartyMemberActionNa { public: CurePartyMemberAction(PlayerbotAI* botAI, std::string const spell, uint32 dispelType) - : CastSpellAction(botAI, spell), PartyMemberActionNameSupport(spell), dispelType(dispelType) - { - } + : CastSpellAction(botAI, spell), PartyMemberActionNameSupport(spell), dispelType(dispelType) {} Value* GetTargetValue() override; std::string const getName() override { return PartyMemberActionNameSupport::getName(); } @@ -230,18 +231,25 @@ protected: uint32 dispelType; }; -// Make Bots Paladin, druid, mage use the greater buff rank spell class BuffOnPartyAction : public CastBuffSpellAction, public PartyMemberActionNameSupport { public: BuffOnPartyAction(PlayerbotAI* botAI, std::string const spell) - : CastBuffSpellAction(botAI, spell), PartyMemberActionNameSupport(spell) { } + : CastBuffSpellAction(botAI, spell), PartyMemberActionNameSupport(spell) {} + + Value* GetTargetValue() override; + std::string const getName() override { return PartyMemberActionNameSupport::getName(); } +}; + +class GroupBuffOnPartyAction : public GroupBuffSpellAction, public PartyMemberActionNameSupport +{ +public: + GroupBuffOnPartyAction(PlayerbotAI* botAI, std::string const spell) + : GroupBuffSpellAction(botAI, spell), PartyMemberActionNameSupport(spell) {} Value* GetTargetValue() override; - bool Execute(Event event) override; std::string const getName() override { return PartyMemberActionNameSupport::getName(); } }; -// End Fix class CastShootAction : public CastSpellAction { @@ -323,8 +331,13 @@ class UseTrinketAction : public Action public: UseTrinketAction(PlayerbotAI* botAI) : Action(botAI, "use trinket") {} bool Execute(Event event) override; + protected: bool UseTrinket(Item* trinket); + +private: + std::unordered_map trinketItemCooldownExpiries; + std::unordered_map trinketCategoryCooldownExpiries; }; class CastSpellOnEnemyHealerAction : public CastSpellAction @@ -461,12 +474,11 @@ class BuffOnMainTankAction : public CastBuffSpellAction, public MainTankActionNa { public: BuffOnMainTankAction(PlayerbotAI* ai, std::string spell, bool checkIsOwner = false) - : CastBuffSpellAction(ai, spell, checkIsOwner), MainTankActionNameSupport(spell) - { - } + : CastBuffSpellAction(ai, spell, checkIsOwner), MainTankActionNameSupport(spell) {} public: virtual Value* GetTargetValue(); virtual std::string const getName() { return MainTankActionNameSupport::getName(); } }; + #endif diff --git a/src/Ai/Base/Actions/ResetAiAction.cpp b/src/Ai/Base/Actions/ResetAiAction.cpp index 19017c916..290d0ae11 100644 --- a/src/Ai/Base/Actions/ResetAiAction.cpp +++ b/src/Ai/Base/Actions/ResetAiAction.cpp @@ -44,6 +44,21 @@ bool ResetAiAction::Execute(Event event) } } } + if (Player* master = botAI->GetMaster()) + { + Group* botGroup = bot->GetGroup(); + Group* masterGroup = master->GetGroup(); + if (botGroup && (!masterGroup || masterGroup != botGroup)) + botAI->SetMaster(nullptr); + } + if (sRandomPlayerbotMgr.IsRandomBot(bot) && !bot->InBattleground()) + { + if (bot->GetGroup() && (!botAI->GetMaster() || GET_PLAYERBOT_AI(botAI->GetMaster()))) + { + if (Player* newMaster = botAI->FindNewMaster()) + botAI->SetMaster(newMaster); + } + } PlayerbotRepository::instance().Reset(botAI); botAI->ResetStrategies(false); botAI->TellMaster("AI was reset to defaults"); diff --git a/src/Ai/Base/Actions/SendMailAction.cpp b/src/Ai/Base/Actions/SendMailAction.cpp index 549e6b716..b0966856b 100644 --- a/src/Ai/Base/Actions/SendMailAction.cpp +++ b/src/Ai/Base/Actions/SendMailAction.cpp @@ -34,24 +34,23 @@ bool SendMailAction::Execute(Event event) Player* receiver = GetMaster(); Player* tellTo = receiver; - std::vector ss = split(text, ' '); - if (ss.size() > 1) - { - if (Player* p = ObjectAccessor::FindPlayer(ObjectGuid(uint64(ss[ss.size() - 1].c_str())))) - receiver = p; - } - if (!receiver) receiver = event.getOwner(); if (!receiver || receiver == bot) - { return false; - } if (!tellTo) tellTo = receiver; + if (!sPlayerbotAIConfig.botSendMailEnabled) + { + bot->Whisper(PlayerbotTextMgr::instance().GetBotTextOrDefault( + "send_mail_disabled", "I cannot send mail", {}), + LANG_UNIVERSAL, tellTo); + return false; + } + if (!mailboxFound && !randomBot) { bot->Whisper(PlayerbotTextMgr::instance().GetBotTextOrDefault( diff --git a/src/Ai/Base/Strategy/WorldPacketHandlerStrategy.cpp b/src/Ai/Base/Strategy/WorldPacketHandlerStrategy.cpp index ad31c2c39..5f2d2532d 100644 --- a/src/Ai/Base/Strategy/WorldPacketHandlerStrategy.cpp +++ b/src/Ai/Base/Strategy/WorldPacketHandlerStrategy.cpp @@ -16,7 +16,7 @@ void WorldPacketHandlerStrategy::InitTriggers(std::vector& trigger triggers.push_back( new TriggerNode("uninvite guid", { NextAction("uninvite", relevance) })); triggers.push_back( - new TriggerNode("group set leader", { /*NextAction("leader", relevance),*/ })); + new TriggerNode("group set leader", { NextAction("reset botAI", relevance) })); triggers.push_back(new TriggerNode( "not enough money", { NextAction("tell not enough money", relevance) })); triggers.push_back( diff --git a/src/Ai/Base/Trigger/GenericTriggers.cpp b/src/Ai/Base/Trigger/GenericTriggers.cpp index 2035e1c29..aac920b5b 100644 --- a/src/Ai/Base/Trigger/GenericTriggers.cpp +++ b/src/Ai/Base/Trigger/GenericTriggers.cpp @@ -7,6 +7,7 @@ #include +#include "GenericBuffUtils.h" #include "CreatureAI.h" #include "ItemVisitors.h" #include "LastSpellCastValue.h" @@ -41,52 +42,50 @@ bool LowEnergyTrigger::IsActive() bool NoPetTrigger::IsActive() { - return (bot->GetMinionGUID().IsEmpty()) && (!AI_VALUE(Unit*, "pet target")) && (!bot->GetGuardianPet()) && - (!bot->GetFirstControlled()) && (!AI_VALUE2(bool, "mounted", "self target")); + return bot->GetMinionGUID().IsEmpty() && !AI_VALUE(Unit*, "pet target") && !bot->GetGuardianPet() && + !bot->GetFirstControlled() && !AI_VALUE2(bool, "mounted", "self target"); } bool HasPetTrigger::IsActive() { - return (AI_VALUE(Unit*, "pet target")) && !AI_VALUE2(bool, "mounted", "self target"); - ; + return AI_VALUE(Unit*, "pet target") && !AI_VALUE2(bool, "mounted", "self target"); } bool PetAttackTrigger::IsActive() { Guardian* pet = bot->GetGuardianPet(); if (!pet) - { return false; - } + Unit* target = AI_VALUE(Unit*, "current target"); if (!target) - { return false; - } + if (pet->GetVictim() == target && pet->GetCharmInfo()->IsCommandAttack()) - { return false; - } + if (bot->GetMap()->IsDungeon() && bot->GetGroup() && !target->IsInCombat()) - { return false; - } + return true; } bool HighManaTrigger::IsActive() { - return AI_VALUE2(bool, "has mana", "self target") && AI_VALUE2(uint8, "mana", "self target") < sPlayerbotAIConfig.highMana; + return AI_VALUE2(bool, "has mana", "self target") && + AI_VALUE2(uint8, "mana", "self target") < sPlayerbotAIConfig.highMana; } bool AlmostFullManaTrigger::IsActive() { - return AI_VALUE2(bool, "has mana", "self target") && AI_VALUE2(uint8, "mana", "self target") > 85; + return AI_VALUE2(bool, "has mana", "self target") && + AI_VALUE2(uint8, "mana", "self target") > 85; } bool EnoughManaTrigger::IsActive() { - return AI_VALUE2(bool, "has mana", "self target") && AI_VALUE2(uint8, "mana", "self target") > sPlayerbotAIConfig.highMana; + return AI_VALUE2(bool, "has mana", "self target") && + AI_VALUE2(uint8, "mana", "self target") > sPlayerbotAIConfig.highMana; } bool RageAvailable::IsActive() { return AI_VALUE2(uint8, "rage", "self target") >= amount; } @@ -101,9 +100,8 @@ bool TargetWithComboPointsLowerHealTrigger::IsActive() { Unit* target = AI_VALUE(Unit*, "current target"); if (!target || !target->IsAlive() || !target->IsInWorld()) - { return false; - } + return ComboPointsAvailableTrigger::IsActive() && (target->GetHealth() / AI_VALUE(float, "estimated group dps")) <= lifeTime; } @@ -164,19 +162,27 @@ bool BuffTrigger::IsActive() Unit* target = GetTarget(); if (!target) return false; - if (!SpellTrigger::IsActive()) - return false; + Aura* aura = botAI->GetAura(spell, target, checkIsOwner, checkDuration); - if (!aura) - return true; - if (beforeDuration && aura->GetDuration() < beforeDuration) + if (!aura || (beforeDuration && aura->GetDuration() < beforeDuration)) return true; + return false; } Value* BuffOnPartyTrigger::GetTargetValue() { - return context->GetValue("party member without aura", spell); + return context->GetValue( + "party member without aura", ai::buff::MakeAuraQualifierForBuff(spell)); +} + +bool BuffOnPartyTrigger::IsActive() +{ + Unit* target = GetTarget(); + if (ai::buff::ShouldDeferPartyBuffEvaluationForRecentLogin(bot, target, spell)) + return false; + + return BuffTrigger::IsActive(); } bool ProtectPartyMemberTrigger::IsActive() { return AI_VALUE(Unit*, "party member to protect"); } @@ -209,13 +215,14 @@ bool MediumThreatTrigger::IsActive() { if (!AI_VALUE(Unit*, "main tank")) return false; + return MyAttackerCountTrigger::IsActive(); } bool LowTankThreatTrigger::IsActive() { - Unit* mt = AI_VALUE(Unit*, "main tank"); - if (!mt) + Unit* mainTank = AI_VALUE(Unit*, "main tank"); + if (!mainTank) return false; Unit* current_target = AI_VALUE(Unit*, "current target"); @@ -224,7 +231,7 @@ bool LowTankThreatTrigger::IsActive() ThreatManager& mgr = current_target->GetThreatMgr(); float threat = mgr.GetThreat(bot); - float tankThreat = mgr.GetThreat(mt); + float tankThreat = mgr.GetThreat(mainTank); return tankThreat == 0.0f || threat > tankThreat * 0.5f; } @@ -232,9 +239,8 @@ bool AoeTrigger::IsActive() { Unit* current_target = AI_VALUE(Unit*, "current target"); if (!current_target) - { return false; - } + GuidVector attackers = context->GetValue("attackers")->Get(); int attackers_count = 0; for (ObjectGuid const guid : attackers) @@ -242,10 +248,9 @@ bool AoeTrigger::IsActive() Unit* unit = botAI->GetUnit(guid); if (!unit || !unit->IsAlive()) continue; + if (unit->GetDistance(current_target->GetPosition()) <= range) - { attackers_count++; - } } return attackers_count >= amount; } @@ -274,20 +279,19 @@ bool DebuffTrigger::IsActive() { Unit* target = GetTarget(); if (!target || !target->IsAlive() || !target->IsInWorld()) - { return false; - } - return BuffTrigger::IsActive() && (target->GetHealth() / AI_VALUE(float, "estimated group dps")) >= needLifeTime; + + return BuffTrigger::IsActive() && + (target->GetHealth() / AI_VALUE(float, "estimated group dps")) >= needLifeTime; } bool DebuffOnBossTrigger::IsActive() { if (!DebuffTrigger::IsActive()) - { return false; - } - Creature* c = GetTarget()->ToCreature(); - return c && ((c->IsDungeonBoss()) || (c->isWorldBoss())); + + Creature* creature = GetTarget()->ToCreature(); + return creature && (creature->IsDungeonBoss() || creature->isWorldBoss()); } bool SpellTrigger::IsActive() { return GetTarget(); } @@ -317,9 +321,7 @@ bool SpellCooldownTrigger::IsActive() } RandomTrigger::RandomTrigger(PlayerbotAI* botAI, std::string const name, int32 probability) - : Trigger(botAI, name), probability(probability), lastCheck(getMSTime()) -{ -} + : Trigger(botAI, name), probability(probability), lastCheck(getMSTime()) {} bool RandomTrigger::IsActive() { @@ -330,6 +332,7 @@ bool RandomTrigger::IsActive() int32 k = (int32)(probability / sPlayerbotAIConfig.randomChangeMultiplier); if (k < 1) k = 1; + return (rand() % k) == 0; } @@ -368,9 +371,11 @@ bool BoostTrigger::IsActive() { if (!BuffTrigger::IsActive()) return false; + Unit* target = AI_VALUE(Unit*, "current target"); if (target && target->ToPlayer()) return true; + return AI_VALUE(uint8, "balance") <= balance; } @@ -379,20 +384,19 @@ bool GenericBoostTrigger::IsActive() Unit* target = AI_VALUE(Unit*, "current target"); if (target && target->ToPlayer()) return true; + return AI_VALUE(uint8, "balance") <= balance; } bool HealerShouldAttackTrigger::IsActive() { - // nobody can help me if (botAI->GetNearGroupMemberCount(sPlayerbotAIConfig.sightDistance) <= 1) return true; if (AI_VALUE2(uint8, "health", "party member to heal") < sPlayerbotAIConfig.almostFullHealth) return false; - // special check for resto druid (dont remove tree of life frequently) - if (bot->GetAura(33891)) + if (bot->GetAura(33891)) // Tree of Life { LastSpellCast& lastSpell = botAI->GetAiObjectContext()->GetValue("last spell cast")->Get(); if (lastSpell.timer + 5 > time(nullptr)) @@ -401,7 +405,6 @@ bool HealerShouldAttackTrigger::IsActive() int manaThreshold; int balance = AI_VALUE(uint8, "balance"); - // higher threshold in higher pressure if (balance <= 50) manaThreshold = 85; else if (balance <= 100) @@ -425,13 +428,7 @@ bool InterruptSpellTrigger::IsActive() bool DeflectSpellTrigger::IsActive() { Unit* target = GetTarget(); - if (!target) - return false; - - if (!target->IsNonMeleeSpellCast(true)) - return false; - - if (target->GetTarget() != bot->GetGUID()) + if (!target || !target->IsNonMeleeSpellCast(true) || target->GetTarget() != bot->GetGUID()) return false; uint32 spellid = context->GetValue("spell id", spell)->Get(); @@ -462,6 +459,7 @@ bool DeflectSpellTrigger::IsActive() return true; } } + return false; } @@ -495,17 +493,16 @@ bool FearSleepSapTrigger::IsActive() bool HasAuraStackTrigger::IsActive() { - Aura* aura = botAI->GetAura(getName(), GetTarget(), false, true, stack); - // sLog->outMessage("playerbot", LOG_LEVEL_DEBUG, "HasAuraStackTrigger::IsActive %s %d", getName(), aura ? - // aura->GetStackAmount() : -1); - return aura; + return botAI->GetAura(getName(), GetTarget(), false, true, stack); } bool TimerTrigger::IsActive() { - if (time(nullptr) != lastCheck) + time_t now = time(nullptr); + + if (now != lastCheck) { - lastCheck = time(nullptr); + lastCheck = now; return true; } @@ -552,9 +549,8 @@ bool IsBehindTargetTrigger::IsActive() bool IsNotBehindTargetTrigger::IsActive() { if (botAI->HasStrategy("stay", botAI->GetState())) - { return false; - } + Unit* target = AI_VALUE(Unit*, "current target"); return target && !AI_VALUE2(bool, "behind", "current target"); } @@ -562,9 +558,8 @@ bool IsNotBehindTargetTrigger::IsActive() bool IsNotFacingTargetTrigger::IsActive() { if (botAI->HasStrategy("stay", botAI->GetState())) - { return false; - } + return !AI_VALUE2(bool, "facing", "current target"); } @@ -581,12 +576,14 @@ bool NoPossibleTargetsTrigger::IsActive() return !targets.size(); } -bool PossibleAddsTrigger::IsActive() { return AI_VALUE(bool, "possible adds") && !AI_VALUE(ObjectGuid, "pull target"); } +bool PossibleAddsTrigger::IsActive() +{ + return AI_VALUE(bool, "possible adds") && !AI_VALUE(ObjectGuid, "pull target"); +} bool NotDpsTargetActiveTrigger::IsActive() { Unit* target = AI_VALUE(Unit*, "current target"); - // do not switch if enemy target if (target && target->IsAlive()) { Unit* enemy = AI_VALUE(Unit*, "enemy player target"); @@ -604,7 +601,6 @@ bool NotDpsAoeTargetActiveTrigger::IsActive() Unit* target = AI_VALUE(Unit*, "current target"); Unit* enemy = AI_VALUE(Unit*, "enemy player target"); - // do not switch if enemy target if (target && target == enemy && target->IsAlive()) return false; @@ -638,7 +634,10 @@ Value* InterruptEnemyHealerTrigger::GetTargetValue() return context->GetValue("enemy healer target", spell); } -bool RandomBotUpdateTrigger::IsActive() { return RandomTrigger::IsActive() && AI_VALUE(bool, "random bot update"); } +bool RandomBotUpdateTrigger::IsActive() +{ + return RandomTrigger::IsActive() && AI_VALUE(bool, "random bot update"); +} bool NoNonBotPlayersAroundTrigger::IsActive() { @@ -718,43 +717,24 @@ bool AmmoCountTrigger::IsActive() bool NewPetTrigger::IsActive() { - // Get the bot player object from the AI - Player* bot = botAI->GetBot(); - if (!bot) - return false; - - // Try to get the current pet; initialize guardian and GUID to null/empty - Pet* pet = bot->GetPet(); - Guardian* guardian = nullptr; ObjectGuid currentPetGuid = ObjectGuid::Empty; - // If bot has a pet, get its GUID - if (pet) - { + if (Pet* pet = bot->GetPet()) currentPetGuid = pet->GetGUID(); - } - else - { - // If no pet, try to get a guardian pet and its GUID - guardian = bot->GetGuardianPet(); - if (guardian) - currentPetGuid = guardian->GetGUID(); - } + else if (Guardian* guardian = bot->GetGuardianPet()) + currentPetGuid = guardian->GetGUID(); - // If the current pet or guardian GUID has changed (including becoming empty), reset the trigger state if (currentPetGuid != lastPetGuid) { triggered = false; lastPetGuid = currentPetGuid; } - // If there's a valid current pet/guardian (non-empty GUID) and we haven't triggered yet, activate trigger if (currentPetGuid != ObjectGuid::Empty && !triggered) { triggered = true; return true; } - // Otherwise, do not activate return false; } diff --git a/src/Ai/Base/Trigger/GenericTriggers.h b/src/Ai/Base/Trigger/GenericTriggers.h index a3931c246..3e662eb3b 100644 --- a/src/Ai/Base/Trigger/GenericTriggers.h +++ b/src/Ai/Base/Trigger/GenericTriggers.h @@ -20,9 +20,7 @@ class StatAvailable : public Trigger { public: StatAvailable(PlayerbotAI* botAI, int32 amount, std::string const name = "stat available") - : Trigger(botAI, name), amount(amount) - { - } + : Trigger(botAI, name), amount(amount) {} protected: int32 amount; @@ -118,8 +116,8 @@ public: class TargetWithComboPointsLowerHealTrigger : public ComboPointsAvailableTrigger { public: - TargetWithComboPointsLowerHealTrigger(PlayerbotAI* ai, int32 combo_point = 5, float lifeTime = 8.0f) - : ComboPointsAvailableTrigger(ai, combo_point), lifeTime(lifeTime) + TargetWithComboPointsLowerHealTrigger(PlayerbotAI* botAI, int32 combo_point = 5, float lifeTime = 8.0f) + : ComboPointsAvailableTrigger(botAI, combo_point), lifeTime(lifeTime) { } bool IsActive() override; @@ -196,7 +194,6 @@ public: bool IsActive() override; }; -// TODO: check other targets class InterruptSpellTrigger : public SpellTrigger { public: @@ -217,9 +214,7 @@ class AttackerCountTrigger : public Trigger { public: AttackerCountTrigger(PlayerbotAI* botAI, int32 amount, float distance = sPlayerbotAIConfig.sightDistance) - : Trigger(botAI), amount(amount), distance(distance) - { - } + : Trigger(botAI), amount(amount), distance(distance) {} bool IsActive() override; std::string const getName() override { return "attacker count"; } @@ -269,9 +264,7 @@ class AoeTrigger : public AttackerCountTrigger { public: AoeTrigger(PlayerbotAI* botAI, int32 amount = 3, float range = 15.0f) - : AttackerCountTrigger(botAI, amount), range(range) - { - } + : AttackerCountTrigger(botAI, amount), range(range) {} bool IsActive() override; std::string const getName() override { return "aoe"; } @@ -317,7 +310,8 @@ public: class BuffTrigger : public SpellTrigger { public: - BuffTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1, bool checkIsOwner = false, bool checkDuration = false, uint32 beforeDuration = 0) + BuffTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1, + bool checkIsOwner = false, bool checkDuration = false, uint32 beforeDuration = 0) : SpellTrigger(botAI, spell, checkInterval) { this->checkIsOwner = checkIsOwner; @@ -339,11 +333,10 @@ class BuffOnPartyTrigger : public BuffTrigger { public: BuffOnPartyTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1) - : BuffTrigger(botAI, spell, checkInterval) - { - } + : BuffTrigger(botAI, spell, checkInterval) {} Value* GetTargetValue() override; + bool IsActive() override; std::string const getName() override { return spell + " on party"; } }; @@ -393,9 +386,7 @@ class DebuffTrigger : public BuffTrigger public: DebuffTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1, bool checkIsOwner = false, float needLifeTime = 8.0f, uint32 beforeDuration = 0) - : BuffTrigger(botAI, spell, checkInterval, checkIsOwner, false, beforeDuration), needLifeTime(needLifeTime) - { - } + : BuffTrigger(botAI, spell, checkInterval, checkIsOwner, false, beforeDuration), needLifeTime(needLifeTime) {} std::string const GetTargetName() override { return "current target"; } bool IsActive() override; @@ -408,9 +399,7 @@ class DebuffOnBossTrigger : public DebuffTrigger { public: DebuffOnBossTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1, bool checkIsOwner = false) - : DebuffTrigger(botAI, spell, checkInterval, checkIsOwner) - { - } + : DebuffTrigger(botAI, spell, checkInterval, checkIsOwner) {} bool IsActive() override; }; @@ -419,9 +408,7 @@ class DebuffOnAttackerTrigger : public DebuffTrigger public: DebuffOnAttackerTrigger(PlayerbotAI* botAI, std::string const spell, bool checkIsOwner = true, float needLifeTime = 8.0f) - : DebuffTrigger(botAI, spell, 1, checkIsOwner, needLifeTime) - { - } + : DebuffTrigger(botAI, spell, 1, checkIsOwner, needLifeTime) {} Value* GetTargetValue() override; std::string const getName() override { return spell + " on attacker"; } @@ -432,9 +419,7 @@ class DebuffOnMeleeAttackerTrigger : public DebuffTrigger public: DebuffOnMeleeAttackerTrigger(PlayerbotAI* botAI, std::string const spell, bool checkIsOwner = true, float needLifeTime = 8.0f) - : DebuffTrigger(botAI, spell, 1, checkIsOwner, needLifeTime) - { - } + : DebuffTrigger(botAI, spell, 1, checkIsOwner, needLifeTime) {} Value* GetTargetValue() override; std::string const getName() override { return spell + " on attacker"; } @@ -444,9 +429,7 @@ class BoostTrigger : public BuffTrigger { public: BoostTrigger(PlayerbotAI* botAI, std::string const spell, float balance = 50.f) - : BuffTrigger(botAI, spell, 1), balance(balance) - { - } + : BuffTrigger(botAI, spell, 1), balance(balance) {} bool IsActive() override; @@ -458,9 +441,7 @@ class GenericBoostTrigger : public Trigger { public: GenericBoostTrigger(PlayerbotAI* botAI, float balance = 50.f) - : Trigger(botAI, "generic boost", 1), balance(balance) - { - } + : Trigger(botAI, "generic boost", 1), balance(balance) {} bool IsActive() override; @@ -472,9 +453,7 @@ class HealerShouldAttackTrigger : public Trigger { public: HealerShouldAttackTrigger(PlayerbotAI* botAI) - : Trigger(botAI, "healer should attack", 1) - { - } + : Trigger(botAI, "healer should attack", 1) {} bool IsActive() override; }; @@ -580,7 +559,7 @@ public: class HasPetTrigger : public Trigger { public: - HasPetTrigger(PlayerbotAI* ai) : Trigger(ai, "has pet", 5 * 1000) {} + HasPetTrigger(PlayerbotAI* botAI) : Trigger(botAI, "has pet", 5 * 1000) {} virtual bool IsActive() override; }; @@ -588,7 +567,7 @@ public: class PetAttackTrigger : public Trigger { public: - PetAttackTrigger(PlayerbotAI* ai) : Trigger(ai, "pet attack") {} + PetAttackTrigger(PlayerbotAI* botAI) : Trigger(botAI, "pet attack") {} virtual bool IsActive() override; }; @@ -597,9 +576,7 @@ class ItemCountTrigger : public Trigger { public: ItemCountTrigger(PlayerbotAI* botAI, std::string const item, int32 count, int32 interval = 30 * 1000) - : Trigger(botAI, item, interval), item(item), count(count) - { - } + : Trigger(botAI, item, interval), item(item), count(count) {} bool IsActive() override; std::string const getName() override { return "item count"; } @@ -613,9 +590,7 @@ class AmmoCountTrigger : public ItemCountTrigger { public: AmmoCountTrigger(PlayerbotAI* botAI, std::string const item, uint32 count = 1, int32 interval = 30 * 1000) - : ItemCountTrigger(botAI, item, count, interval) - { - } + : ItemCountTrigger(botAI, item, count, interval) {} bool IsActive() override; }; @@ -623,9 +598,7 @@ class HasAuraTrigger : public Trigger { public: HasAuraTrigger(PlayerbotAI* botAI, std::string const spell, int32 checkInterval = 1) - : Trigger(botAI, spell, checkInterval) - { - } + : Trigger(botAI, spell, checkInterval) {} std::string const GetTargetName() override { return "self target"; } bool IsActive() override; @@ -634,10 +607,8 @@ public: class HasAuraStackTrigger : public Trigger { public: - HasAuraStackTrigger(PlayerbotAI* ai, std::string spell, int stack, int checkInterval = 1) - : Trigger(ai, spell, checkInterval), stack(stack) - { - } + HasAuraStackTrigger(PlayerbotAI* botAI, std::string spell, int stack, int checkInterval = 1) + : Trigger(botAI, spell, checkInterval), stack(stack) {} std::string const GetTargetName() override { return "self target"; } bool IsActive() override; @@ -858,9 +829,7 @@ class StayTimeTrigger : public Trigger { public: StayTimeTrigger(PlayerbotAI* botAI, uint32 delay, std::string const name) - : Trigger(botAI, name, 5 * 1000), delay(delay) - { - } + : Trigger(botAI, name, 5 * 1000), delay(delay) {} bool IsActive() override; @@ -877,7 +846,7 @@ public: class ReturnToStayPositionTrigger : public Trigger { public: - ReturnToStayPositionTrigger(PlayerbotAI* ai) : Trigger(ai, "return to stay position", 2) {} + ReturnToStayPositionTrigger(PlayerbotAI* botAI) : Trigger(botAI, "return to stay position", 2) {} virtual bool IsActive() override; }; @@ -892,9 +861,7 @@ class GiveItemTrigger : public Trigger { public: GiveItemTrigger(PlayerbotAI* botAI, std::string const name, std::string const item) - : Trigger(botAI, name, 2 * 1000), item(item) - { - } + : Trigger(botAI, name, 2 * 1000), item(item) {} bool IsActive() override; @@ -962,9 +929,7 @@ class BuffOnMainTankTrigger : public BuffTrigger { public: BuffOnMainTankTrigger(PlayerbotAI* botAI, std::string spell, bool checkIsOwner = false, int checkInterval = 1) - : BuffTrigger(botAI, spell, checkInterval, checkIsOwner) - { - } + : BuffTrigger(botAI, spell, checkInterval, checkIsOwner) {} public: virtual Value* GetTargetValue(); @@ -973,7 +938,7 @@ public: class SelfResurrectTrigger : public Trigger { public: - SelfResurrectTrigger(PlayerbotAI* ai) : Trigger(ai, "can self resurrect") {} + SelfResurrectTrigger(PlayerbotAI* botAI) : Trigger(botAI, "can self resurrect") {} bool IsActive() override { return !bot->IsAlive() && bot->GetUInt32Value(PLAYER_SELF_RES_SPELL); } }; @@ -981,7 +946,7 @@ public: class NewPetTrigger : public Trigger { public: - NewPetTrigger(PlayerbotAI* ai) : Trigger(ai, "new pet"), lastPetGuid(ObjectGuid::Empty), triggered(false) {} + NewPetTrigger(PlayerbotAI* botAI) : Trigger(botAI, "new pet"), lastPetGuid(ObjectGuid::Empty), triggered(false) {} bool IsActive() override; diff --git a/src/Ai/Base/Util/GenericBuffUtils.cpp b/src/Ai/Base/Util/GenericBuffUtils.cpp index 22d56c0ad..233d98f43 100644 --- a/src/Ai/Base/Util/GenericBuffUtils.cpp +++ b/src/Ai/Base/Util/GenericBuffUtils.cpp @@ -4,23 +4,89 @@ */ #include "GenericBuffUtils.h" -#include "PlayerbotAIConfig.h" -#include - -#include "Player.h" -#include "Group.h" -#include "SpellMgr.h" -#include "Chat.h" -#include "PlayerbotAI.h" -#include "ServerFacade.h" #include "AiObjectContext.h" + +#include "GameTime.h" +#include "Group.h" +#include "Player.h" +#include "PlayerbotAI.h" +#include "PlayerbotAIConfig.h" +#include "SpellMgr.h" +#include "Unit.h" #include "Value.h" -#include "Config.h" -#include "PlayerbotTextMgr.h" namespace ai::buff { + namespace + { + // Prevents bots from immediately casting already-present buffs upon logging in + constexpr uint32 POST_LOGIN_BUFF_GRACE_MS = 5 * IN_MILLISECONDS; + + bool IsWithinPostLoginBuffGrace(Player* player) + { + if (!player) + return false; + + return getMSTimeDiff( + player->GetInGameTime(), GameTime::GetGameTimeMS().count()) < POST_LOGIN_BUFF_GRACE_MS; + } + } + + static bool HasEnoughSameMapMissingPlayersForGroupVariant( + Player* bot, PlayerbotAI* botAI, std::string const& baseName, + std::string const& groupName, uint32 requiredCount = 3) + { + Group* group = bot->GetGroup(); + if (!group) + return false; + + uint32 missingCount = 0; + for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next()) + { + Player* member = gref->GetSource(); + if (!member || !member->IsInWorld() || !member->IsAlive() || + member->GetMap() != bot->GetMap()) + { + continue; + } + + if (botAI->HasAura(baseName, member) || botAI->HasAura(groupName, member)) + continue; + + if (++missingCount >= requiredCount) + return true; + } + + return false; + } + + static bool IsEligibleGroupForPartyBuffs(Group const* group) + { + if (!group) + return false; + + switch (sPlayerbotAIConfig.autoPartyBuffs) + { + case AutoPartyBuffMode::RAID_ONLY: + return group->isRaidGroup(); + case AutoPartyBuffMode::GROUP_OR_RAID: + return true; + case AutoPartyBuffMode::DISABLED: + return false; + } + + return false; + } + + bool IsGroupVariantEnabled(Player* bot, std::string const& name) + { + if (!IsEligibleGroupForPartyBuffs(bot->GetGroup())) + return false; + + return !GroupVariantFor(name).empty(); + } + std::string MakeAuraQualifierForBuff(std::string const& name) { // Paladin @@ -34,27 +100,89 @@ namespace ai::buff if (name == "arcane intellect") return "arcane intellect,arcane brilliance"; // Priest if (name == "power word: fortitude") return "power word: fortitude,prayer of fortitude"; + if (name == "divine spirit") return "divine spirit,prayer of spirit"; + if (name == "shadow protection") return "shadow protection,prayer of shadow protection"; return name; } std::string GroupVariantFor(std::string const& name) { - // Paladin - if (name == "blessing of kings") return "greater blessing of kings"; - if (name == "blessing of might") return "greater blessing of might"; - if (name == "blessing of wisdom") return "greater blessing of wisdom"; - if (name == "blessing of sanctuary") return "greater blessing of sanctuary"; // Druid if (name == "mark of the wild") return "gift of the wild"; // Mage if (name == "arcane intellect") return "arcane brilliance"; // Priest if (name == "power word: fortitude") return "prayer of fortitude"; + if (name == "divine spirit") return "prayer of spirit"; + if (name == "shadow protection") return "prayer of shadow protection"; + // Paladin blessings are intentionally not included here because they are + // coordinated by the auto greater blessing system instead. return std::string(); } + bool NeedsPostLoginBuffGrace(std::string const& name) + { + static char const* const trackedBuffs[] = { + "mark of the wild", + "arcane intellect", + "power word: fortitude", + "prayer of fortitude", + "divine spirit", + "prayer of spirit", + "shadow protection", + "prayer of shadow protection", + "blessing of kings", + "blessing of might", + "blessing of wisdom", + "blessing of sanctuary" + }; + + for (char const* trackedBuff : trackedBuffs) + { + if (name.find(trackedBuff) != std::string::npos) + return true; + } + + return false; + } + + bool ShouldDeferPartyBuffEvaluationForRecentLogin( + Player* bot, Unit* target, std::string const& spell) + { + if (!NeedsPostLoginBuffGrace(spell)) + return false; + + if (IsWithinPostLoginBuffGrace(bot)) + return true; + + Player* playerTarget = target ? target->ToPlayer() : nullptr; + return IsWithinPostLoginBuffGrace(playerTarget); + } + + bool ShouldDeferGreaterBlessingAssignmentForRecentLogin(Player* bot) + { + if (IsWithinPostLoginBuffGrace(bot)) + return true; + + Group* group = bot->GetGroup(); + if (!group) + return false; + + for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next()) + { + Player* member = gref->GetSource(); + if (!member || !member->IsInWorld()) + continue; + + if (IsWithinPostLoginBuffGrace(member)) + return true; + } + + return false; + } + bool HasRequiredReagents(Player* bot, uint32 spellId) { if (!spellId) @@ -72,75 +200,33 @@ namespace ai::buff return false; } } - // No reagent required return true; } return false; } std::string UpgradeToGroupIfAppropriate( - Player* bot, - PlayerbotAI* botAI, - std::string const& baseName, - bool announceOnMissing, - std::function announce) + Player* bot, PlayerbotAI* botAI, std::string const& baseName) { - std::string castName = baseName; - Group* g = bot->GetGroup(); - if (!g || g->GetMembersCount() < static_cast(sPlayerbotAIConfig.minBotsForGreaterBuff)) - return castName; // Group too small: stay in solo mode + if (!IsGroupVariantEnabled(bot, baseName)) + return baseName; - if (std::string const groupName = GroupVariantFor(baseName); !groupName.empty()) - { - uint32 const groupVariantSpellId = botAI->GetAiObjectContext() + std::string const groupName = GroupVariantFor(baseName); + if (groupName.empty()) + return baseName; + + // Prefer singles until at least three living, in-world group members on the bot's map + // are missing both the single-target buff and its group variant. + if (!HasEnoughSameMapMissingPlayersForGroupVariant(bot, botAI, baseName, groupName)) + return baseName; + + uint32 const groupSpellId = botAI->GetAiObjectContext() ->GetValue("spell id", groupName)->Get(); - // We check usefulness on the **basic** buff (not the greater version), - // because "spell cast useful" may return false for the greater variant. - bool const usefulBase = botAI->GetAiObjectContext() - ->GetValue("spell cast useful", baseName)->Get(); + if (groupSpellId && HasRequiredReagents(bot, groupSpellId)) + return groupName; - if (groupVariantSpellId && HasRequiredReagents(bot, groupVariantSpellId)) - { - // Learned + reagents OK -> switch to greater - return groupName; - } - - // Missing reagents -> announce if (a) greater is known, (b) base buff is useful, - // (c) announce was requested, (d) a callback is provided. - if (announceOnMissing && groupVariantSpellId && usefulBase && announce) - { - static std::map, time_t> s_lastWarn; // par bot & par buff - time_t now = std::time(nullptr); - uint32 botLow = static_cast(bot->GetGUID().GetCounter()); - time_t& last = s_lastWarn[ std::make_pair(botLow, groupName) ]; - if (!last || now - last >= sPlayerbotAIConfig.rpWarningCooldown) // Configurable anti-spam - { - // DB Key choice in regard of the buff - std::string key; - if (groupName.find("greater blessing") != std::string::npos) - key = "rp_missing_reagent_greater_blessing"; - else if (groupName == "gift of the wild") - key = "rp_missing_reagent_gift_of_the_wild"; - else if (groupName == "arcane brilliance") - key = "rp_missing_reagent_arcane_brilliance"; - else - key = "rp_missing_reagent_generic"; - - // Placeholders - std::map placeholders; - placeholders["%group_spell"] = groupName; - placeholders["%base_spell"] = baseName; - - std::string announceText = PlayerbotTextMgr::instance().GetBotTextOrDefault(key, - "Out of components for %group_spell. Using %base_spell!", placeholders); - - announce(announceText); - last = now; - } - } - } - return castName; + return baseName; } } diff --git a/src/Ai/Base/Util/GenericBuffUtils.h b/src/Ai/Base/Util/GenericBuffUtils.h index 37bad58a6..9f93bf108 100644 --- a/src/Ai/Base/Util/GenericBuffUtils.h +++ b/src/Ai/Base/Util/GenericBuffUtils.h @@ -6,63 +6,40 @@ #pragma once #include -#include #include "Common.h" -#include "Group.h" -#include "Chat.h" -#include "Language.h" class Player; class PlayerbotAI; +class Unit; namespace ai::buff { -// Build an aura qualifier "single + greater" to avoid double-buffing +bool IsGroupVariantEnabled(Player* bot, std::string const& name); + std::string MakeAuraQualifierForBuff(std::string const& name); -// Returns the group spell name for a given single-target buff. -// If no group equivalent exists, returns "". std::string GroupVariantFor(std::string const& name); -// Checks if the bot has the required reagents to cast a spell (by its spellId). -// Returns false if the spellId is invalid. +bool NeedsPostLoginBuffGrace(std::string const& name); + +bool ShouldDeferPartyBuffEvaluationForRecentLogin( + Player* bot, + Unit* target, + std::string const& spell); + +bool ShouldDeferGreaterBlessingAssignmentForRecentLogin(Player* bot); + bool HasRequiredReagents(Player* bot, uint32 spellId); -// Applies the "switch to group buff" policy if: the bot is in a group of size x+, -// the group variant is known/useful, and reagents are available. Otherwise, returns baseName. -// If announceOnMissing == true and reagents are missing, calls the 'announce' callback -// (if provided) to notify the party/raid. std::string UpgradeToGroupIfAppropriate( Player* bot, PlayerbotAI* botAI, - std::string const& baseName, - bool announceOnMissing = false, - std::function announce = {} - ); + std::string const& baseName); + } namespace ai::spell { bool HasSpellOrCategoryCooldown(Player* bot, uint32 spellId); } - -namespace ai::chat { - inline std::function MakeGroupAnnouncer(Player* me) - { - return [me](std::string const& msg) - { - if (Group* g = me->GetGroup()) - { - WorldPacket data; - ChatMsg type = g->isRaidGroup() ? CHAT_MSG_RAID : CHAT_MSG_PARTY; - ChatHandler::BuildChatPacket(data, type, LANG_UNIVERSAL, me, /*receiver=*/nullptr, msg.c_str()); - g->BroadcastPacket(&data, true, -1, me->GetGUID()); - } - else - { - me->Say(msg, LANG_UNIVERSAL); - } - }; - } -} diff --git a/src/Ai/Class/Dk/Action/DKActions.cpp b/src/Ai/Class/Dk/DKActions.cpp similarity index 100% rename from src/Ai/Class/Dk/Action/DKActions.cpp rename to src/Ai/Class/Dk/DKActions.cpp diff --git a/src/Ai/Class/Dk/Action/DKActions.h b/src/Ai/Class/Dk/DKActions.h similarity index 100% rename from src/Ai/Class/Dk/Action/DKActions.h rename to src/Ai/Class/Dk/DKActions.h diff --git a/src/Ai/Class/Dk/Trigger/DKTriggers.cpp b/src/Ai/Class/Dk/DKTriggers.cpp similarity index 100% rename from src/Ai/Class/Dk/Trigger/DKTriggers.cpp rename to src/Ai/Class/Dk/DKTriggers.cpp diff --git a/src/Ai/Class/Dk/Trigger/DKTriggers.h b/src/Ai/Class/Dk/DKTriggers.h similarity index 100% rename from src/Ai/Class/Dk/Trigger/DKTriggers.h rename to src/Ai/Class/Dk/DKTriggers.h diff --git a/src/Ai/Class/Druid/Action/DruidActions.h b/src/Ai/Class/Druid/Action/DruidActions.h index e386ff05d..bfe5cfc7f 100644 --- a/src/Ai/Class/Druid/Action/DruidActions.h +++ b/src/Ai/Class/Druid/Action/DruidActions.h @@ -87,16 +87,16 @@ public: bool isUseful() override; }; -class CastMarkOfTheWildAction : public CastBuffSpellAction +class CastMarkOfTheWildAction : public GroupBuffSpellAction { public: - CastMarkOfTheWildAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "mark of the wild") {} + CastMarkOfTheWildAction(PlayerbotAI* botAI) : GroupBuffSpellAction(botAI, "mark of the wild") {} }; -class CastMarkOfTheWildOnPartyAction : public BuffOnPartyAction +class CastMarkOfTheWildOnPartyAction : public GroupBuffOnPartyAction { public: - CastMarkOfTheWildOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "mark of the wild") {} + CastMarkOfTheWildOnPartyAction(PlayerbotAI* botAI) : GroupBuffOnPartyAction(botAI, "mark of the wild") {} }; class CastSurvivalInstinctsAction : public CastBuffSpellAction diff --git a/src/Ai/Class/Druid/Trigger/DruidTriggers.cpp b/src/Ai/Class/Druid/DruidTriggers.cpp similarity index 96% rename from src/Ai/Class/Druid/Trigger/DruidTriggers.cpp rename to src/Ai/Class/Druid/DruidTriggers.cpp index 5a8dbdfa4..03b5accc9 100644 --- a/src/Ai/Class/Druid/Trigger/DruidTriggers.cpp +++ b/src/Ai/Class/Druid/DruidTriggers.cpp @@ -9,11 +9,6 @@ #include "Playerbots.h" #include "ServerFacade.h" -bool MarkOfTheWildOnPartyTrigger::IsActive() -{ - return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("gift of the wild", GetTarget()); -} - bool MarkOfTheWildTrigger::IsActive() { return BuffTrigger::IsActive() && !botAI->HasAura("gift of the wild", GetTarget()); diff --git a/src/Ai/Class/Druid/Trigger/DruidTriggers.h b/src/Ai/Class/Druid/DruidTriggers.h similarity index 99% rename from src/Ai/Class/Druid/Trigger/DruidTriggers.h rename to src/Ai/Class/Druid/DruidTriggers.h index 1f389c947..990024685 100644 --- a/src/Ai/Class/Druid/Trigger/DruidTriggers.h +++ b/src/Ai/Class/Druid/DruidTriggers.h @@ -23,15 +23,13 @@ class PlayerbotAI; class MarkOfTheWildOnPartyTrigger : public BuffOnPartyTrigger { public: - MarkOfTheWildOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "mark of the wild", 2 * 2000) {} - - bool IsActive() override; + MarkOfTheWildOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "mark of the wild", 4 * 2000) {} }; class MarkOfTheWildTrigger : public BuffTrigger { public: - MarkOfTheWildTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "mark of the wild", 2 * 2000) {} + MarkOfTheWildTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "mark of the wild", 4 * 2000) {} bool IsActive() override; }; diff --git a/src/Ai/Class/Hunter/Action/HunterActions.cpp b/src/Ai/Class/Hunter/HunterActions.cpp similarity index 100% rename from src/Ai/Class/Hunter/Action/HunterActions.cpp rename to src/Ai/Class/Hunter/HunterActions.cpp diff --git a/src/Ai/Class/Hunter/Action/HunterActions.h b/src/Ai/Class/Hunter/HunterActions.h similarity index 100% rename from src/Ai/Class/Hunter/Action/HunterActions.h rename to src/Ai/Class/Hunter/HunterActions.h diff --git a/src/Ai/Class/Hunter/Trigger/HunterTriggers.cpp b/src/Ai/Class/Hunter/HunterTriggers.cpp similarity index 100% rename from src/Ai/Class/Hunter/Trigger/HunterTriggers.cpp rename to src/Ai/Class/Hunter/HunterTriggers.cpp diff --git a/src/Ai/Class/Hunter/Trigger/HunterTriggers.h b/src/Ai/Class/Hunter/HunterTriggers.h similarity index 100% rename from src/Ai/Class/Hunter/Trigger/HunterTriggers.h rename to src/Ai/Class/Hunter/HunterTriggers.h diff --git a/src/Ai/Class/Mage/Action/MageActions.cpp b/src/Ai/Class/Mage/MageActions.cpp similarity index 100% rename from src/Ai/Class/Mage/Action/MageActions.cpp rename to src/Ai/Class/Mage/MageActions.cpp diff --git a/src/Ai/Class/Mage/Action/MageActions.h b/src/Ai/Class/Mage/MageActions.h similarity index 96% rename from src/Ai/Class/Mage/Action/MageActions.h rename to src/Ai/Class/Mage/MageActions.h index 4c7f76a68..c394a379d 100644 --- a/src/Ai/Class/Mage/Action/MageActions.h +++ b/src/Ai/Class/Mage/MageActions.h @@ -40,16 +40,16 @@ public: CastFrostArmorAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "frost armor") {} }; -class CastArcaneIntellectAction : public CastBuffSpellAction +class CastArcaneIntellectAction : public GroupBuffSpellAction { public: - CastArcaneIntellectAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "arcane intellect") {} + CastArcaneIntellectAction(PlayerbotAI* botAI) : GroupBuffSpellAction(botAI, "arcane intellect") {} }; -class CastArcaneIntellectOnPartyAction : public BuffOnPartyAction +class CastArcaneIntellectOnPartyAction : public GroupBuffOnPartyAction { public: - CastArcaneIntellectOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "arcane intellect") {} + CastArcaneIntellectOnPartyAction(PlayerbotAI* botAI) : GroupBuffOnPartyAction(botAI, "arcane intellect") {} }; class CastFocusMagicOnPartyAction : public CastSpellAction diff --git a/src/Ai/Class/Mage/Trigger/MageTriggers.cpp b/src/Ai/Class/Mage/MageTriggers.cpp similarity index 97% rename from src/Ai/Class/Mage/Trigger/MageTriggers.cpp rename to src/Ai/Class/Mage/MageTriggers.cpp index 7e7ba9ab7..34babc81e 100644 --- a/src/Ai/Class/Mage/Trigger/MageTriggers.cpp +++ b/src/Ai/Class/Mage/MageTriggers.cpp @@ -31,11 +31,6 @@ bool NoManaGemTrigger::IsActive() return true; } -bool ArcaneIntellectOnPartyTrigger::IsActive() -{ - return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("arcane brilliance", GetTarget()); -} - bool ArcaneIntellectTrigger::IsActive() { return BuffTrigger::IsActive() && !botAI->HasAura("arcane brilliance", GetTarget()); diff --git a/src/Ai/Class/Mage/Trigger/MageTriggers.h b/src/Ai/Class/Mage/MageTriggers.h similarity index 98% rename from src/Ai/Class/Mage/Trigger/MageTriggers.h rename to src/Ai/Class/Mage/MageTriggers.h index 566b6b61e..58afab0f8 100644 --- a/src/Ai/Class/Mage/Trigger/MageTriggers.h +++ b/src/Ai/Class/Mage/MageTriggers.h @@ -19,14 +19,13 @@ class ArcaneIntellectOnPartyTrigger : public BuffOnPartyTrigger { public: ArcaneIntellectOnPartyTrigger(PlayerbotAI* botAI) - : BuffOnPartyTrigger(botAI, "arcane intellect", 2 * 2000) {} - bool IsActive() override; + : BuffOnPartyTrigger(botAI, "arcane intellect", 4 * 2000) {} }; class ArcaneIntellectTrigger : public BuffTrigger { public: - ArcaneIntellectTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "arcane intellect", 2 * 2000) {} + ArcaneIntellectTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "arcane intellect", 4 * 2000) {} bool IsActive() override; }; diff --git a/src/Ai/Class/Paladin/Action/PaladinActions.cpp b/src/Ai/Class/Paladin/Action/PaladinActions.cpp deleted file mode 100644 index 38e17af1e..000000000 --- a/src/Ai/Class/Paladin/Action/PaladinActions.cpp +++ /dev/null @@ -1,529 +0,0 @@ -/* - * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it - * and/or modify it under version 3 of the License, or (at your option), any later version. - */ - -#include "PaladinActions.h" - -#include "AiFactory.h" -#include "Event.h" -#include "PaladinHelper.h" -#include "PlayerbotAI.h" -#include "Playerbots.h" -#include "SharedDefines.h" -#include "../../../../../src/server/scripts/Spells/spell_generic.cpp" -#include "Ai/Base/Util/GenericBuffUtils.h" -#include "Group.h" -#include "ObjectAccessor.h" - -using ai::buff::MakeAuraQualifierForBuff; - -// Helper : detect tank role on the target (player bot or not) return true if spec is tank or if the bot have tank strategies (bear/tank/tank face). -static inline bool IsTankRole(Player* p) -{ - if (!p) return false; - if (p->HasTankSpec()) - return true; - if (PlayerbotAI* otherAI = GET_PLAYERBOT_AI(p)) - { - if (otherAI->HasStrategy("tank", BOT_STATE_NON_COMBAT) || - otherAI->HasStrategy("tank", BOT_STATE_COMBAT) || - otherAI->HasStrategy("tank face", BOT_STATE_NON_COMBAT) || - otherAI->HasStrategy("tank face", BOT_STATE_COMBAT) || - otherAI->HasStrategy("bear", BOT_STATE_NON_COMBAT) || - otherAI->HasStrategy("bear", BOT_STATE_COMBAT)) - return true; - } - return false; -} - -// Added for solo paladin patch : determine if he's the only paladin on party -static inline bool IsOnlyPaladinInGroup(Player* bot) -{ - if (!bot) return false; - Group* g = bot->GetGroup(); - if (!g) return true; // solo - uint32 pals = 0u; - for (GroupReference* r = g->GetFirstMember(); r; r = r->next()) - { - Player* p = r->GetSource(); - if (!p || !p->IsInWorld()) continue; - if (p->getClass() == CLASS_PALADIN) ++pals; - } - return pals == 1u; -} - -inline std::string const GetActualBlessingOfMight(Unit* target) -{ - if (!target->ToPlayer()) - { - return "blessing of might"; - } - - int tab = AiFactory::GetPlayerSpecTab(target->ToPlayer()); - switch (target->getClass()) - { - case CLASS_MAGE: - case CLASS_PRIEST: - case CLASS_WARLOCK: - return "blessing of wisdom"; - break; - case CLASS_SHAMAN: - if (tab == SHAMAN_TAB_ELEMENTAL || tab == SHAMAN_TAB_RESTORATION) - { - return "blessing of wisdom"; - } - break; - case CLASS_DRUID: - if (tab == DRUID_TAB_RESTORATION || tab == DRUID_TAB_BALANCE) - { - return "blessing of wisdom"; - } - break; - case CLASS_PALADIN: - if (tab == PALADIN_TAB_HOLY) - { - return "blessing of wisdom"; - } - break; - } - - return "blessing of might"; -} - -inline std::string const GetActualBlessingOfWisdom(Unit* target) -{ - if (!target->ToPlayer()) - { - return "blessing of might"; - } - int tab = AiFactory::GetPlayerSpecTab(target->ToPlayer()); - switch (target->getClass()) - { - case CLASS_WARRIOR: - case CLASS_ROGUE: - case CLASS_DEATH_KNIGHT: - case CLASS_HUNTER: - return "blessing of might"; - break; - case CLASS_SHAMAN: - if (tab == SHAMAN_TAB_ENHANCEMENT) - { - return "blessing of might"; - } - break; - case CLASS_DRUID: - if (tab == DRUID_TAB_FERAL) - { - return "blessing of might"; - } - break; - case CLASS_PALADIN: - if (tab == PALADIN_TAB_PROTECTION || tab == PALADIN_TAB_RETRIBUTION) - { - return "blessing of might"; - } - break; - } - - return "blessing of wisdom"; -} - -inline std::string const GetActualBlessingOfSanctuary(Unit* target, Player* bot) -{ - if (!bot->HasSpell(SPELL_BLESSING_OF_SANCTUARY)) - return ""; - - Player* tp = target->ToPlayer(); - if (!tp) - return ""; - - if (auto* ai = GET_PLAYERBOT_AI(bot)) - { - if (Unit* mt = ai->GetAiObjectContext()->GetValue("main tank")->Get()) - { - if (mt == target) - return "blessing of sanctuary"; - } - } - - if (tp->HasTankSpec()) - return "blessing of sanctuary"; - - return ""; -} - -Value* CastBlessingOnPartyAction::GetTargetValue() -{ - - return context->GetValue("party member without aura", MakeAuraQualifierForBuff(spell)); -} - -bool CastBlessingOfMightAction::Execute(Event /*event*/) -{ - Unit* target = GetTarget(); - if (!target) - return false; - - std::string castName = GetActualBlessingOfMight(target); - auto RP = ai::chat::MakeGroupAnnouncer(bot); - - castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP); - return botAI->CastSpell(castName, target); -} - -Value* CastBlessingOfMightOnPartyAction::GetTargetValue() -{ - return context->GetValue( - "party member without aura", - "blessing of might,greater blessing of might,blessing of wisdom,greater blessing of wisdom,blessing of sanctuary,greater blessing of sanctuary" - ); -} - -bool CastBlessingOfMightOnPartyAction::Execute(Event /*event*/) -{ - Unit* target = GetTarget(); - if (!target) - return false; - - std::string castName = GetActualBlessingOfMight(target); - auto RP = ai::chat::MakeGroupAnnouncer(bot); - - castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP); - return botAI->CastSpell(castName, target); -} - -bool CastBlessingOfWisdomAction::Execute(Event /*event*/) -{ - Unit* target = GetTarget(); - if (!target) - return false; - - std::string castName = GetActualBlessingOfWisdom(target); - auto RP = ai::chat::MakeGroupAnnouncer(bot); - - castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP); - return botAI->CastSpell(castName, target); -} - -Value* CastBlessingOfWisdomOnPartyAction::GetTargetValue() -{ - return context->GetValue( - "party member without aura", - "blessing of wisdom,greater blessing of wisdom,blessing of might,greater blessing of might,blessing of sanctuary,greater blessing of sanctuary" - ); -} - -bool CastBlessingOfWisdomOnPartyAction::Execute(Event /*event*/) -{ - Unit* target = GetTarget(); - if (!target) - return false; - - Player* targetPlayer = target->ToPlayer(); - - if (Group* g = bot->GetGroup()) - if (targetPlayer && !g->IsMember(targetPlayer->GetGUID())) - return false; - - if (botAI->HasStrategy("bmana", BOT_STATE_NON_COMBAT) && - targetPlayer && IsTankRole(targetPlayer)) - { - LOG_DEBUG("playerbots", "[Wisdom/bmana] Skip tank {} (Kings only)", target->GetName()); - return false; - } - - std::string castName = GetActualBlessingOfWisdom(target); - if (castName.empty()) - return false; - - auto RP = ai::chat::MakeGroupAnnouncer(bot); - castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP); - return botAI->CastSpell(castName, target); -} - -Value* CastBlessingOfSanctuaryOnPartyAction::GetTargetValue() -{ - return context->GetValue( - "party member without aura", - "blessing of sanctuary,greater blessing of sanctuary" - ); -} - -bool CastBlessingOfSanctuaryOnPartyAction::Execute(Event /*event*/) -{ - if (!bot->HasSpell(SPELL_BLESSING_OF_SANCTUARY)) - return false; - - Unit* target = GetTarget(); - if (!target) - { - // Fallback: GetTarget() can be null if no one needs a buff. - // Keep a valid pointer for the checks/logs that follow. - target = bot; - } - - Player* targetPlayer = target ? target->ToPlayer() : nullptr; - - // Small helpers to check relevant auras - const auto HasKingsAura = [&](Unit* u) -> bool { - return botAI->HasAura("blessing of kings", u) || botAI->HasAura("greater blessing of kings", u); - }; - const auto HasSanctAura = [&](Unit* u) -> bool { - return botAI->HasAura("blessing of sanctuary", u) || botAI->HasAura("greater blessing of sanctuary", u); - }; - - if (Group* g = bot->GetGroup()) - { - if (targetPlayer && !g->IsMember(targetPlayer->GetGUID())) - { - LOG_DEBUG("playerbots", "[Sanct] Initial target not in group, ignoring"); - target = bot; - targetPlayer = bot->ToPlayer(); - } - } - - if (Player* self = bot->ToPlayer()) - { - bool selfHasSanct = HasSanctAura(self); - bool needSelf = IsTankRole(self) && !selfHasSanct; - - LOG_DEBUG("playerbots", "[Sanct] {} isTank={} selfHasSanct={} needSelf={}", - bot->GetName(), IsTankRole(self), selfHasSanct, needSelf); - - if (needSelf) - { - target = self; - targetPlayer = self; - } - } - - // Try to re-target a valid tank in group if needed - bool targetOk = false; - if (targetPlayer) - { - bool hasSanct = HasSanctAura(targetPlayer); - targetOk = IsTankRole(targetPlayer) && !hasSanct; - } - - if (!targetOk) - { - if (Group* g = bot->GetGroup()) - { - for (GroupReference* gref = g->GetFirstMember(); gref; gref = gref->next()) - { - Player* p = gref->GetSource(); - if (!p) continue; - if (!p->IsInWorld() || !p->IsAlive()) continue; - if (!IsTankRole(p)) continue; - - bool hasSanct = HasSanctAura(p); - if (!hasSanct) - { - target = p; // prioritize this tank - targetPlayer = p; - targetOk = true; - break; - } - } - } - } - - { - bool hasKings = HasKingsAura(target); - bool hasSanct = HasSanctAura(target); - bool knowSanct = bot->HasSpell(SPELL_BLESSING_OF_SANCTUARY); - LOG_DEBUG("playerbots", "[Sanct] Final target={} hasKings={} hasSanct={} knowSanct={}", - target->GetName(), hasKings, hasSanct, knowSanct); - } - - std::string castName = GetActualBlessingOfSanctuary(target, bot); - // If internal logic didn't recognize the tank (e.g., bear druid), force single-target Sanctuary - if (castName.empty()) - { - if (targetPlayer) - { - if (IsTankRole(targetPlayer)) - castName = "blessing of sanctuary"; // force single-target - else - return false; - } - else - return false; - } - if (targetPlayer && !IsTankRole(targetPlayer)) - { - auto RP = ai::chat::MakeGroupAnnouncer(bot); - castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP); - } - else - { - castName = "blessing of sanctuary"; - } - - bool ok = botAI->CastSpell(castName, target); - LOG_DEBUG("playerbots", "[Sanct] Cast {} on {} result={}", castName, target->GetName(), ok); - return ok; -} - -Value* CastBlessingOfKingsOnPartyAction::GetTargetValue() -{ - return context->GetValue( - "party member without aura", - "blessing of kings,greater blessing of kings,blessing of sanctuary,greater blessing of sanctuary" - ); -} - -bool CastBlessingOfKingsOnPartyAction::Execute(Event /*event*/) -{ - Unit* target = GetTarget(); - if (!target) - return false; - - Group* g = bot->GetGroup(); - if (!g) - return false; - - // Added for patch solo paladin, never buff itself to not remove his sanctuary buff - if (botAI->HasStrategy("bstats", BOT_STATE_NON_COMBAT) && IsOnlyPaladinInGroup(bot)) - { - if (target->GetGUID() == bot->GetGUID()) - { - LOG_DEBUG("playerbots", "[Kings/bstats-solo] Skip self to keep Sanctuary on {}", bot->GetName()); - return false; - } - } - // End solo paladin patch - - Player* targetPlayer = target->ToPlayer(); - if (targetPlayer && !g->IsMember(targetPlayer->GetGUID())) - return false; - - const bool hasBmana = botAI->HasStrategy("bmana", BOT_STATE_NON_COMBAT); - const bool hasBstats = botAI->HasStrategy("bstats", BOT_STATE_NON_COMBAT); - - if (hasBmana) - { - if (!targetPlayer || !IsTankRole(targetPlayer)) - { - LOG_DEBUG("playerbots", "[Kings/bmana] Skip non-tank {}", target->GetName()); - return false; - } - } - - if (targetPlayer) - { - const bool isTank = IsTankRole(targetPlayer); - const bool hasSanctFromMe = - target->HasAura(SPELL_BLESSING_OF_SANCTUARY, bot->GetGUID()) || - target->HasAura(SPELL_GREATER_BLESSING_OF_SANCTUARY, bot->GetGUID()); - const bool hasSanctAny = - botAI->HasAura("blessing of sanctuary", target) || - botAI->HasAura("greater blessing of sanctuary", target); - - if (isTank && hasSanctFromMe) - { - LOG_DEBUG("playerbots", "[Kings] Skip: {} has my Sanctuary and is a tank", target->GetName()); - return false; - } - - if (hasBstats && isTank && hasSanctAny) - { - LOG_DEBUG("playerbots", "[Kings] Skip (bstats): {} already has Sanctuary and is a tank", target->GetName()); - return false; - } - } - - std::string castName = "blessing of kings"; - - bool allowGreater = true; - - if (hasBmana) - allowGreater = false; - - if (allowGreater && hasBstats && targetPlayer) - { - switch (targetPlayer->getClass()) - { - case CLASS_WARRIOR: - case CLASS_PALADIN: - case CLASS_DRUID: - case CLASS_DEATH_KNIGHT: - allowGreater = false; - break; - default: - break; - } - } - - if (allowGreater) - { - auto RP = ai::chat::MakeGroupAnnouncer(bot); - castName = ai::buff::UpgradeToGroupIfAppropriate(bot, botAI, castName, /*announceOnMissing=*/true, RP); - } - - return botAI->CastSpell(castName, target); -} - -bool CastSealSpellAction::isUseful() { return AI_VALUE2(bool, "combat", "self target"); } - -Value* CastTurnUndeadAction::GetTargetValue() { return context->GetValue("cc target", getName()); } - -Unit* CastHandOfFreedomOnPartyAction::GetTarget() -{ - bool const selfImpaired = botAI->IsMovementImpaired(bot); - bool const hasSelfHand = selfImpaired && ai::paladin::HasAnyPaladinHandFromCaster(bot, bot); - - if (!bot->GetGroup()) - { - if (selfImpaired && !hasSelfHand) - return bot; - - return nullptr; - } - - if (selfImpaired && !hasSelfHand) - return bot; - - return CastBuffSpellAction::GetTarget(); -} - -Value* CastHandOfFreedomOnPartyAction::GetTargetValue() -{ - return context->GetValue("party member snared target"); -} - -bool CastHandOfFreedomOnPartyAction::isUseful() -{ - Unit* target = GetTarget(); - if (!target) - return false; - - return CastBuffSpellAction::isUseful() && !ai::paladin::HasAnyPaladinHandFromCaster(target, bot); -} - -Unit* CastRighteousDefenseAction::GetTarget() -{ - Unit* current_target = AI_VALUE(Unit*, "current target"); - if (!current_target) - return nullptr; - - return current_target->GetVictim(); -} - -bool CastDivineSacrificeAction::isUseful() -{ - return GetTarget() && (GetTarget() != nullptr) && CastSpellAction::isUseful() && - !botAI->HasAura("divine guardian", GetTarget(), false, false, -1, true); -} - -bool CastCancelDivineSacrificeAction::Execute(Event /*event*/) -{ - botAI->RemoveAura("divine sacrifice"); - return true; -} - -bool CastCancelDivineSacrificeAction::isUseful() -{ - return botAI->HasAura("divine sacrifice", GetTarget(), false, true, -1, true); -} diff --git a/src/Ai/Class/Paladin/Actions/PaladinActions.cpp b/src/Ai/Class/Paladin/Actions/PaladinActions.cpp new file mode 100644 index 000000000..b7044ee3b --- /dev/null +++ b/src/Ai/Class/Paladin/Actions/PaladinActions.cpp @@ -0,0 +1,609 @@ +/* + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it + * and/or modify it under version 3 of the License, or (at your option), any later version. + */ + +#include "PaladinActions.h" + +#include "AiFactory.h" +#include "Event.h" +#include "GenericBuffUtils.h" +#include "PaladinGreaterBlessingAction.h" +#include "PaladinHelper.h" +#include "Playerbots.h" +#include "SharedDefines.h" + +static bool IsBlessingTargetCandidate(Player* bot, Player* player) +{ + if (!player || !player->IsAlive() || player->GetMapId() != bot->GetMapId()) + return false; + + if (player->IsGameMaster()) + return false; + + return bot->GetDistance(player) < sPlayerbotAIConfig.spellDistance * 2 && + bot->IsWithinLOS(player->GetPositionX(), player->GetPositionY(), + player->GetPositionZ()); +} + +static bool HasBlessingAura( + PlayerbotAI* botAI, Unit* target, std::initializer_list auraNames) +{ + for (char const* auraName : auraNames) + { + if (botAI->HasAura(auraName, target)) + return true; + } + + return false; +} + +static bool IsGreaterBlessingMode(Player* bot) +{ + return ai::gbless::IsEligibleGroupForAutoBlessings(bot->GetGroup()); +} + +template +static Unit* FindBlessingTarget( + Player* bot, PlayerbotAI* botAI, Predicate&& predicate) +{ + std::vector masters; + std::vector healers; + std::vector tanks; + std::vector others; + + Player* master = botAI->GetMaster(); + auto addPlayer = [&](Player* player) + { + if (!IsBlessingTargetCandidate(bot, player)) + return; + + if (player == master) + masters.push_back(player); + else if (botAI->IsHeal(player)) + healers.push_back(player); + else if (botAI->IsTank(player)) + tanks.push_back(player); + else + others.push_back(player); + }; + + if (Group* group = bot->GetGroup()) + { + for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next()) + addPlayer(ref->GetSource()); + } + else + { + addPlayer(bot); + } + + std::vector*> orderedLists = { + &masters, &healers, &tanks, &others }; + for (std::vector* players : orderedLists) + { + for (Player* player : *players) + { + if (predicate(player)) + return player; + } + } + + return nullptr; +} + +static inline bool IsTankRole(Player* player) +{ + if (!player) + return false; + + if (player->HasTankSpec()) + return true; + + if (PlayerbotAI* otherAI = GET_PLAYERBOT_AI(player)) + { + if (otherAI->HasStrategy("tank", BOT_STATE_NON_COMBAT) || + otherAI->HasStrategy("tank", BOT_STATE_COMBAT) || + otherAI->HasStrategy("tank face", BOT_STATE_NON_COMBAT) || + otherAI->HasStrategy("tank face", BOT_STATE_COMBAT) || + otherAI->HasStrategy("bear", BOT_STATE_NON_COMBAT) || + otherAI->HasStrategy("bear", BOT_STATE_COMBAT)) + return true; + } + + return false; +} + +static inline bool IsOnlyPaladinInGroup(Player* bot) +{ + if (!bot) + return false; + + Group* group = bot->GetGroup(); + if (!group) + return true; + + uint32 paladins = 0u; + for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next()) + { + Player* player = ref->GetSource(); + if (!player || !player->IsInWorld()) continue; + if (player->getClass() == CLASS_PALADIN) ++paladins; + } + + return paladins == 1u; +} + +inline std::string const GetActualBlessingOfMight(Unit* target) +{ + if (!target->ToPlayer()) + return "blessing of might"; + + uint8 tab = AiFactory::GetPlayerSpecTab(target->ToPlayer()); + switch (target->getClass()) + { + case CLASS_MAGE: + case CLASS_PRIEST: + case CLASS_WARLOCK: + return "blessing of wisdom"; + break; + case CLASS_SHAMAN: + if (tab == SHAMAN_TAB_ELEMENTAL || tab == SHAMAN_TAB_RESTORATION) + return "blessing of wisdom"; + break; + case CLASS_DRUID: + if (tab == DRUID_TAB_RESTORATION || tab == DRUID_TAB_BALANCE) + return "blessing of wisdom"; + break; + case CLASS_PALADIN: + if (tab == PALADIN_TAB_HOLY) + return "blessing of wisdom"; + break; + } + + return "blessing of might"; +} + +inline std::string const GetActualBlessingOfWisdom(Unit* target) +{ + if (!target->ToPlayer()) + return "blessing of might"; + + uint8 tab = AiFactory::GetPlayerSpecTab(target->ToPlayer()); + switch (target->getClass()) + { + case CLASS_WARRIOR: + case CLASS_ROGUE: + case CLASS_DEATH_KNIGHT: + case CLASS_HUNTER: + return "blessing of might"; + break; + case CLASS_SHAMAN: + if (tab == SHAMAN_TAB_ENHANCEMENT) + return "blessing of might"; + break; + case CLASS_DRUID: + if (tab == DRUID_TAB_FERAL) + return "blessing of might"; + break; + case CLASS_PALADIN: + if (tab == PALADIN_TAB_PROTECTION || tab == PALADIN_TAB_RETRIBUTION) + return "blessing of might"; + break; + } + + return "blessing of wisdom"; +} + +inline std::string const GetActualBlessingOfSanctuary(Unit* target, Player* bot) +{ + if (!bot->HasSpell(ai::paladin::SPELL_BLESSING_OF_SANCTUARY)) + return ""; + + Player* targetPlayer = target->ToPlayer(); + if (!targetPlayer) + return ""; + + if (auto* botAI = GET_PLAYERBOT_AI(bot)) + { + if (Unit* mainTank = + botAI->GetAiObjectContext()->GetValue("main tank")->Get()) + { + if (mainTank == target) + return "blessing of sanctuary"; + } + } + + if (targetPlayer->HasTankSpec()) + return "blessing of sanctuary"; + + return ""; +} + +Unit* CastBlessingOfMightOnPartyAction::GetTarget() +{ + if (IsGreaterBlessingMode(bot)) + return nullptr; + + return FindBlessingTarget(bot, botAI, [&](Player* player) + { + return !HasBlessingAura(botAI, player, + { "blessing of might", "greater blessing of might", + "blessing of wisdom", "greater blessing of wisdom", + "blessing of sanctuary", "greater blessing of sanctuary" }); + }); +} + +bool CastBlessingOfMightAction::Execute(Event /*event*/) +{ + Unit* target = GetTarget(); + if (!target) + return false; + + std::string castName = GetActualBlessingOfMight(target); + return botAI->CastSpell(castName, target); +} + +Value* CastBlessingOfMightOnPartyAction::GetTargetValue() +{ + return context->GetValue( + "party member without aura", + "blessing of might,greater blessing of might,blessing of wisdom," + "greater blessing of wisdom,blessing of sanctuary," + "greater blessing of sanctuary" + ); +} + +bool CastBlessingOfMightOnPartyAction::Execute(Event /*event*/) +{ + if (IsGreaterBlessingMode(bot)) + return false; + + Unit* target = GetTarget(); + if (!target) + return false; + + std::string castName = GetActualBlessingOfMight(target); + return botAI->CastSpell(castName, target); +} + +bool CastBlessingOfWisdomAction::Execute(Event /*event*/) +{ + Unit* target = GetTarget(); + if (!target) + return false; + + std::string castName = GetActualBlessingOfWisdom(target); + return botAI->CastSpell(castName, target); +} + +Unit* CastBlessingOfWisdomOnPartyAction::GetTarget() +{ + if (IsGreaterBlessingMode(bot)) + return nullptr; + + return FindBlessingTarget(bot, botAI, [&](Player* player) + { + if (botAI->HasStrategy("bwisdom", BOT_STATE_NON_COMBAT) && IsTankRole(player)) + return false; + + return !HasBlessingAura(botAI, player, + { "blessing of might", "greater blessing of might", + "blessing of wisdom", "greater blessing of wisdom", + "blessing of sanctuary", "greater blessing of sanctuary" }); + }); +} + +Value* CastBlessingOfWisdomOnPartyAction::GetTargetValue() +{ + return context->GetValue( + "party member without aura", + "blessing of wisdom,greater blessing of wisdom,blessing of might,greater blessing of might," + "blessing of sanctuary,greater blessing of sanctuary" + ); +} + +bool CastBlessingOfWisdomOnPartyAction::Execute(Event /*event*/) +{ + if (IsGreaterBlessingMode(bot)) + return false; + + Unit* target = GetTarget(); + if (!target) + return false; + + Player* targetPlayer = target->ToPlayer(); + + if (Group* group = bot->GetGroup()) + if (targetPlayer && !group->IsMember(targetPlayer->GetGUID())) + return false; + + if (botAI->HasStrategy("bwisdom", BOT_STATE_NON_COMBAT) && + targetPlayer && IsTankRole(targetPlayer)) + return false; + + std::string castName = GetActualBlessingOfWisdom(target); + if (castName.empty()) + return false; + + return botAI->CastSpell(castName, target); +} + +Value* CastBlessingOfSanctuaryOnPartyAction::GetTargetValue() +{ + return context->GetValue( + "party member without aura", + "blessing of sanctuary,greater blessing of sanctuary" + ); +} + +bool CastBlessingOfSanctuaryOnPartyAction::Execute(Event /*event*/) +{ + if (IsGreaterBlessingMode(bot)) + return false; + + if (!bot->HasSpell(ai::paladin::SPELL_BLESSING_OF_SANCTUARY)) + return false; + + Unit* target = GetTarget(); + if (!target) + target = bot; + + Player* targetPlayer = target ? target->ToPlayer() : nullptr; + + const auto HasKingsAura = [&](Unit* unit) -> bool { + return botAI->HasAura("blessing of kings", unit) || + botAI->HasAura("greater blessing of kings", unit); + }; + const auto HasSanctAura = [&](Unit* unit) -> bool { + return botAI->HasAura("blessing of sanctuary", unit) || + botAI->HasAura("greater blessing of sanctuary", unit); + }; + + if (Group* group = bot->GetGroup()) + { + if (targetPlayer && !group->IsMember(targetPlayer->GetGUID())) + { + target = bot; + targetPlayer = bot->ToPlayer(); + } + } + + if (Player* self = bot->ToPlayer()) + { + bool selfHasSanct = HasSanctAura(self); + bool needSelf = IsTankRole(self) && !selfHasSanct; + + if (needSelf) + { + target = self; + targetPlayer = self; + } + } + + bool targetOk = false; + if (targetPlayer) + { + bool hasSanct = HasSanctAura(targetPlayer); + targetOk = IsTankRole(targetPlayer) && !hasSanct; + } + + if (!targetOk) + { + if (Group* group = bot->GetGroup()) + { + for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next()) + { + Player* player = ref->GetSource(); + if (!player) continue; + if (!player->IsInWorld() || !player->IsAlive()) continue; + if (!IsTankRole(player)) continue; + + bool hasSanct = HasSanctAura(player); + if (!hasSanct) + { + target = player; + targetPlayer = player; + targetOk = true; + break; + } + } + } + } + + if (GetActualBlessingOfSanctuary(target, bot).empty()) + { + if (targetPlayer) + { + if (IsTankRole(targetPlayer)) + return botAI->CastSpell("blessing of sanctuary", target); + else + return false; + } + else + return false; + } + + return botAI->CastSpell("blessing of sanctuary", target); +} + +Unit* CastBlessingOfSanctuaryOnPartyAction::GetTarget() +{ + if (IsGreaterBlessingMode(bot)) + return nullptr; + + if (!bot->HasSpell(ai::paladin::SPELL_BLESSING_OF_SANCTUARY)) + return nullptr; + + return FindBlessingTarget(bot, botAI, [&](Player* player) + { + return IsTankRole(player) && + !HasBlessingAura(botAI, player, + { "blessing of sanctuary", "greater blessing of sanctuary" }); + }); +} + +Value* CastBlessingOfKingsOnPartyAction::GetTargetValue() +{ + return context->GetValue( + "party member without aura", + "blessing of kings,greater blessing of kings," + "blessing of sanctuary,greater blessing of sanctuary" + ); +} + +Unit* CastBlessingOfKingsOnPartyAction::GetTarget() +{ + if (IsGreaterBlessingMode(bot)) + return nullptr; + + const bool hasBwisdom = botAI->HasStrategy("bwisdom", BOT_STATE_NON_COMBAT); + const bool hasBkings = botAI->HasStrategy("bkings", BOT_STATE_NON_COMBAT); + const bool onlyPaladinInGroup = IsOnlyPaladinInGroup(bot); + + return FindBlessingTarget(bot, botAI, [&](Player* player) + { + const bool isTank = IsTankRole(player); + const bool hasKingsOrSanct = HasBlessingAura(botAI, player, + { "blessing of kings", "greater blessing of kings", + "blessing of sanctuary", "greater blessing of sanctuary" }); + + if (hasKingsOrSanct) + return false; + + if (hasBwisdom) + return isTank; + + if (hasBkings) + { + if (isTank) + return false; + + if (onlyPaladinInGroup && player == bot) + return false; + } + + return true; + }); +} + +bool CastBlessingOfKingsOnPartyAction::Execute(Event /*event*/) +{ + if (IsGreaterBlessingMode(bot)) + return false; + + Unit* target = GetTarget(); + if (!target) + return false; + + Group* group = bot->GetGroup(); + if (!group) + return false; + + if (botAI->HasStrategy("bkings", BOT_STATE_NON_COMBAT) && + IsOnlyPaladinInGroup(bot)) + { + if (target->GetGUID() == bot->GetGUID()) + return false; + } + + Player* targetPlayer = target->ToPlayer(); + if (targetPlayer && !group->IsMember(targetPlayer->GetGUID())) + return false; + + const bool hasBwisdom = botAI->HasStrategy("bwisdom", BOT_STATE_NON_COMBAT); + const bool hasBkings = botAI->HasStrategy("bkings", BOT_STATE_NON_COMBAT); + + if (hasBwisdom && (!targetPlayer || !IsTankRole(targetPlayer))) + return false; + + if (targetPlayer) + { + const bool isTank = IsTankRole(targetPlayer); + const bool hasSanctFromMe = + target->HasAura(ai::paladin::SPELL_BLESSING_OF_SANCTUARY, bot->GetGUID()) || + target->HasAura(ai::paladin::SPELL_GREATER_BLESSING_OF_SANCTUARY, bot->GetGUID()); + const bool hasSanctAny = + botAI->HasAura("blessing of sanctuary", target) || + botAI->HasAura("greater blessing of sanctuary", target); + + if (isTank && hasSanctFromMe) + return false; + + if (hasBkings && isTank && hasSanctAny) + return false; + } + + return botAI->CastSpell("blessing of kings", target); +} + +bool CastSealSpellAction::isUseful() +{ + return AI_VALUE2(bool, "combat", "self target"); +} + +Value* CastTurnUndeadAction::GetTargetValue() +{ + return context->GetValue("cc target", getName()); +} + +Unit* CastHandOfFreedomOnPartyAction::GetTarget() +{ + bool const selfImpaired = botAI->IsMovementImpaired(bot); + bool const hasSelfHand = + selfImpaired && ai::paladin::HasAnyPaladinHandFromCaster(bot, bot); + + if (!bot->GetGroup()) + { + if (selfImpaired && !hasSelfHand) + return bot; + + return nullptr; + } + + if (selfImpaired && !hasSelfHand) + return bot; + + return CastBuffSpellAction::GetTarget(); +} + +Value* CastHandOfFreedomOnPartyAction::GetTargetValue() +{ + return context->GetValue("party member snared target"); +} + +bool CastHandOfFreedomOnPartyAction::isUseful() +{ + Unit* target = GetTarget(); + if (!target) + return false; + + return CastBuffSpellAction::isUseful() && + !ai::paladin::HasAnyPaladinHandFromCaster(target, bot); +} + +Unit* CastRighteousDefenseAction::GetTarget() +{ + Unit* current_target = AI_VALUE(Unit*, "current target"); + if (!current_target) + return nullptr; + + return current_target->GetVictim(); +} + +bool CastDivineSacrificeAction::isUseful() +{ + return GetTarget() && (GetTarget() != nullptr) && CastSpellAction::isUseful() && + !botAI->HasAura("divine guardian", GetTarget(), false, false, -1, true); +} + +bool CastCancelDivineSacrificeAction::Execute(Event /*event*/) +{ + botAI->RemoveAura("divine sacrifice"); + return true; +} + +bool CastCancelDivineSacrificeAction::isUseful() +{ + return botAI->HasAura("divine sacrifice", GetTarget(), false, true, -1, true); +} diff --git a/src/Ai/Class/Paladin/Action/PaladinActions.h b/src/Ai/Class/Paladin/Actions/PaladinActions.h similarity index 96% rename from src/Ai/Class/Paladin/Action/PaladinActions.h rename to src/Ai/Class/Paladin/Actions/PaladinActions.h index 75b0637a4..ef59225e6 100644 --- a/src/Ai/Class/Paladin/Action/PaladinActions.h +++ b/src/Ai/Class/Paladin/Actions/PaladinActions.h @@ -8,10 +8,6 @@ #include "AiObject.h" #include "GenericSpellActions.h" -#include "SharedDefines.h" - -class PlayerbotAI; -class Unit; // seals BUFF_ACTION(CastSealOfRighteousnessAction, "seal of righteousness"); @@ -88,24 +84,13 @@ public: bool Execute(Event event) override; }; -class CastBlessingOnPartyAction : public BuffOnPartyAction -{ -public: - CastBlessingOnPartyAction(PlayerbotAI* botAI, std::string const name) - : BuffOnPartyAction(botAI, name), name(name) {} - - Value* GetTargetValue() override; - -private: - std::string name; -}; - class CastBlessingOfMightOnPartyAction : public BuffOnPartyAction { public: CastBlessingOfMightOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "blessing of might") {} std::string const getName() override { return "blessing of might on party"; } + Unit* GetTarget() override; Value* GetTargetValue() override; bool Execute(Event event) override; }; @@ -124,6 +109,7 @@ public: CastBlessingOfWisdomOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "blessing of wisdom") {} std::string const getName() override { return "blessing of wisdom on party"; } + Unit* GetTarget() override; Value* GetTargetValue() override; bool Execute(Event event) override; }; @@ -134,12 +120,13 @@ public: CastBlessingOfKingsAction(PlayerbotAI* botAI) : CastBuffSpellAction(botAI, "blessing of kings") {} }; -class CastBlessingOfKingsOnPartyAction : public CastBlessingOnPartyAction +class CastBlessingOfKingsOnPartyAction : public BuffOnPartyAction { public: - CastBlessingOfKingsOnPartyAction(PlayerbotAI* botAI) : CastBlessingOnPartyAction(botAI, "blessing of kings") {} + CastBlessingOfKingsOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "blessing of kings") {} std::string const getName() override { return "blessing of kings on party"; } + Unit* GetTarget() override; Value* GetTargetValue() override; // added for Sanctuary priority bool Execute(Event event) override; // added for 2 paladins logic }; @@ -156,6 +143,7 @@ public: CastBlessingOfSanctuaryOnPartyAction(PlayerbotAI* botAI) : BuffOnPartyAction(botAI, "blessing of sanctuary") {} std::string const getName() override { return "blessing of sanctuary on party"; } + Unit* GetTarget() override; Value* GetTargetValue() override; bool Execute(Event event) override; }; diff --git a/src/Ai/Class/Paladin/Actions/PaladinGreaterBlessingAction.cpp b/src/Ai/Class/Paladin/Actions/PaladinGreaterBlessingAction.cpp new file mode 100644 index 000000000..a123b29fa --- /dev/null +++ b/src/Ai/Class/Paladin/Actions/PaladinGreaterBlessingAction.cpp @@ -0,0 +1,1116 @@ +/* + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it + * and/or modify it under version 3 of the License, or (at your option), any later version. + */ + +#include "PaladinGreaterBlessingAction.h" + +#include "AiObjectContext.h" +#include "AiFactory.h" +#include "Event.h" +#include "GenericBuffUtils.h" +#include "PaladinHelper.h" +#include "Playerbots.h" +#include "SharedDefines.h" +#include "SpellAuraEffects.h" +#include "Value.h" + +#include +#include + +namespace ai::gbless +{ +namespace +{ + constexpr uint32 GREATER_BLESSING_ASSIGNMENT_CACHE_MS = 4 * 1000; + constexpr uint32 GREATER_BLESSING_PENDING_ASSIGNMENT_CACHE_MS = 100; + constexpr uint8 MAX_BLESSING_SLOTS = 4; + constexpr uint8 MAX_CLASS_ID = 12; + + constexpr size_t BaseBlessingCategoryCount = MAX_BLESSING_SLOTS; + + constexpr size_t BaseBlessingIndex(BaseBlessingCategory category) + { + return static_cast(static_cast(category) - static_cast(BASE_MIGHT)); + } + + bool UsesRoleBucket(uint8 classId) + { + switch (classId) + { + case CLASS_WARRIOR: + case CLASS_DEATH_KNIGHT: + case CLASS_SHAMAN: + case CLASS_PALADIN: + case CLASS_DRUID: + return true; + default: + return false; + } + } + + bool IsSameBucket( + CachedBlessingBucketAssignment const& left, + CachedBlessingBucketAssignment const& right) + { + return left.classId == right.classId && + left.byRole == right.byRole && + (!left.byRole || left.role == right.role); + } + + int TalentScore(Player* player) + { + if (!player) + return 0; + + int score = 0; + if (player->HasAura(SPELL_IMPROVED_MIGHT_R1) || + player->HasAura(SPELL_IMPROVED_MIGHT_R2)) + { + score += 2; + } + if (player->HasAura(SPELL_IMPROVED_WISDOM_R1) || + player->HasAura(SPELL_IMPROVED_WISDOM_R2)) + { + score += 1; + } + + return score; + } + + int TalentMatchScore(Player* player, BaseBlessingCategory category) + { + if (!player) + return std::numeric_limits::min() / 4; + + if (category == BASE_SANCTUARY) + { + if (!player->HasSpell(ai::paladin::SPELL_BLESSING_OF_SANCTUARY)) + return std::numeric_limits::min() / 4; + + return 2; + } + + if (category == BASE_MIGHT && + (player->HasAura(SPELL_IMPROVED_MIGHT_R1) || + player->HasAura(SPELL_IMPROVED_MIGHT_R2))) + { + return 1; + } + if (category == BASE_WISDOM && + (player->HasAura(SPELL_IMPROVED_WISDOM_R1) || + player->HasAura(SPELL_IMPROVED_WISDOM_R2))) + { + return 1; + } + + return 0; + } + + struct DesiredBlessingSet + { + std::array ordered = {}; + std::array wants = {}; + uint8 count = 0; + }; + + struct PresentBucket + { + uint8 classId = 0; + RoleProfile role = ROLE_CASTER; + bool byRole = false; + uint8 memberCount = 0; + DesiredBlessingSet desired; + }; + + DesiredBlessingSet BuildDesiredBlessingSet( + RoleProfile role, uint8 paladinCount, bool anySanctuaryAvailable) + { + DesiredBlessingSet desired; + + auto const& priority = BASE_BLESSING_PRIORITIES[role]; + uint8 requestedCount = std::min(paladinCount, MAX_BLESSING_SLOTS); + + for (uint8 index = 0; + index < MAX_BLESSING_SLOTS && desired.count < requestedCount; + ++index) + { + BaseBlessingCategory category = priority.priorities[index]; + if (category == BASE_NONE) + continue; + + if (category == BASE_SANCTUARY && !anySanctuaryAvailable) + category = BASE_KINGS; + + if (category == BASE_NONE || desired.wants[BaseBlessingIndex(category)]) + continue; + + desired.ordered[desired.count++] = category; + desired.wants[BaseBlessingIndex(category)] = true; + } + + return desired; + } + + std::vector OrderedCommonBases( + std::vector const& classBuckets, + std::array const& commonBases) + { + std::vector ordered; + + for (PresentBucket const* bucket : classBuckets) + { + for (uint8 index = 0; index < bucket->desired.count; ++index) + { + BaseBlessingCategory category = bucket->desired.ordered[index]; + if (!commonBases[BaseBlessingIndex(category)]) + continue; + + if (std::find(ordered.begin(), ordered.end(), category) == ordered.end()) + ordered.push_back(category); + } + } + + return ordered; + } + + bool ComputeBestOwners( + std::vector const& categories, + std::vector const& botPaladins, + std::vector const& candidatePaladins, + std::vector& outOwners, + int* outScore = nullptr) + { + outOwners.clear(); + if (categories.empty()) + { + if (outScore) + *outScore = 0; + return true; + } + + std::vector currentOwners(categories.size(), -1); + std::vector bestOwners(categories.size(), -1); + std::vector used(candidatePaladins.size(), false); + int bestScore = std::numeric_limits::min(); + int bestTalentCost = std::numeric_limits::max(); + bool found = false; + + auto search = [&](auto&& self, size_t position, int score, int talentCost) -> void + { + if (position >= categories.size()) + { + if (!found || score > bestScore || + (score == bestScore && talentCost < bestTalentCost) || + (score == bestScore && + talentCost == bestTalentCost && + std::lexicographical_compare(currentOwners.begin(), currentOwners.end(), + bestOwners.begin(), bestOwners.end()))) + { + found = true; + bestScore = score; + bestTalentCost = talentCost; + bestOwners = currentOwners; + } + return; + } + + for (size_t candidateIndex = 0; + candidateIndex < candidatePaladins.size(); ++candidateIndex) + { + if (used[candidateIndex]) + continue; + + int paladinIndex = candidatePaladins[candidateIndex]; + int matchScore = TalentMatchScore(botPaladins[paladinIndex], categories[position]); + if (matchScore <= std::numeric_limits::min() / 8) + continue; + + used[candidateIndex] = true; + currentOwners[position] = paladinIndex; + self(self, position + 1, score + matchScore, + talentCost + TalentScore(botPaladins[paladinIndex])); + currentOwners[position] = -1; + used[candidateIndex] = false; + } + }; + + search(search, 0, 0, 0); + + if (!found) + return false; + + outOwners = std::move(bestOwners); + if (outScore) + *outScore = bestScore; + return true; + } + + struct ClassPlanPreference + { + std::array slotCoverage = {}; + std::array matchedSlotCoverage = {}; + uint8 commonCount = 0; + int ownerScore = std::numeric_limits::min(); + int commonTalentCost = std::numeric_limits::max(); + uint8 selectedMask = 0; + std::vector classWideOwners; + bool valid = false; + }; + + uint8 OrderedIndexForCategory(PresentBucket const* bucket, BaseBlessingCategory category) + { + for (uint8 index = 0; index < bucket->desired.count; ++index) + { + if (bucket->desired.ordered[index] == category) + return index; + } + + return MAX_BLESSING_SLOTS; + } + + bool IsBetterClassPlanPreference( + ClassPlanPreference const& candidate, ClassPlanPreference const& best) + { + if (!best.valid) + return true; + + for (uint8 index = 0; index < MAX_BLESSING_SLOTS; ++index) + { + if (candidate.slotCoverage[index] != best.slotCoverage[index]) + return candidate.slotCoverage[index] > best.slotCoverage[index]; + } + + for (uint8 index = 0; index < MAX_BLESSING_SLOTS; ++index) + { + if (candidate.matchedSlotCoverage[index] != best.matchedSlotCoverage[index]) + return candidate.matchedSlotCoverage[index] > best.matchedSlotCoverage[index]; + } + + if (candidate.commonCount != best.commonCount) + return candidate.commonCount > best.commonCount; + + if (candidate.ownerScore != best.ownerScore) + return candidate.ownerScore > best.ownerScore; + + if (candidate.commonTalentCost != best.commonTalentCost) + return candidate.commonTalentCost < best.commonTalentCost; + + if (std::lexicographical_compare(candidate.classWideOwners.begin(), + candidate.classWideOwners.end(), + best.classWideOwners.begin(), + best.classWideOwners.end())) + return true; + + return candidate.selectedMask < best.selectedMask; + } + + bool ComputeOwnersForClassPlan( + std::vector const& classWideBases, + std::vector> const& exclusiveBasesByBucket, + std::vector const& botPaladins, + std::vector const& allPaladins, + std::vector& outClassWideOwners, + std::vector>& outExclusiveOwnersByBucket, + int& outOwnerScore, + int& outCommonTalentCost) + { + outClassWideOwners.clear(); + outExclusiveOwnersByBucket.clear(); + outOwnerScore = std::numeric_limits::min(); + outCommonTalentCost = std::numeric_limits::max(); + + std::vector currentClassWideOwners(classWideBases.size(), -1); + std::vector bestClassWideOwners(classWideBases.size(), -1); + std::vector used(allPaladins.size(), false); + std::vector> bestExclusiveOwnersByBucket(exclusiveBasesByBucket.size()); + bool found = false; + + auto search = [&](auto&& self, size_t position, int commonScore, int commonTalentCost) -> void + { + if (position >= classWideBases.size()) + { + std::vector availablePaladins; + availablePaladins.reserve(allPaladins.size()); + for (size_t candidateIndex = 0; candidateIndex < allPaladins.size(); ++candidateIndex) + { + if (!used[candidateIndex]) + availablePaladins.push_back(allPaladins[candidateIndex]); + } + + int totalOwnerScore = commonScore; + std::vector> exclusiveOwnersByBucket(exclusiveBasesByBucket.size()); + for (size_t bucketIndex = 0; bucketIndex < exclusiveBasesByBucket.size(); ++bucketIndex) + { + int exclusiveScore = 0; + if (!ComputeBestOwners( + exclusiveBasesByBucket[bucketIndex], botPaladins, availablePaladins, + exclusiveOwnersByBucket[bucketIndex], &exclusiveScore)) + { + return; + } + + totalOwnerScore += exclusiveScore; + } + + if (!found || totalOwnerScore > outOwnerScore || + (totalOwnerScore == outOwnerScore && commonTalentCost < outCommonTalentCost) || + (totalOwnerScore == outOwnerScore && + commonTalentCost == outCommonTalentCost && + std::lexicographical_compare(currentClassWideOwners.begin(), currentClassWideOwners.end(), + bestClassWideOwners.begin(), bestClassWideOwners.end()))) + { + found = true; + outOwnerScore = totalOwnerScore; + outCommonTalentCost = commonTalentCost; + bestClassWideOwners = currentClassWideOwners; + bestExclusiveOwnersByBucket = std::move(exclusiveOwnersByBucket); + } + + return; + } + + for (size_t candidateIndex = 0; candidateIndex < allPaladins.size(); ++candidateIndex) + { + if (used[candidateIndex]) + continue; + + int const paladinIndex = allPaladins[candidateIndex]; + int const matchScore = TalentMatchScore(botPaladins[paladinIndex], classWideBases[position]); + if (matchScore <= std::numeric_limits::min() / 8) + continue; + + used[candidateIndex] = true; + currentClassWideOwners[position] = paladinIndex; + self(self, position + 1, commonScore + matchScore, + commonTalentCost + TalentScore(botPaladins[paladinIndex])); + currentClassWideOwners[position] = -1; + used[candidateIndex] = false; + } + }; + + search(search, 0, 0, 0); + + if (!found) + return false; + + outClassWideOwners = std::move(bestClassWideOwners); + outExclusiveOwnersByBucket = std::move(bestExclusiveOwnersByBucket); + return true; + } + + bool ComputeBestClassAssignments( + std::vector const& classBuckets, + std::vector const& botPaladins, + std::vector const& allPaladins, + std::vector& outClassWideOwners, + std::vector>& outExclusiveOwnersByBucket, + std::vector& outClassWideBases, + std::vector>& outExclusiveBasesByBucket) + { + outClassWideOwners.clear(); + outExclusiveOwnersByBucket.clear(); + outClassWideBases.clear(); + outExclusiveBasesByBucket.clear(); + + uint8 const categoryMaskLimit = + static_cast(1u << (static_cast(BASE_SANCTUARY) + 1u)); + uint8 commonUnionMask = 0; + ClassPlanPreference bestPreference; + std::vector bestClassWideOwners; + std::vector> bestExclusiveOwnersByBucket; + std::vector bestClassWideBases; + std::vector> bestExclusiveBasesByBucket; + + for (uint8 baseValue = BASE_MIGHT; baseValue <= BASE_SANCTUARY; ++baseValue) + { + BaseBlessingCategory category = static_cast(baseValue); + if (std::all_of(classBuckets.begin(), classBuckets.end(), + [&](PresentBucket const* bucket) + { + return bucket->desired.wants[BaseBlessingIndex(category)]; + })) + { + commonUnionMask |= static_cast(1u << static_cast(category)); + } + } + + for (uint8 promotedMask = 0; promotedMask < categoryMaskLimit; ++promotedMask) + { + if ((promotedMask & commonUnionMask) != promotedMask) + continue; + + ClassPlanPreference candidatePreference; + candidatePreference.selectedMask = promotedMask; + + std::vector> exclusiveBasesByBucket(classBuckets.size()); + + for (size_t bucketIndex = 0; bucketIndex < classBuckets.size(); ++bucketIndex) + { + PresentBucket const* bucket = classBuckets[bucketIndex]; + for (uint8 index = 0; index < bucket->desired.count; ++index) + { + BaseBlessingCategory category = bucket->desired.ordered[index]; + candidatePreference.slotCoverage[index] += bucket->memberCount; + + if (!(promotedMask & static_cast(1u << static_cast(category)))) + exclusiveBasesByBucket[bucketIndex].push_back(category); + } + } + + std::array promotedCommonBases = {}; + for (uint8 baseValue = BASE_MIGHT; baseValue <= BASE_SANCTUARY; ++baseValue) + { + BaseBlessingCategory category = static_cast(baseValue); + promotedCommonBases[BaseBlessingIndex(category)] = + (promotedMask & static_cast(1u << static_cast(category))) != 0; + } + + std::vector classWideBases = + OrderedCommonBases(classBuckets, promotedCommonBases); + + std::vector classWideOwners; + std::vector> exclusiveOwnersByBucket; + int ownerScore = 0; + int commonTalentCost = 0; + if (!ComputeOwnersForClassPlan( + classWideBases, exclusiveBasesByBucket, botPaladins, allPaladins, + classWideOwners, exclusiveOwnersByBucket, ownerScore, commonTalentCost)) + { + continue; + } + + candidatePreference.commonCount = static_cast(classWideBases.size()); + candidatePreference.ownerScore = ownerScore; + candidatePreference.commonTalentCost = commonTalentCost; + candidatePreference.classWideOwners = classWideOwners; + + for (size_t index = 0; index < classWideBases.size(); ++index) + { + Player* owner = botPaladins[classWideOwners[index]]; + BaseBlessingCategory category = classWideBases[index]; + if (TalentMatchScore(owner, category) <= 0) + continue; + + for (PresentBucket const* bucket : classBuckets) + { + uint8 orderedIndex = OrderedIndexForCategory(bucket, category); + if (orderedIndex >= MAX_BLESSING_SLOTS) + continue; + + candidatePreference.matchedSlotCoverage[orderedIndex] += bucket->memberCount; + } + } + + for (size_t bucketIndex = 0; bucketIndex < classBuckets.size(); ++bucketIndex) + { + PresentBucket const* bucket = classBuckets[bucketIndex]; + auto const& exclusiveBases = exclusiveBasesByBucket[bucketIndex]; + auto const& exclusiveOwners = exclusiveOwnersByBucket[bucketIndex]; + + for (size_t index = 0; index < exclusiveBases.size(); ++index) + { + Player* owner = botPaladins[exclusiveOwners[index]]; + BaseBlessingCategory category = exclusiveBases[index]; + if (TalentMatchScore(owner, category) <= 0) + continue; + + uint8 orderedIndex = OrderedIndexForCategory(bucket, category); + if (orderedIndex >= MAX_BLESSING_SLOTS) + continue; + + candidatePreference.matchedSlotCoverage[orderedIndex] += bucket->memberCount; + } + } + + candidatePreference.valid = true; + + if (!IsBetterClassPlanPreference(candidatePreference, bestPreference)) + continue; + + bestPreference = candidatePreference; + bestClassWideOwners = std::move(classWideOwners); + bestExclusiveOwnersByBucket = std::move(exclusiveOwnersByBucket); + bestClassWideBases = std::move(classWideBases); + bestExclusiveBasesByBucket = std::move(exclusiveBasesByBucket); + } + + if (!bestPreference.valid) + return false; + + outClassWideOwners = std::move(bestClassWideOwners); + outExclusiveOwnersByBucket = std::move(bestExclusiveOwnersByBucket); + outClassWideBases = std::move(bestClassWideBases); + outExclusiveBasesByBucket = std::move(bestExclusiveBasesByBucket); + return true; + } + + void AddUniqueAssignment( + std::vector& assignments, + CachedBlessingBucketAssignment const& assignment) + { + auto existing = std::find_if(assignments.begin(), assignments.end(), + [&](CachedBlessingBucketAssignment const& cachedAssignment) + { + return cachedAssignment.blessing == assignment.blessing && + IsSameBucket(cachedAssignment, assignment); + }); + + if (existing == assignments.end()) + assignments.push_back(assignment); + } + + bool ComputeGreaterBlessingAssignments( + PlayerbotAI* botAI, std::vector& outAssignments) + { + Player* bot = botAI->GetBot(); + Group* group = bot->GetGroup(); + if (!IsEligibleGroupForAutoBlessings(group)) + return false; + + std::vector botPaladins; + struct RaidMember + { + Player* player; + RoleProfile role; + }; + std::vector raidMembers; + + for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next()) + { + Player* player = ref->GetSource(); + if (!player || !player->IsInWorld()) + continue; + + if (player->getClass() == CLASS_PALADIN && GET_PLAYERBOT_AI(player)) + botPaladins.push_back(player); + + // Important: keep dead members in the assignment model so revive does + // not temporarily delete an entire blessing bucket from the cache. + raidMembers.push_back({player, ResolveRoleProfile(player)}); + } + + if (botPaladins.empty()) + return false; + + bool anySanctuaryAvailable = false; + for (Player* paladin : botPaladins) + { + if (paladin && paladin->HasSpell(ai::paladin::SPELL_BLESSING_OF_SANCTUARY)) + { + anySanctuaryAvailable = true; + break; + } + } + + std::sort(botPaladins.begin(), botPaladins.end(), + [](Player* a, Player* b) + { + int sa = TalentScore(a); + int sb = TalentScore(b); + if (sa != sb) + return sa > sb; + return a->GetGUID() < b->GetGUID(); + }); + + uint8 activePaladinCount = + std::min(static_cast(botPaladins.size()), MAX_BLESSING_SLOTS); + + int mySlot = -1; + for (size_t i = 0; i < botPaladins.size(); ++i) + { + if (botPaladins[i]->GetGUID() == bot->GetGUID()) + { + mySlot = static_cast(i); + break; + } + } + if (mySlot < 0 || mySlot >= activePaladinCount) + return false; + + std::vector buckets; + buckets.reserve(raidMembers.size()); + + for (auto const& member : raidMembers) + { + uint8 classId = member.player->getClass(); + if (classId >= MAX_CLASS_ID) + continue; + + PresentBucket bucket; + bucket.classId = classId; + bucket.role = member.role; + bucket.byRole = UsesRoleBucket(classId); + bucket.memberCount = 1; + bucket.desired = BuildDesiredBlessingSet( + member.role, activePaladinCount, anySanctuaryAvailable); + + if (!bucket.byRole) + bucket.role = ROLE_CASTER; + + if (!bucket.desired.count) + continue; + + auto existing = std::find_if(buckets.begin(), buckets.end(), + [&](PresentBucket const& other) + { + return other.classId == bucket.classId && + other.byRole == bucket.byRole && + (!bucket.byRole || other.role == bucket.role); + }); + + if (existing == buckets.end()) + buckets.push_back(bucket); + else + ++existing->memberCount; + } + + if (buckets.empty()) + return false; + + std::vector allPaladins; + allPaladins.reserve(activePaladinCount); + for (uint8 paladinIndex = 0; paladinIndex < activePaladinCount; ++paladinIndex) + allPaladins.push_back(paladinIndex); + + outAssignments.clear(); + + for (uint8 classId = 0; classId < MAX_CLASS_ID; ++classId) + { + std::vector classBuckets; + for (PresentBucket const& bucket : buckets) + { + if (bucket.classId == classId) + classBuckets.push_back(&bucket); + } + + if (classBuckets.empty()) + continue; + + std::vector classWideOwners; + std::vector> exclusiveOwnersByBucket; + std::vector classWideBases; + std::vector> exclusiveBasesByBucket; + if (!ComputeBestClassAssignments( + classBuckets, botPaladins, allPaladins, + classWideOwners, exclusiveOwnersByBucket, classWideBases, + exclusiveBasesByBucket)) + return false; + + for (size_t index = 0; index < classWideBases.size(); ++index) + { + if (classWideOwners[index] != mySlot) + continue; + + CachedBlessingBucketAssignment assignment; + assignment.classId = classId; + assignment.role = classBuckets.front()->role; + assignment.byRole = false; + assignment.blessing = ToGreaterVariant(classWideBases[index]); + AddUniqueAssignment(outAssignments, assignment); + } + + for (size_t bucketIndex = 0; bucketIndex < classBuckets.size(); ++bucketIndex) + { + PresentBucket const* bucket = classBuckets[bucketIndex]; + auto const& exclusiveBases = exclusiveBasesByBucket[bucketIndex]; + auto const& exclusiveOwners = exclusiveOwnersByBucket[bucketIndex]; + + for (size_t index = 0; index < exclusiveBases.size(); ++index) + { + if (exclusiveOwners[index] != mySlot) + continue; + + CachedBlessingBucketAssignment assignment; + assignment.classId = bucket->classId; + assignment.role = bucket->role; + assignment.byRole = true; + assignment.blessing = ToSingleVariant(exclusiveBases[index]); + AddUniqueAssignment(outAssignments, assignment); + } + } + } + + return !outAssignments.empty(); + } + + class GreaterBlessingAssignmentsValue : public CalculatedValue + { + public: + GreaterBlessingAssignmentsValue(PlayerbotAI* botAI) + : CalculatedValue( + botAI, "greater blessing assignments", GREATER_BLESSING_ASSIGNMENT_CACHE_MS) {} + + protected: + CachedBlessingAssignments Calculate() override + { + CachedBlessingAssignments cached; + + Player* bot = botAI->GetBot(); + Group* group = bot->GetGroup(); + cached.groupKey = group ? group->GetLeaderGUID().GetCounter() : 0; + + std::vector assignments; + if (!ComputeGreaterBlessingAssignments(botAI, assignments)) + return cached; + + cached.valid = true; + cached.assignments = std::move(assignments); + + return cached; + } + }; + +} + +UntypedValue* greater_blessing_assignments_value(PlayerbotAI* botAI) +{ + return new GreaterBlessingAssignmentsValue(botAI); +} + +bool IsEligibleGroupForAutoBlessings(Group const* group) +{ + if (!group) + return false; + + switch (sPlayerbotAIConfig.autoGreaterBlessings) + { + case AutoPartyBuffMode::RAID_ONLY: + return group->isRaidGroup(); + case AutoPartyBuffMode::GROUP_OR_RAID: + return true; + case AutoPartyBuffMode::DISABLED: + default: + return false; + } +} + +static bool HasMyExactBlessing(PlayerbotAI* botAI, Unit* target, BlessingType type) +{ + std::string name = BlessingSpellName(type); + if (name.empty()) + return false; + + return botAI->HasAura(name.c_str(), target, false, true); +} + +static int32 GetAuraStrength(Aura const* aura, AuraType auraType) +{ + if (!aura) + return 0; + + int32 amount = 0; + for (uint8 effect = 0; effect < MAX_SPELL_EFFECTS; ++effect) + { + AuraEffect* auraEffect = aura->GetEffect(effect); + if (!auraEffect || auraEffect->GetAuraType() != auraType) + continue; + + amount = std::max(amount, auraEffect->GetAmount()); + } + + return amount; +} + +static int32 GetExistingBlessingStrength( + PlayerbotAI* botAI, Unit* target, BaseBlessingCategory category) +{ + if (category != BASE_MIGHT && category != BASE_WISDOM) + return 0; + + AuraType auraType = + category == BASE_MIGHT ? SPELL_AURA_MOD_ATTACK_POWER : SPELL_AURA_MOD_POWER_REGEN; + int32 strongestAmount = 0; + + for (BlessingType type : {ToSingleVariant(category), ToGreaterVariant(category)}) + { + Aura* aura = botAI->GetAura(BlessingSpellName(type), target); + strongestAmount = std::max(strongestAmount, GetAuraStrength(aura, auraType)); + } + + return strongestAmount; +} + +static bool HasSameFamilyBlessing( + PlayerbotAI* botAI, Unit* target, BaseBlessingCategory category) +{ + for (BlessingType type : {ToSingleVariant(category), ToGreaterVariant(category)}) + { + if (botAI->HasAura(BlessingSpellName(type), target)) + return true; + } + + return false; +} + +static int32 GetBlessingCastStrength(Player* caster, BlessingType type, uint32 spellId) +{ + if (!caster || !spellId) + return 0; + + BaseBlessingCategory category = BaseBlessingOf(type); + if (category != BASE_MIGHT && category != BASE_WISDOM) + return 0; + + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + if (!spellInfo) + return 0; + + AuraType auraType = + category == BASE_MIGHT ? SPELL_AURA_MOD_ATTACK_POWER : SPELL_AURA_MOD_POWER_REGEN; + int32 amount = 0; + for (uint8 effect = 0; effect < MAX_SPELL_EFFECTS; ++effect) + { + if (spellInfo->Effects[effect].ApplyAuraName != auraType) + continue; + + amount = std::max(amount, spellInfo->Effects[effect].BasePoints + 1); + } + + if (amount <= 0) + return 0; + + switch (category) + { + case BASE_MIGHT: + if (caster->HasAura(SPELL_IMPROVED_MIGHT_R2)) + return amount * 125 / 100; + if (caster->HasAura(SPELL_IMPROVED_MIGHT_R1)) + return amount * 112 / 100; + break; + case BASE_WISDOM: + if (caster->HasAura(SPELL_IMPROVED_WISDOM_R2)) + return amount * 120 / 100; + if (caster->HasAura(SPELL_IMPROVED_WISDOM_R1)) + return amount * 110 / 100; + break; + default: + break; + } + + return amount; +} + +static bool HasEquivalentOrStrongerSameFamilyBlessing( + PlayerbotAI* botAI, Unit* target, BlessingType castType, uint32 spellId) +{ + BaseBlessingCategory category = BaseBlessingOf(castType); + if (category != BASE_MIGHT && category != BASE_WISDOM) + return HasSameFamilyBlessing(botAI, target, category); + + int32 castStrength = GetBlessingCastStrength(botAI->GetBot(), castType, spellId); + if (castStrength <= 0) + return false; + + return GetExistingBlessingStrength(botAI, target, category) >= castStrength; +} + +static bool MatchesBucket(Player* player, CachedBlessingBucketAssignment const& assignment) +{ + if (!player || player->getClass() != assignment.classId) + return false; + + return !assignment.byRole || ResolveRoleProfile(player) == assignment.role; +} + +static Player* FindMissingBlessingTarget( + PlayerbotAI* botAI, CachedBlessingBucketAssignment const& assignment, + BlessingType castType, uint32 spellId, std::string const& spellName) +{ + Player* bot = botAI->GetBot(); + Group* group = bot->GetGroup(); + if (!group) + return nullptr; + + for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next()) + { + Player* player = ref->GetSource(); + if (!player || !player->IsInWorld() || !player->IsAlive()) + continue; + + if (!(player->IsInSameGroupWith(bot) || player->IsInSameRaidWith(bot))) + continue; + + if (!MatchesBucket(player, assignment) || + HasMyExactBlessing(botAI, player, castType) || + HasEquivalentOrStrongerSameFamilyBlessing(botAI, player, castType, spellId) || + !botAI->CanCastSpell(spellName, player)) + { + continue; + } + + return player; + } + + return nullptr; +} + +static bool GetCachedAssignments( + AiObjectContext* context, Group* group, + std::vector& outAssignments) +{ + uint32 const groupKey = group ? group->GetLeaderGUID().GetCounter() : 0; + + Value* cacheValue = + context->GetValue("greater blessing assignments"); + if (!cacheValue) + return false; + + CachedBlessingAssignments cachedAssignments = cacheValue->Get(); + if (cachedAssignments.groupKey != groupKey) + { + cacheValue->Reset(); + cachedAssignments = cacheValue->Get(); + } + + if (!cachedAssignments.valid || cachedAssignments.groupKey != groupKey) + return false; + + outAssignments = cachedAssignments.assignments; + return true; +} + +static bool FindPendingAssignmentFromAssignments( + PlayerbotAI* botAI, + std::vector const& assignments, + GreaterBlessingPlayerAssignment& outAssignment, + std::string& outSpellName) +{ + Player* bot = botAI->GetBot(); + AiObjectContext* aiContext = botAI->GetAiObjectContext(); + if (!aiContext) + return false; + + for (auto const& assigned : assignments) + { + if (assigned.blessing == BLESSING_NONE) + continue; + + BlessingType castType = assigned.blessing; + std::string spellName = BlessingSpellName(castType); + if (spellName.empty()) + continue; + + if (IsGreaterVariant(castType)) + { + uint32 spellId = aiContext->GetValue("spell id", spellName)->Get(); + if (!spellId || !ai::buff::HasRequiredReagents(bot, spellId)) + { + castType = ToSingleVariant(castType); + spellName = BlessingSpellName(castType); + if (spellName.empty()) + continue; + } + } + + uint32 spellId = aiContext->GetValue("spell id", spellName)->Get(); + if (!spellId) + continue; + + Player* target = FindMissingBlessingTarget( + botAI, assigned, castType, spellId, spellName); + if (!target) + continue; + + outAssignment = {target, assigned.blessing}; + outSpellName = spellName; + return true; + } + + return false; +} + +class GreaterBlessingPendingAssignmentValue : public CalculatedValue +{ +public: + GreaterBlessingPendingAssignmentValue(PlayerbotAI* botAI) + : CalculatedValue( + botAI, "greater blessing pending assignment", + GREATER_BLESSING_PENDING_ASSIGNMENT_CACHE_MS) {} + +protected: + CachedPendingBlessingAssignment Calculate() override + { + CachedPendingBlessingAssignment cached; + + Player* bot = botAI->GetBot(); + Group* group = bot->GetGroup(); + cached.groupKey = group ? group->GetLeaderGUID().GetCounter() : 0; + + std::vector assignments; + if (!GetCachedAssignments(this->context, group, assignments)) + return cached; + + if (!FindPendingAssignmentFromAssignments( + botAI, assignments, cached.assignment, cached.spellName)) + { + return cached; + } + + cached.valid = true; + return cached; + } +}; + +UntypedValue* greater_blessing_pending_assignment_value(PlayerbotAI* botAI) +{ + return new GreaterBlessingPendingAssignmentValue(botAI); +} + +} + +CastGreaterBlessingAssignmentAction::CastGreaterBlessingAssignmentAction( + PlayerbotAI* botAI) : Action(botAI, "cast greater blessing assignment") {} + +bool CastGreaterBlessingAssignmentAction::isUseful() +{ + return ai::gbless::IsEligibleGroupForAutoBlessings(bot->GetGroup()); +} + +bool CastGreaterBlessingAssignmentAction::HasPendingAssignment() +{ + ai::gbless::GreaterBlessingPlayerAssignment assignment; + std::string spellName; + + return FindPendingAssignment(assignment, spellName); +} + +bool CastGreaterBlessingAssignmentAction::Execute(Event /*event*/) +{ + ai::gbless::GreaterBlessingPlayerAssignment assignment; + std::string spellName; + if (!FindPendingAssignment(assignment, spellName)) + return false; + + uint32 finalId = AI_VALUE2(uint32, "spell id", spellName); + if (!finalId) + return false; + + return botAI->CastSpell(spellName, assignment.player); +} + +bool CastGreaterBlessingAssignmentAction::FindPendingAssignment( + ai::gbless::GreaterBlessingPlayerAssignment& outAssignment, std::string& outSpellName) +{ + Group* group = bot->GetGroup(); + uint32 const groupKey = group ? group->GetLeaderGUID().GetCounter() : 0; + + Value* pendingValue = + context->GetValue("greater blessing pending assignment"); + if (!pendingValue) + return false; + + ai::gbless::CachedPendingBlessingAssignment pendingAssignment = pendingValue->Get(); + if (pendingAssignment.groupKey != groupKey) + { + pendingValue->Reset(); + pendingAssignment = pendingValue->Get(); + } + + if (!pendingAssignment.valid || pendingAssignment.groupKey != groupKey) + return false; + + outAssignment = pendingAssignment.assignment; + outSpellName = pendingAssignment.spellName; + return true; +} diff --git a/src/Ai/Class/Paladin/Actions/PaladinGreaterBlessingAction.h b/src/Ai/Class/Paladin/Actions/PaladinGreaterBlessingAction.h new file mode 100644 index 000000000..fa8c66d4a --- /dev/null +++ b/src/Ai/Class/Paladin/Actions/PaladinGreaterBlessingAction.h @@ -0,0 +1,267 @@ +/* + * Copyright (C) 2016+ AzerothCore , released under GNU AGPL v3 license, you may redistribute it + * and/or modify it under version 3 of the License, or (at your option), any later version. + */ + +#ifndef _PLAYERBOT_PALADINGREATERBLESSINGACTION_H +#define _PLAYERBOT_PALADINGREATERBLESSINGACTION_H + +#include +#include +#include + +#include "Action.h" +#include "AiFactory.h" +#include "Playerbots.h" +#include "SharedDefines.h" + +class UntypedValue; + +namespace ai::gbless +{ + enum RoleProfile : uint8 + { + ROLE_CASTER = 0, + ROLE_PHYSICAL_DPS = 1, + ROLE_HYBRID_DPS = 2, + ROLE_DRUID_TANK = 3, + ROLE_WARRIOR_DK_TANK = 4, + ROLE_PALADIN_TANK = 5, + + ROLE_PROFILE_COUNT = 6 + }; + + enum BlessingType : uint8 + { + BLESSING_NONE = 0, + BLESSING_MIGHT_SINGLE = 1, + BLESSING_MIGHT_GREATER = 2, + BLESSING_WISDOM_SINGLE = 3, + BLESSING_WISDOM_GREATER = 4, + BLESSING_KINGS_SINGLE = 5, + BLESSING_KINGS_GREATER = 6, + BLESSING_SANCTUARY_SINGLE = 7, + BLESSING_SANCTUARY_GREATER = 8 + }; + + enum BaseBlessingCategory : uint8 + { + BASE_NONE = 0, + BASE_MIGHT = 1, + BASE_WISDOM = 2, + BASE_KINGS = 3, + BASE_SANCTUARY = 4 + }; + + inline constexpr BaseBlessingCategory BaseBlessingOf(BlessingType type) + { + switch (type) + { + case BLESSING_MIGHT_SINGLE: + case BLESSING_MIGHT_GREATER: return BASE_MIGHT; + case BLESSING_WISDOM_SINGLE: + case BLESSING_WISDOM_GREATER: return BASE_WISDOM; + case BLESSING_KINGS_SINGLE: + case BLESSING_KINGS_GREATER: return BASE_KINGS; + case BLESSING_SANCTUARY_SINGLE: + case BLESSING_SANCTUARY_GREATER: return BASE_SANCTUARY; + default: return BASE_NONE; + } + } + + inline constexpr bool IsSingleVariant(BlessingType type) + { + return type == BLESSING_MIGHT_SINGLE || type == BLESSING_WISDOM_SINGLE || + type == BLESSING_KINGS_SINGLE || type == BLESSING_SANCTUARY_SINGLE; + } + + inline constexpr bool IsGreaterVariant(BlessingType type) + { + return type == BLESSING_MIGHT_GREATER || type == BLESSING_WISDOM_GREATER || + type == BLESSING_KINGS_GREATER || type == BLESSING_SANCTUARY_GREATER; + } + + inline constexpr BlessingType ToSingleVariant(BaseBlessingCategory category) + { + switch (category) + { + case BASE_MIGHT: return BLESSING_MIGHT_SINGLE; + case BASE_WISDOM: return BLESSING_WISDOM_SINGLE; + case BASE_KINGS: return BLESSING_KINGS_SINGLE; + case BASE_SANCTUARY: return BLESSING_SANCTUARY_SINGLE; + default: return BLESSING_NONE; + } + } + + inline constexpr BlessingType ToSingleVariant(BlessingType type) + { + return ToSingleVariant(BaseBlessingOf(type)); + } + + inline constexpr BlessingType ToGreaterVariant(BaseBlessingCategory category) + { + switch (category) + { + case BASE_MIGHT: return BLESSING_MIGHT_GREATER; + case BASE_WISDOM: return BLESSING_WISDOM_GREATER; + case BASE_KINGS: return BLESSING_KINGS_GREATER; + case BASE_SANCTUARY: return BLESSING_SANCTUARY_GREATER; + default: return BLESSING_NONE; + } + } + + inline constexpr BlessingType ToGreaterVariant(BlessingType type) + { + return ToGreaterVariant(BaseBlessingOf(type)); + } + + inline std::string BlessingSpellName(BlessingType type) + { + switch (type) + { + case BLESSING_MIGHT_SINGLE: return "blessing of might"; + case BLESSING_MIGHT_GREATER: return "greater blessing of might"; + case BLESSING_WISDOM_SINGLE: return "blessing of wisdom"; + case BLESSING_WISDOM_GREATER: return "greater blessing of wisdom"; + case BLESSING_KINGS_SINGLE: return "blessing of kings"; + case BLESSING_KINGS_GREATER: return "greater blessing of kings"; + case BLESSING_SANCTUARY_SINGLE: return "blessing of sanctuary"; + case BLESSING_SANCTUARY_GREATER: return "greater blessing of sanctuary"; + default: return ""; + } + } + + struct BaseBlessingPriorityEntry + { + BaseBlessingCategory priorities[4]; + }; + + inline constexpr BaseBlessingPriorityEntry BASE_BLESSING_PRIORITIES[ROLE_PROFILE_COUNT] = + { + // All casters + {{ BASE_KINGS, BASE_WISDOM, BASE_SANCTUARY, BASE_MIGHT }}, + // Physical DPS (no mana) + {{ BASE_MIGHT, BASE_KINGS, BASE_SANCTUARY, BASE_NONE }}, + // Hybrid DPS + {{ BASE_MIGHT, BASE_KINGS, BASE_WISDOM, BASE_SANCTUARY }}, + // Druid tanks + {{ BASE_KINGS, BASE_MIGHT, BASE_SANCTUARY, BASE_WISDOM, }}, + // Warrior and DK tanks + {{ BASE_KINGS, BASE_MIGHT, BASE_SANCTUARY, BASE_NONE }}, + // Paladin tanks + {{ BASE_SANCTUARY, BASE_MIGHT, BASE_WISDOM, BASE_KINGS }}, + }; + + constexpr uint32 SPELL_IMPROVED_MIGHT_R1 = 20042; + constexpr uint32 SPELL_IMPROVED_MIGHT_R2 = 20045; + constexpr uint32 SPELL_IMPROVED_WISDOM_R1 = 20244; + constexpr uint32 SPELL_IMPROVED_WISDOM_R2 = 20245; + + inline RoleProfile ResolveRoleProfile(Player* player) + { + if (!player) + return ROLE_CASTER; + + uint8 cls = player->getClass(); + int tab = AiFactory::GetPlayerSpecTab(player); + bool isTank = PlayerbotAI::IsTank(player); + + switch (cls) + { + case CLASS_WARRIOR: + if (isTank) + return ROLE_WARRIOR_DK_TANK; + return ROLE_PHYSICAL_DPS; + + case CLASS_DEATH_KNIGHT: + if (isTank) + return ROLE_WARRIOR_DK_TANK; + return ROLE_PHYSICAL_DPS; + + case CLASS_SHAMAN: + if (tab == SHAMAN_TAB_ENHANCEMENT) + return ROLE_HYBRID_DPS; + return ROLE_CASTER; + + case CLASS_PALADIN: + if (isTank) + return ROLE_PALADIN_TANK; + if (tab == PALADIN_TAB_HOLY) + return ROLE_CASTER; + return ROLE_HYBRID_DPS; + + case CLASS_DRUID: + if (tab == DRUID_TAB_FERAL) + return isTank ? ROLE_DRUID_TANK : ROLE_HYBRID_DPS; + return ROLE_CASTER; + + case CLASS_ROGUE: + return ROLE_PHYSICAL_DPS; + + case CLASS_HUNTER: + return ROLE_HYBRID_DPS; + + case CLASS_MAGE: + return ROLE_CASTER; + + case CLASS_WARLOCK: + return ROLE_CASTER; + + case CLASS_PRIEST: + return ROLE_CASTER; + + default: + return ROLE_CASTER; + } + } + + struct GreaterBlessingPlayerAssignment + { + Player* player = nullptr; + BlessingType blessing = BLESSING_NONE; + }; + + struct CachedBlessingBucketAssignment + { + uint8 classId = 0; + RoleProfile role = ROLE_CASTER; + bool byRole = false; + BlessingType blessing = BLESSING_NONE; + }; + + struct CachedBlessingAssignments + { + uint32 groupKey = 0; + bool valid = false; + std::vector assignments; + }; + + struct CachedPendingBlessingAssignment + { + uint32 groupKey = 0; + bool valid = false; + GreaterBlessingPlayerAssignment assignment; + std::string spellName; + }; + + UntypedValue* greater_blessing_assignments_value(PlayerbotAI* botAI); + UntypedValue* greater_blessing_pending_assignment_value(PlayerbotAI* botAI); + bool IsEligibleGroupForAutoBlessings(Group const* group); +} + +class CastGreaterBlessingAssignmentAction : public Action +{ +public: + CastGreaterBlessingAssignmentAction(PlayerbotAI* botAI); + + bool Execute(Event event) override; + bool isUseful() override; + bool HasPendingAssignment(); + +private: + bool FindPendingAssignment( + ai::gbless::GreaterBlessingPlayerAssignment& outAssignment, + std::string& outSpellName); +}; + +#endif diff --git a/src/Ai/Class/Paladin/PaladinAiObjectContext.cpp b/src/Ai/Class/Paladin/PaladinAiObjectContext.cpp index a58ede3f8..d15a79453 100644 --- a/src/Ai/Class/Paladin/PaladinAiObjectContext.cpp +++ b/src/Ai/Class/Paladin/PaladinAiObjectContext.cpp @@ -7,6 +7,7 @@ #include "DpsPaladinStrategy.h" #include "GenericPaladinNonCombatStrategy.h" +#include "PaladinGreaterBlessingAction.h" #include "HealPaladinStrategy.h" #include "NamedObjectContext.h" #include "OffhealRetPaladinStrategy.h" @@ -70,17 +71,17 @@ class PaladinBuffStrategyFactoryInternal : public NamedObjectContext public: PaladinBuffStrategyFactoryInternal() : NamedObjectContext(false, true) { - creators["bhealth"] = &PaladinBuffStrategyFactoryInternal::bhealth; - creators["bmana"] = &PaladinBuffStrategyFactoryInternal::bmana; - creators["bdps"] = &PaladinBuffStrategyFactoryInternal::bdps; - creators["bstats"] = &PaladinBuffStrategyFactoryInternal::bstats; + creators["bsanc"] = &PaladinBuffStrategyFactoryInternal::bsanc; + creators["bwisdom"] = &PaladinBuffStrategyFactoryInternal::bwisdom; + creators["bmight"] = &PaladinBuffStrategyFactoryInternal::bmight; + creators["bkings"] = &PaladinBuffStrategyFactoryInternal::bkings; } private: - static Strategy* bhealth(PlayerbotAI* botAI) { return new PaladinBuffHealthStrategy(botAI); } - static Strategy* bmana(PlayerbotAI* botAI) { return new PaladinBuffManaStrategy(botAI); } - static Strategy* bdps(PlayerbotAI* botAI) { return new PaladinBuffDpsStrategy(botAI); } - static Strategy* bstats(PlayerbotAI* botAI) { return new PaladinBuffStatsStrategy(botAI); } + static Strategy* bsanc(PlayerbotAI* botAI) { return new PaladinBuffHealthStrategy(botAI); } + static Strategy* bwisdom(PlayerbotAI* botAI) { return new PaladinBuffManaStrategy(botAI); } + static Strategy* bmight(PlayerbotAI* botAI) { return new PaladinBuffDpsStrategy(botAI); } + static Strategy* bkings(PlayerbotAI* botAI) { return new PaladinBuffStatsStrategy(botAI); } }; class PaladinCombatStrategyFactoryInternal : public NamedObjectContext @@ -154,6 +155,7 @@ public: creators["blessing of sanctuary on party"] = &PaladinTriggerFactoryInternal::blessing_of_sanctuary_on_party; creators["avenging wrath"] = &PaladinTriggerFactoryInternal::avenging_wrath; + creators["greater blessing needed"] = &PaladinTriggerFactoryInternal::greater_blessing_needed; } private: @@ -211,8 +213,8 @@ private: static Trigger* repentance_on_enemy_healer(PlayerbotAI* botAI) { return new RepentanceOnHealerTrigger(botAI); } static Trigger* repentance_on_snare_target(PlayerbotAI* botAI) { return new RepentanceSnareTrigger(botAI); } static Trigger* repentance_interrupt(PlayerbotAI* botAI) { return new RepentanceInterruptTrigger(botAI); } - static Trigger* beacon_of_light_on_main_tank(PlayerbotAI* ai) { return new BeaconOfLightOnMainTankTrigger(ai); } - static Trigger* sacred_shield_on_main_tank(PlayerbotAI* ai) { return new SacredShieldOnMainTankTrigger(ai); } + static Trigger* beacon_of_light_on_main_tank(PlayerbotAI* botAI) { return new BeaconOfLightOnMainTankTrigger(botAI); } + static Trigger* sacred_shield_on_main_tank(PlayerbotAI* botAI) { return new SacredShieldOnMainTankTrigger(botAI); } static Trigger* hand_of_freedom_on_party(PlayerbotAI* botAI) { return new HandOfFreedomOnPartyTrigger(botAI); } static Trigger* blessing_of_kings_on_party(PlayerbotAI* botAI) { return new BlessingOfKingsOnPartyTrigger(botAI); } @@ -227,6 +229,10 @@ private: } static Trigger* avenging_wrath(PlayerbotAI* botAI) { return new AvengingWrathTrigger(botAI); } + static Trigger* greater_blessing_needed(PlayerbotAI* botAI) + { + return new GreaterBlessingNeededTrigger(botAI); + } }; class PaladinAiObjectContextInternal : public NamedObjectContext @@ -316,6 +322,8 @@ public: creators["divine sacrifice"] = &PaladinAiObjectContextInternal::divine_sacrifice; creators["cancel divine sacrifice"] = &PaladinAiObjectContextInternal::cancel_divine_sacrifice; creators["hand of freedom on party"] = &PaladinAiObjectContextInternal::hand_of_freedom_on_party; + creators["cast greater blessing assignment"] = + &PaladinAiObjectContextInternal::cast_greater_blessing_assignment; } private: @@ -414,15 +422,41 @@ private: static Action* sanctity_aura(PlayerbotAI* botAI) { return new CastSanctityAuraAction(botAI); } static Action* holy_shock(PlayerbotAI* botAI) { return new CastHolyShockAction(botAI); } static Action* holy_shock_on_party(PlayerbotAI* botAI) { return new CastHolyShockOnPartyAction(botAI); } - static Action* divine_plea(PlayerbotAI* ai) { return new CastDivinePleaAction(ai); } - static Action* shield_of_righteousness(PlayerbotAI* ai) { return new ShieldOfRighteousnessAction(ai); } - static Action* beacon_of_light_on_main_tank(PlayerbotAI* ai) { return new CastBeaconOfLightOnMainTankAction(ai); } - static Action* sacred_shield_on_main_tank(PlayerbotAI* ai) { return new CastSacredShieldOnMainTankAction(ai); } - static Action* avenging_wrath(PlayerbotAI* ai) { return new CastAvengingWrathAction(ai); } - static Action* divine_illumination(PlayerbotAI* ai) { return new CastDivineIlluminationAction(ai); } - static Action* divine_sacrifice(PlayerbotAI* ai) { return new CastDivineSacrificeAction(ai); } - static Action* cancel_divine_sacrifice(PlayerbotAI* ai) { return new CastCancelDivineSacrificeAction(ai); } - static Action* hand_of_freedom_on_party(PlayerbotAI* ai) { return new CastHandOfFreedomOnPartyAction(ai); } + static Action* divine_plea(PlayerbotAI* botAI) { return new CastDivinePleaAction(botAI); } + static Action* shield_of_righteousness(PlayerbotAI* botAI) { return new ShieldOfRighteousnessAction(botAI); } + static Action* beacon_of_light_on_main_tank(PlayerbotAI* botAI) { return new CastBeaconOfLightOnMainTankAction(botAI); } + static Action* sacred_shield_on_main_tank(PlayerbotAI* botAI) { return new CastSacredShieldOnMainTankAction(botAI); } + static Action* avenging_wrath(PlayerbotAI* botAI) { return new CastAvengingWrathAction(botAI); } + static Action* divine_illumination(PlayerbotAI* botAI) { return new CastDivineIlluminationAction(botAI); } + static Action* divine_sacrifice(PlayerbotAI* botAI) { return new CastDivineSacrificeAction(botAI); } + static Action* cancel_divine_sacrifice(PlayerbotAI* botAI) { return new CastCancelDivineSacrificeAction(botAI); } + static Action* hand_of_freedom_on_party(PlayerbotAI* botAI) { return new CastHandOfFreedomOnPartyAction(botAI); } + static Action* cast_greater_blessing_assignment(PlayerbotAI* botAI) + { + return new CastGreaterBlessingAssignmentAction(botAI); + } +}; + +class PaladinValueContextInternal : public NamedObjectContext +{ +public: + PaladinValueContextInternal() + { + creators["greater blessing assignments"] = &PaladinValueContextInternal::greater_blessing_assignments; + creators["greater blessing pending assignment"] = + &PaladinValueContextInternal::greater_blessing_pending_assignment; + } + +private: + static UntypedValue* greater_blessing_assignments(PlayerbotAI* botAI) + { + return ai::gbless::greater_blessing_assignments_value(botAI); + } + + static UntypedValue* greater_blessing_pending_assignment(PlayerbotAI* botAI) + { + return ai::gbless::greater_blessing_pending_assignment_value(botAI); + } }; SharedNamedObjectContextList PaladinAiObjectContext::sharedStrategyContexts; @@ -467,4 +501,5 @@ void PaladinAiObjectContext::BuildSharedTriggerContexts(SharedNamedObjectContext void PaladinAiObjectContext::BuildSharedValueContexts(SharedNamedObjectContextList& valueContexts) { AiObjectContext::BuildSharedValueContexts(valueContexts); + valueContexts.Add(new PaladinValueContextInternal()); } diff --git a/src/Ai/Class/Paladin/Util/PaladinHelper.h b/src/Ai/Class/Paladin/PaladinHelper.h similarity index 89% rename from src/Ai/Class/Paladin/Util/PaladinHelper.h rename to src/Ai/Class/Paladin/PaladinHelper.h index 64b88b731..8e9a155f7 100644 --- a/src/Ai/Class/Paladin/Util/PaladinHelper.h +++ b/src/Ai/Class/Paladin/PaladinHelper.h @@ -18,6 +18,8 @@ static constexpr uint32 SPELL_HAND_OF_PROTECTION = 1022; static constexpr uint32 SPELL_HAND_OF_SALVATION = 1038; static constexpr uint32 SPELL_HAND_OF_FREEDOM = 1044; static constexpr uint32 SPELL_HAND_OF_SACRIFICE = 6940; +static constexpr uint32 SPELL_BLESSING_OF_SANCTUARY = 20911; +static constexpr uint32 SPELL_GREATER_BLESSING_OF_SANCTUARY = 25899; inline bool HasHandFromCaster(Unit* target, Player* caster, std::initializer_list spellIds) { diff --git a/src/Ai/Class/Paladin/Trigger/PaladinTriggers.cpp b/src/Ai/Class/Paladin/PaladinTriggers.cpp similarity index 61% rename from src/Ai/Class/Paladin/Trigger/PaladinTriggers.cpp rename to src/Ai/Class/Paladin/PaladinTriggers.cpp index 46a2d8a94..79459b682 100644 --- a/src/Ai/Class/Paladin/Trigger/PaladinTriggers.cpp +++ b/src/Ai/Class/Paladin/PaladinTriggers.cpp @@ -5,10 +5,11 @@ #include "PaladinTriggers.h" +#include "GenericBuffUtils.h" +#include "PaladinGreaterBlessingAction.h" #include "PaladinActions.h" -#include "PlayerbotAIConfig.h" -#include "Playerbots.h" #include "PaladinHelper.h" +#include "Playerbots.h" bool SealTrigger::IsActive() { @@ -28,8 +29,9 @@ bool CrusaderAuraTrigger::IsActive() bool BlessingTrigger::IsActive() { Unit* target = GetTarget(); - return SpellTrigger::IsActive() && !botAI->HasAnyAuraOf(target, "blessing of might", "blessing of wisdom", - "blessing of kings", "blessing of sanctuary", nullptr); + return SpellTrigger::IsActive() && + !botAI->HasAnyAuraOf(target, "blessing of might", "blessing of wisdom", + "blessing of kings", "blessing of sanctuary", nullptr); } bool DivineShieldLowHealthTrigger::IsActive() @@ -62,7 +64,8 @@ bool HandOfFreedomOnPartyTrigger::IsActive() if (!target) return false; - if (target != bot && bot->GetExactDist2dSq(target->GetPositionX(), target->GetPositionY()) > 30.0f * 30.0f) + if (target != bot && + bot->GetExactDist2dSq(target->GetPositionX(), target->GetPositionY()) > 30.0f * 30.0f) return false; if (!botAI->CanCastSpell("hand of freedom", target)) @@ -75,3 +78,29 @@ bool NotSensingUndeadTrigger::IsActive() { return !botAI->HasAura("sense undead", bot); } + +bool GreaterBlessingNeededTrigger::IsActive() +{ + if (!ai::gbless::IsEligibleGroupForAutoBlessings(bot->GetGroup())) + return false; + + if (ai::buff::ShouldDeferGreaterBlessingAssignmentForRecentLogin(bot)) + return false; + + Group* group = bot->GetGroup(); + uint32 const groupKey = group ? group->GetLeaderGUID().GetCounter() : 0; + + Value* pendingValue = + context->GetValue("greater blessing pending assignment"); + if (!pendingValue) + return false; + + ai::gbless::CachedPendingBlessingAssignment pendingAssignment = pendingValue->Get(); + if (pendingAssignment.groupKey != groupKey) + { + pendingValue->Reset(); + pendingAssignment = pendingValue->Get(); + } + + return pendingAssignment.valid && pendingAssignment.groupKey == groupKey; +} diff --git a/src/Ai/Class/Paladin/Trigger/PaladinTriggers.h b/src/Ai/Class/Paladin/PaladinTriggers.h similarity index 82% rename from src/Ai/Class/Paladin/Trigger/PaladinTriggers.h rename to src/Ai/Class/Paladin/PaladinTriggers.h index d11c8024f..28f4d75cb 100644 --- a/src/Ai/Class/Paladin/Trigger/PaladinTriggers.h +++ b/src/Ai/Class/Paladin/PaladinTriggers.h @@ -13,32 +13,6 @@ class PlayerbotAI; -inline std::string const GetActualBlessingOfMight(Unit* target) -{ - switch (target->getClass()) - { - case CLASS_MAGE: - case CLASS_PRIEST: - case CLASS_WARLOCK: - return "blessing of wisdom"; - } - - return "blessing of might"; -} - -inline std::string const GetActualBlessingOfWisdom(Unit* target) -{ - switch (target->getClass()) - { - case CLASS_WARRIOR: - case CLASS_ROGUE: - case CLASS_DEATH_KNIGHT: - return "blessing of might"; - } - - return "blessing of wisdom"; -} - BUFF_TRIGGER(HolyShieldTrigger, "holy shield"); BUFF_TRIGGER(RighteousFuryTrigger, "righteous fury"); @@ -212,42 +186,55 @@ DEBUFF_TRIGGER(AvengerShieldTrigger, "avenger's shield"); class BeaconOfLightOnMainTankTrigger : public BuffOnMainTankTrigger { public: - BeaconOfLightOnMainTankTrigger(PlayerbotAI* ai) - : BuffOnMainTankTrigger(ai, "beacon of light", true) {} + BeaconOfLightOnMainTankTrigger(PlayerbotAI* botAI) + : BuffOnMainTankTrigger(botAI, "beacon of light", true) {} }; class SacredShieldOnMainTankTrigger : public BuffOnMainTankTrigger { public: - SacredShieldOnMainTankTrigger(PlayerbotAI* ai) : BuffOnMainTankTrigger(ai, "sacred shield", false) {} + SacredShieldOnMainTankTrigger(PlayerbotAI* botAI) + : BuffOnMainTankTrigger(botAI, "sacred shield", false) {} }; -class BlessingOfKingsOnPartyTrigger : public BuffOnPartyTrigger +class BlessingOfKingsOnPartyTrigger : public BlessingOnPartyTrigger { public: BlessingOfKingsOnPartyTrigger(PlayerbotAI* botAI) - : BuffOnPartyTrigger(botAI, "blessing of kings", 2 * 2000) {} + : BlessingOnPartyTrigger(botAI) + { + spell = "blessing of kings"; + } }; -class BlessingOfWisdomOnPartyTrigger : public BuffOnPartyTrigger +class BlessingOfWisdomOnPartyTrigger : public BlessingOnPartyTrigger { public: BlessingOfWisdomOnPartyTrigger(PlayerbotAI* botAI) - : BuffOnPartyTrigger(botAI, "blessing of might,blessing of wisdom", 2 * 2000) {} + : BlessingOnPartyTrigger(botAI) + { + spell = "blessing of might,blessing of wisdom"; + } }; -class BlessingOfMightOnPartyTrigger : public BuffOnPartyTrigger +class BlessingOfMightOnPartyTrigger : public BlessingOnPartyTrigger { public: BlessingOfMightOnPartyTrigger(PlayerbotAI* botAI) - : BuffOnPartyTrigger(botAI, "blessing of might,blessing of wisdom", 2 * 2000) {} + : BlessingOnPartyTrigger(botAI) + { + spell = "blessing of might,blessing of wisdom"; + } }; -class BlessingOfSanctuaryOnPartyTrigger : public BuffOnPartyTrigger +class BlessingOfSanctuaryOnPartyTrigger : public BlessingOnPartyTrigger { public: BlessingOfSanctuaryOnPartyTrigger(PlayerbotAI* botAI) - : BuffOnPartyTrigger(botAI, "blessing of sanctuary", 2 * 2000) {} + : BlessingOnPartyTrigger(botAI) + { + spell = "blessing of sanctuary"; + } }; class HandOfFreedomOnPartyTrigger : public Trigger @@ -266,4 +253,13 @@ public: AvengingWrathTrigger(PlayerbotAI* botAI) : BoostTrigger(botAI, "avenging wrath") {} }; +class GreaterBlessingNeededTrigger : public Trigger +{ +public: + GreaterBlessingNeededTrigger(PlayerbotAI* botAI) + : Trigger(botAI, "greater blessing needed", 4) {} + + bool IsActive() override; +}; + #endif diff --git a/src/Ai/Class/Paladin/Strategy/GenericPaladinNonCombatStrategy.cpp b/src/Ai/Class/Paladin/Strategy/GenericPaladinNonCombatStrategy.cpp index 84f449813..5b3e697d6 100644 --- a/src/Ai/Class/Paladin/Strategy/GenericPaladinNonCombatStrategy.cpp +++ b/src/Ai/Class/Paladin/Strategy/GenericPaladinNonCombatStrategy.cpp @@ -30,4 +30,7 @@ void GenericPaladinNonCombatStrategy::InitTriggers(std::vector& tr triggers.push_back(new TriggerNode("often", { NextAction("apply oil", ACTION_IDLE + 1.0f) })); if (specTab == PALADIN_TAB_PROTECTION || specTab == PALADIN_TAB_RETRIBUTION) triggers.push_back(new TriggerNode("often", { NextAction("apply stone", ACTION_IDLE + 1.0f) })); + + triggers.push_back(new TriggerNode("greater blessing needed", + { NextAction("cast greater blessing assignment", ACTION_NORMAL) })); } diff --git a/src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.h b/src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.h index 25f8886a3..e3866d6f6 100644 --- a/src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.h +++ b/src/Ai/Class/Paladin/Strategy/PaladinBuffStrategies.h @@ -16,7 +16,7 @@ public: PaladinBuffManaStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} void InitTriggers(std::vector& triggers) override; - std::string const getName() override { return "bmana"; } + std::string const getName() override { return "bwisdom"; } }; class PaladinBuffHealthStrategy : public Strategy @@ -25,7 +25,7 @@ public: PaladinBuffHealthStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} void InitTriggers(std::vector& triggers) override; - std::string const getName() override { return "bhealth"; } + std::string const getName() override { return "bsanc"; } }; class PaladinBuffDpsStrategy : public Strategy @@ -34,7 +34,7 @@ public: PaladinBuffDpsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} void InitTriggers(std::vector& triggers) override; - std::string const getName() override { return "bdps"; } + std::string const getName() override { return "bmight"; } }; class PaladinBuffArmorStrategy : public Strategy @@ -88,7 +88,7 @@ public: PaladinBuffStatsStrategy(PlayerbotAI* botAI) : Strategy(botAI) {} void InitTriggers(std::vector& triggers) override; - std::string const getName() override { return "bstats"; } + std::string const getName() override { return "bkings"; } }; class PaladinShadowResistanceStrategy : public Strategy diff --git a/src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.cpp b/src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.cpp index b76116e04..39d67e14e 100644 --- a/src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.cpp +++ b/src/Ai/Class/Paladin/Strategy/TankPaladinStrategy.cpp @@ -95,13 +95,14 @@ void TankPaladinStrategy::InitTriggers(std::vector& triggers) } ) ); - triggers.push_back(new TriggerNode( - "light aoe", - { - NextAction("avenger's shield", ACTION_HIGH + 5) - } - ) -); + triggers.push_back( + new TriggerNode( + "light aoe", + { + NextAction("avenger's shield", ACTION_HIGH + 5) + } + ) + ); triggers.push_back( new TriggerNode( "medium aoe", @@ -122,13 +123,6 @@ void TankPaladinStrategy::InitTriggers(std::vector& triggers) triggers.push_back( new TriggerNode( "medium health", - { NextAction("holy shield", ACTION_HIGH + 4) - } - ) - ); - triggers.push_back( - new TriggerNode( - "low health", { NextAction("holy shield", ACTION_HIGH + 4) } @@ -136,20 +130,12 @@ void TankPaladinStrategy::InitTriggers(std::vector& triggers) ); triggers.push_back( new TriggerNode( - "critical health", + "avenging wrath", { - NextAction("holy shield", ACTION_HIGH + 4) + NextAction("avenging wrath", ACTION_HIGH + 2) } ) ); - triggers.push_back( - new TriggerNode( - "avenging wrath", - { - NextAction("avenging wrath", ACTION_HIGH + 2) - } - ) -); triggers.push_back( new TriggerNode( "target critical health", diff --git a/src/Ai/Class/Priest/Action/PriestActions.cpp b/src/Ai/Class/Priest/PriestActions.cpp similarity index 100% rename from src/Ai/Class/Priest/Action/PriestActions.cpp rename to src/Ai/Class/Priest/PriestActions.cpp diff --git a/src/Ai/Class/Priest/Action/PriestActions.h b/src/Ai/Class/Priest/PriestActions.h similarity index 86% rename from src/Ai/Class/Priest/Action/PriestActions.h rename to src/Ai/Class/Priest/PriestActions.h index 4e94f27cc..1a6ded139 100644 --- a/src/Ai/Class/Priest/Action/PriestActions.h +++ b/src/Ai/Class/Priest/PriestActions.h @@ -13,9 +13,19 @@ class PlayerbotAI; // disc -BUFF_ACTION(CastPowerWordFortitudeAction, "power word: fortitude"); -BUFF_PARTY_ACTION(CastPowerWordFortitudeOnPartyAction, "power word: fortitude"); -BUFF_PARTY_ACTION(CastPrayerOfFortitudeOnPartyAction, "prayer of fortitude"); +class CastPowerWordFortitudeAction : public GroupBuffSpellAction +{ +public: + CastPowerWordFortitudeAction(PlayerbotAI* botAI) + : GroupBuffSpellAction(botAI, "power word: fortitude") {} +}; + +class CastPowerWordFortitudeOnPartyAction : public GroupBuffOnPartyAction +{ +public: + CastPowerWordFortitudeOnPartyAction(PlayerbotAI* botAI) + : GroupBuffOnPartyAction(botAI, "power word: fortitude") {} +}; BUFF_ACTION(CastPowerWordShieldAction, "power word: shield"); BUFF_ACTION(CastInnerFireAction, "inner fire"); @@ -26,9 +36,19 @@ CC_ACTION(CastShackleUndeadAction, "shackle undead"); SPELL_ACTION_U(CastManaBurnAction, "mana burn", AI_VALUE2(uint8, "mana", "self target") < 50 && AI_VALUE2(uint8, "mana", "current target") >= 20); BUFF_ACTION(CastLevitateAction, "levitate"); -BUFF_ACTION(CastDivineSpiritAction, "divine spirit"); -BUFF_PARTY_ACTION(CastDivineSpiritOnPartyAction, "divine spirit"); -BUFF_PARTY_ACTION(CastPrayerOfSpiritOnPartyAction, "prayer of spirit"); +class CastDivineSpiritAction : public GroupBuffSpellAction +{ +public: + CastDivineSpiritAction(PlayerbotAI* botAI) + : GroupBuffSpellAction(botAI, "divine spirit") {} +}; + +class CastDivineSpiritOnPartyAction : public GroupBuffOnPartyAction +{ +public: + CastDivineSpiritOnPartyAction(PlayerbotAI* botAI) + : GroupBuffOnPartyAction(botAI, "divine spirit") {} +}; // disc 2.4.3 SPELL_ACTION(CastMassDispelAction, "mass dispel"); @@ -103,13 +123,23 @@ SPELL_ACTION(CastMindBlastAction, "mind blast"); SPELL_ACTION(CastPsychicScreamAction, "psychic scream"); DEBUFF_ACTION(CastMindSootheAction, "mind soothe"); BUFF_ACTION_U(CastFadeAction, "fade", bot->GetGroup()); -BUFF_ACTION(CastShadowProtectionAction, "shadow protection"); -BUFF_PARTY_ACTION(CastShadowProtectionOnPartyAction, "shadow protection"); -BUFF_PARTY_ACTION(CastPrayerOfShadowProtectionAction, "prayer of shadow protection"); +class CastShadowProtectionAction : public GroupBuffSpellAction +{ +public: + CastShadowProtectionAction(PlayerbotAI* botAI) + : GroupBuffSpellAction(botAI, "shadow protection") {} +}; + +class CastShadowProtectionOnPartyAction : public GroupBuffOnPartyAction +{ +public: + CastShadowProtectionOnPartyAction(PlayerbotAI* botAI) + : GroupBuffOnPartyAction(botAI, "shadow protection") {} +}; // shadow talents SPELL_ACTION(CastMindFlayAction, "mind flay"); -DEBUFF_ACTION(CastVampiricEmbraceAction, "vampiric embrace"); +BUFF_ACTION(CastVampiricEmbraceAction, "vampiric embrace"); BUFF_ACTION(CastShadowformAction, "shadowform"); SPELL_ACTION(CastSilenceAction, "silence"); ENEMY_HEALER_ACTION(CastSilenceOnEnemyHealerAction, "silence"); diff --git a/src/Ai/Class/Priest/PriestAiObjectContext.cpp b/src/Ai/Class/Priest/PriestAiObjectContext.cpp index 7ffac96cc..0187f8381 100644 --- a/src/Ai/Class/Priest/PriestAiObjectContext.cpp +++ b/src/Ai/Class/Priest/PriestAiObjectContext.cpp @@ -92,8 +92,6 @@ public: creators["shadow protection"] = &PriestTriggerFactoryInternal::shadow_protection; creators["shadow protection on party"] = &PriestTriggerFactoryInternal::shadow_protection_on_party; creators["shackle undead"] = &PriestTriggerFactoryInternal::shackle_undead; - creators["prayer of fortitude on party"] = &PriestTriggerFactoryInternal::prayer_of_fortitude_on_party; - creators["prayer of spirit on party"] = &PriestTriggerFactoryInternal::prayer_of_spirit_on_party; creators["holy fire"] = &PriestTriggerFactoryInternal::holy_fire; creators["touch of weakness"] = &PriestTriggerFactoryInternal::touch_of_weakness; creators["hex of weakness"] = &PriestTriggerFactoryInternal::hex_of_weakness; @@ -136,8 +134,6 @@ private: static Trigger* shadow_protection_on_party(PlayerbotAI* botAI) { return new ShadowProtectionOnPartyTrigger(botAI); } static Trigger* shadow_protection(PlayerbotAI* botAI) { return new ShadowProtectionTrigger(botAI); } static Trigger* shackle_undead(PlayerbotAI* botAI) { return new ShackleUndeadTrigger(botAI); } - static Trigger* prayer_of_fortitude_on_party(PlayerbotAI* botAI) { return new PrayerOfFortitudeTrigger(botAI); } - static Trigger* prayer_of_spirit_on_party(PlayerbotAI* botAI) { return new PrayerOfSpiritTrigger(botAI); } static Trigger* feedback(PlayerbotAI* botAI) { return new FeedbackTrigger(botAI); } static Trigger* fear_ward(PlayerbotAI* botAI) { return new FearWardTrigger(botAI); } static Trigger* shadowguard(PlayerbotAI* botAI) { return new ShadowguardTrigger(botAI); } @@ -207,8 +203,6 @@ public: creators["shadow protection"] = &PriestAiObjectContextInternal::shadow_protection; creators["shadow protection on party"] = &PriestAiObjectContextInternal::shadow_protection_on_party; creators["shackle undead"] = &PriestAiObjectContextInternal::shackle_undead; - creators["prayer of fortitude on party"] = &PriestAiObjectContextInternal::prayer_of_fortitude_on_party; - creators["prayer of spirit on party"] = &PriestAiObjectContextInternal::prayer_of_spirit_on_party; creators["power infusion on party"] = &PriestAiObjectContextInternal::power_infusion_on_party; creators["silence"] = &PriestAiObjectContextInternal::silence; creators["silence on enemy healer"] = &PriestAiObjectContextInternal::silence_on_enemy_healer; @@ -311,11 +305,6 @@ private: static Action* fade(PlayerbotAI* botAI) { return new CastFadeAction(botAI); } static Action* inner_fire(PlayerbotAI* botAI) { return new CastInnerFireAction(botAI); } static Action* shackle_undead(PlayerbotAI* botAI) { return new CastShackleUndeadAction(botAI); } - static Action* prayer_of_spirit_on_party(PlayerbotAI* botAI) { return new CastPrayerOfSpiritOnPartyAction(botAI); } - static Action* prayer_of_fortitude_on_party(PlayerbotAI* botAI) - { - return new CastPrayerOfFortitudeOnPartyAction(botAI); - } static Action* feedback(PlayerbotAI* botAI) { return new CastFeedbackAction(botAI); } static Action* elunes_grace(PlayerbotAI* botAI) { return new CastElunesGraceAction(botAI); } static Action* starshards(PlayerbotAI* botAI) { return new CastStarshardsAction(botAI); } diff --git a/src/Ai/Class/Priest/Trigger/PriestTriggers.cpp b/src/Ai/Class/Priest/PriestTriggers.cpp similarity index 59% rename from src/Ai/Class/Priest/Trigger/PriestTriggers.cpp rename to src/Ai/Class/Priest/PriestTriggers.cpp index 7f61ba6ee..ff108a9e1 100644 --- a/src/Ai/Class/Priest/Trigger/PriestTriggers.cpp +++ b/src/Ai/Class/Priest/PriestTriggers.cpp @@ -8,10 +8,9 @@ #include "Player.h" #include "Playerbots.h" -bool PowerWordFortitudeOnPartyTrigger::IsActive() +bool ShadowProtectionTrigger::IsActive() { - return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("power word : fortitude", GetTarget()) && - !botAI->HasAura("prayer of fortitude", GetTarget()); + return BuffTrigger::IsActive() && !botAI->HasAura("prayer of shadow protection", GetTarget()); } bool PowerWordFortitudeTrigger::IsActive() @@ -20,43 +19,12 @@ bool PowerWordFortitudeTrigger::IsActive() !botAI->HasAura("prayer of fortitude", GetTarget()); } -bool DivineSpiritOnPartyTrigger::IsActive() -{ - return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("divine spirit", GetTarget()) && - !botAI->HasAura("prayer of spirit", GetTarget()); -} - bool DivineSpiritTrigger::IsActive() { return BuffTrigger::IsActive() && !botAI->HasAura("divine spirit", GetTarget()) && !botAI->HasAura("prayer of spirit", GetTarget()); } -bool PrayerOfFortitudeTrigger::IsActive() -{ - Unit* target = GetTarget(); - if (!target || !target->IsPlayer()) - return false; - - return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("prayer of fortitude", GetTarget()) && - botAI->GetBot()->IsInSameGroupWith((Player*)GetTarget()) && - botAI->GetBuffedCount((Player*)GetTarget(), "prayer of fortitude") < 4 && - !botAI->GetBuffedCount((Player*)GetTarget(), "power word: fortitude"); -} - -bool PrayerOfSpiritTrigger::IsActive() -{ - Unit* target = GetTarget(); - if (!target || !target->IsPlayer()) - return false; - - return BuffOnPartyTrigger::IsActive() && !botAI->HasAura("prayer of spirit", GetTarget()) && - botAI->GetBot()->IsInSameGroupWith((Player*)GetTarget()) && - // botAI->GetManaPercent() > 50 && - botAI->GetBuffedCount((Player*)GetTarget(), "prayer of spirit") < 4 && - !botAI->GetBuffedCount((Player*)GetTarget(), "divine spirit"); -} - bool InnerFireTrigger::IsActive() { Unit* target = GetTarget(); diff --git a/src/Ai/Class/Priest/Trigger/PriestTriggers.h b/src/Ai/Class/Priest/PriestTriggers.h similarity index 73% rename from src/Ai/Class/Priest/Trigger/PriestTriggers.h rename to src/Ai/Class/Priest/PriestTriggers.h index 5ae91985d..fc5b1f8cc 100644 --- a/src/Ai/Class/Priest/Trigger/PriestTriggers.h +++ b/src/Ai/Class/Priest/PriestTriggers.h @@ -27,8 +27,6 @@ BUFF_TRIGGER_A(InnerFireTrigger, "inner fire"); BUFF_TRIGGER_A(ShadowformTrigger, "shadowform"); BOOST_TRIGGER(PowerInfusionTrigger, "power infusion"); BUFF_TRIGGER(InnerFocusTrigger, "inner focus"); -BUFF_TRIGGER(ShadowProtectionTrigger, "shadow protection"); -BUFF_PARTY_TRIGGER(ShadowProtectionOnPartyTrigger, "shadow protection"); CC_TRIGGER(ShackleUndeadTrigger, "shackle undead"); INTERRUPT_TRIGGER(SilenceTrigger, "silence"); INTERRUPT_HEALER_TRIGGER(SilenceEnemyHealerTrigger, "silence"); @@ -44,20 +42,34 @@ SNARE_TRIGGER(ChastiseTrigger, "chastise"); BOOST_TRIGGER_A(ShadowfiendTrigger, "shadowfiend"); +class ShadowProtectionTrigger : public BuffTrigger +{ +public: + ShadowProtectionTrigger(PlayerbotAI* botAI) + : BuffTrigger(botAI, "shadow protection", 4 * 2000) {} + + bool IsActive() override; +}; + +class ShadowProtectionOnPartyTrigger : public BuffOnPartyTrigger +{ +public: + ShadowProtectionOnPartyTrigger(PlayerbotAI* botAI) + : BuffOnPartyTrigger(botAI, "shadow protection", 4 * 2000) {} +}; + class PowerWordFortitudeOnPartyTrigger : public BuffOnPartyTrigger { public: - PowerWordFortitudeOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "power word: fortitude", 4 * 2000) - { - } - - bool IsActive() override; + PowerWordFortitudeOnPartyTrigger(PlayerbotAI* botAI) + : BuffOnPartyTrigger(botAI, "power word: fortitude", 4 * 2000) {} }; class PowerWordFortitudeTrigger : public BuffTrigger { public: - PowerWordFortitudeTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "power word: fortitude", 4 * 2000) {} + PowerWordFortitudeTrigger(PlayerbotAI* botAI) + : BuffTrigger(botAI, "power word: fortitude", 4 * 2000) {} bool IsActive() override; }; @@ -65,31 +77,15 @@ public: class DivineSpiritOnPartyTrigger : public BuffOnPartyTrigger { public: - DivineSpiritOnPartyTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "divine spirit", 4 * 2000) {} - - bool IsActive() override; + DivineSpiritOnPartyTrigger(PlayerbotAI* botAI) + : BuffOnPartyTrigger(botAI, "divine spirit", 4 * 2000) {} }; class DivineSpiritTrigger : public BuffTrigger { public: - DivineSpiritTrigger(PlayerbotAI* botAI) : BuffTrigger(botAI, "divine spirit", 4 * 2000) {} - - bool IsActive() override; -}; - -class PrayerOfFortitudeTrigger : public BuffOnPartyTrigger -{ -public: - PrayerOfFortitudeTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "prayer of fortitude", 3 * 2000) {} - - bool IsActive() override; -}; - -class PrayerOfSpiritTrigger : public BuffOnPartyTrigger -{ -public: - PrayerOfSpiritTrigger(PlayerbotAI* botAI) : BuffOnPartyTrigger(botAI, "prayer of spirit", 2 * 2000) {} + DivineSpiritTrigger(PlayerbotAI* botAI) + : BuffTrigger(botAI, "divine spirit", 4 * 2000) {} bool IsActive() override; }; @@ -106,9 +102,7 @@ class MindSearChannelCheckTrigger : public Trigger { public: MindSearChannelCheckTrigger(PlayerbotAI* botAI, uint32 minEnemies = 2) - : Trigger(botAI, "mind sear channel check"), minEnemies(minEnemies) - { - } + : Trigger(botAI, "mind sear channel check"), minEnemies(minEnemies) {} bool IsActive() override; diff --git a/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategy.cpp b/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategy.cpp index 6447d4519..bd0bdd11f 100644 --- a/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategy.cpp +++ b/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategy.cpp @@ -19,6 +19,8 @@ void PriestNonCombatStrategy::InitTriggers(std::vector& triggers) triggers.push_back( new TriggerNode("inner fire",{ NextAction("inner fire", 10.0f) })); + triggers.push_back( + new TriggerNode("vampiric embrace", { NextAction("vampiric embrace", 16.0f) })); triggers.push_back(new TriggerNode( "party member dead",{ NextAction("remove shadowform", ACTION_CRITICAL_HEAL + 11), NextAction("resurrection", ACTION_CRITICAL_HEAL + 10) })); @@ -54,12 +56,6 @@ void PriestBuffStrategy::InitTriggers(std::vector& triggers) { NonCombatStrategy::InitTriggers(triggers); - triggers.push_back( - new TriggerNode("prayer of fortitude on party", - { NextAction("prayer of fortitude on party", 12.0f) })); - triggers.push_back( - new TriggerNode("prayer of spirit on party", - { NextAction("prayer of spirit on party", 14.0f) })); triggers.push_back( new TriggerNode("power word: fortitude on party", { NextAction("power word: fortitude on party", 11.0f) })); diff --git a/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategyActionNodeFactory.h b/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategyActionNodeFactory.h index c7d4aba82..66a6a44c5 100644 --- a/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategyActionNodeFactory.h +++ b/src/Ai/Class/Priest/Strategy/PriestNonCombatStrategyActionNodeFactory.h @@ -30,8 +30,6 @@ public: creators["flash heal"] = &flash_heal; creators["flash heal on party"] = &flash_heal_on_party; creators["circle of healing on party"] = &circle_of_healing; - creators["prayer of fortitude on party"] = &prayer_of_fortitude_on_party; - creators["prayer of spirit on party"] = &prayer_of_spirit_on_party; } private: @@ -134,20 +132,6 @@ private: /*A*/ {}, /*C*/ {}); } - static ActionNode* prayer_of_fortitude_on_party([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("prayer of fortitude on party", - /*P*/ { NextAction("remove shadowform") }, - /*A*/ { NextAction("power word: fortitude on party") }, - /*C*/ {}); - } - static ActionNode* prayer_of_spirit_on_party([[maybe_unused]] PlayerbotAI* botAI) - { - return new ActionNode("prayer of spirit on party", - /*P*/ { NextAction("remove shadowform") }, - /*A*/ { NextAction("divine spirit on party") }, - /*C*/ {}); - } }; #endif diff --git a/src/Ai/Class/Priest/Strategy/ShadowPriestStrategy.cpp b/src/Ai/Class/Priest/Strategy/ShadowPriestStrategy.cpp index 1308f7225..2200707c7 100644 --- a/src/Ai/Class/Priest/Strategy/ShadowPriestStrategy.cpp +++ b/src/Ai/Class/Priest/Strategy/ShadowPriestStrategy.cpp @@ -51,14 +51,6 @@ void ShadowPriestStrategy::InitTriggers(std::vector& triggers) } ) ); - triggers.push_back( - new TriggerNode( - "vampiric embrace", - { - NextAction("vampiric embrace", 16.0f) - } - ) - ); triggers.push_back( new TriggerNode( "silence", diff --git a/src/Ai/Class/Rogue/Trigger/RogueTriggers.cpp b/src/Ai/Class/Rogue/RogueTriggers.cpp similarity index 100% rename from src/Ai/Class/Rogue/Trigger/RogueTriggers.cpp rename to src/Ai/Class/Rogue/RogueTriggers.cpp diff --git a/src/Ai/Class/Rogue/Trigger/RogueTriggers.h b/src/Ai/Class/Rogue/RogueTriggers.h similarity index 100% rename from src/Ai/Class/Rogue/Trigger/RogueTriggers.h rename to src/Ai/Class/Rogue/RogueTriggers.h diff --git a/src/Ai/Class/Shaman/Action/ShamanActions.cpp b/src/Ai/Class/Shaman/ShamanActions.cpp similarity index 100% rename from src/Ai/Class/Shaman/Action/ShamanActions.cpp rename to src/Ai/Class/Shaman/ShamanActions.cpp diff --git a/src/Ai/Class/Shaman/Action/ShamanActions.h b/src/Ai/Class/Shaman/ShamanActions.h similarity index 100% rename from src/Ai/Class/Shaman/Action/ShamanActions.h rename to src/Ai/Class/Shaman/ShamanActions.h diff --git a/src/Ai/Class/Shaman/Trigger/ShamanTriggers.cpp b/src/Ai/Class/Shaman/ShamanTriggers.cpp similarity index 100% rename from src/Ai/Class/Shaman/Trigger/ShamanTriggers.cpp rename to src/Ai/Class/Shaman/ShamanTriggers.cpp diff --git a/src/Ai/Class/Shaman/Trigger/ShamanTriggers.h b/src/Ai/Class/Shaman/ShamanTriggers.h similarity index 100% rename from src/Ai/Class/Shaman/Trigger/ShamanTriggers.h rename to src/Ai/Class/Shaman/ShamanTriggers.h diff --git a/src/Ai/Class/Shaman/Strategy/GenericShamanStrategy.cpp b/src/Ai/Class/Shaman/Strategy/GenericShamanStrategy.cpp index e89c16105..b5064b554 100644 --- a/src/Ai/Class/Shaman/Strategy/GenericShamanStrategy.cpp +++ b/src/Ai/Class/Shaman/Strategy/GenericShamanStrategy.cpp @@ -161,9 +161,7 @@ void ShamanAoeStrategy::InitTriggers(std::vector& triggers) } else if (tab == SHAMAN_TAB_ENHANCEMENT) { - triggers.push_back(new TriggerNode("medium aoe",{ NextAction("magma totem", 24.0f), - NextAction("fire nova", 23.0f), })); - + triggers.push_back(new TriggerNode("medium aoe",{ NextAction("fire nova", 23.0f), })); triggers.push_back(new TriggerNode("maelstrom weapon 5 and medium aoe", { NextAction("chain lightning", 22.0f), })); triggers.push_back(new TriggerNode("maelstrom weapon 4 and medium aoe", { NextAction("chain lightning", 21.0f), })); triggers.push_back(new TriggerNode("enemy within melee", { NextAction("fire nova", 5.1f), })); diff --git a/src/Ai/Class/Warlock/Action/WarlockActions.cpp b/src/Ai/Class/Warlock/WarlockActions.cpp similarity index 100% rename from src/Ai/Class/Warlock/Action/WarlockActions.cpp rename to src/Ai/Class/Warlock/WarlockActions.cpp diff --git a/src/Ai/Class/Warlock/Action/WarlockActions.h b/src/Ai/Class/Warlock/WarlockActions.h similarity index 100% rename from src/Ai/Class/Warlock/Action/WarlockActions.h rename to src/Ai/Class/Warlock/WarlockActions.h diff --git a/src/Ai/Class/Warlock/Trigger/WarlockTriggers.cpp b/src/Ai/Class/Warlock/WarlockTriggers.cpp similarity index 100% rename from src/Ai/Class/Warlock/Trigger/WarlockTriggers.cpp rename to src/Ai/Class/Warlock/WarlockTriggers.cpp diff --git a/src/Ai/Class/Warlock/Trigger/WarlockTriggers.h b/src/Ai/Class/Warlock/WarlockTriggers.h similarity index 100% rename from src/Ai/Class/Warlock/Trigger/WarlockTriggers.h rename to src/Ai/Class/Warlock/WarlockTriggers.h diff --git a/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp b/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp index bbae89d20..193aab1d7 100644 --- a/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp +++ b/src/Ai/Class/Warrior/Strategy/ArmsWarriorStrategy.cpp @@ -112,6 +112,7 @@ std::vector ArmsWarriorStrategy::getDefaultActions() return { NextAction("bladestorm", ACTION_DEFAULT + 0.2f), NextAction("mortal strike", ACTION_DEFAULT + 0.1f), + NextAction("sunder armor", ACTION_DEFAULT + 0.05f), NextAction("melee", ACTION_DEFAULT) }; } diff --git a/src/Ai/Class/Warrior/Action/WarriorActions.cpp b/src/Ai/Class/Warrior/WarriorActions.cpp similarity index 91% rename from src/Ai/Class/Warrior/Action/WarriorActions.cpp rename to src/Ai/Class/Warrior/WarriorActions.cpp index 20a42c219..b30c1a38b 100644 --- a/src/Ai/Class/Warrior/Action/WarriorActions.cpp +++ b/src/Ai/Class/Warrior/WarriorActions.cpp @@ -5,6 +5,7 @@ #include "WarriorActions.h" +#include "AiFactory.h" #include "Playerbots.h" bool CastBerserkerRageAction::isPossible() @@ -36,6 +37,27 @@ bool CastBerserkerRageAction::isUseful() bool CastSunderArmorAction::isUseful() { + Group* group = bot->GetGroup(); + if (!group) + return false; + + if (!botAI->IsTank(bot, false)) + { + for (GroupReference* ref = group->GetFirstMember(); ref; ref = ref->next()) + { + Player* member = ref->GetSource(); + if (!member || member == bot || !member->IsAlive() || !member->IsInWorld() || + member->GetMapId() != bot->GetMapId()) + { + continue; + } + + if (member->getClass() == CLASS_WARRIOR && + botAI->IsTank(member, false)) + return false; + } + } + Aura* aura = botAI->GetAura("sunder armor", GetTarget(), false, true); return !aura || aura->GetStackAmount() < 5 || aura->GetDuration() <= 6000; } diff --git a/src/Ai/Class/Warrior/Action/WarriorActions.h b/src/Ai/Class/Warrior/WarriorActions.h similarity index 100% rename from src/Ai/Class/Warrior/Action/WarriorActions.h rename to src/Ai/Class/Warrior/WarriorActions.h diff --git a/src/Ai/Class/Warrior/Trigger/WarriorTriggers.cpp b/src/Ai/Class/Warrior/WarriorTriggers.cpp similarity index 100% rename from src/Ai/Class/Warrior/Trigger/WarriorTriggers.cpp rename to src/Ai/Class/Warrior/WarriorTriggers.cpp diff --git a/src/Ai/Class/Warrior/Trigger/WarriorTriggers.h b/src/Ai/Class/Warrior/WarriorTriggers.h similarity index 100% rename from src/Ai/Class/Warrior/Trigger/WarriorTriggers.h rename to src/Ai/Class/Warrior/WarriorTriggers.h diff --git a/src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h b/src/Ai/Dungeon/AC/ACActionContext.h similarity index 97% rename from src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h rename to src/Ai/Dungeon/AC/ACActionContext.h index 4eea58716..40921e361 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsActionContext.h +++ b/src/Ai/Dungeon/AC/ACActionContext.h @@ -3,7 +3,7 @@ #include "AiObjectContext.h" #include "Action.h" -#include "AuchenaiCryptsActions.h" +#include "ACActions.h" class TbcDungeonAuchenaiCryptsActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp b/src/Ai/Dungeon/AC/ACActions.cpp similarity index 98% rename from src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp rename to src/Ai/Dungeon/AC/ACActions.cpp index 2ec7907c7..a5646d877 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.cpp +++ b/src/Ai/Dungeon/AC/ACActions.cpp @@ -1,7 +1,7 @@ #include "Playerbots.h" #include "AiFactory.h" -#include "AuchenaiCryptsTriggers.h" -#include "AuchenaiCryptsActions.h" +#include "ACTriggers.h" +#include "ACActions.h" // Shirrak the Dead Watcher diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.h b/src/Ai/Dungeon/AC/ACActions.h similarity index 96% rename from src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.h rename to src/Ai/Dungeon/AC/ACActions.h index 4764efb65..50240ae0b 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/Action/AuchenaiCryptsActions.h +++ b/src/Ai/Dungeon/AC/ACActions.h @@ -3,7 +3,7 @@ #include "AttackAction.h" #include "MovementActions.h" -#include "AuchenaiCryptsTriggers.h" +#include "ACTriggers.h" // Shirrak the Dead Watcher diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.cpp b/src/Ai/Dungeon/AC/ACMultipliers.cpp similarity index 92% rename from src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.cpp rename to src/Ai/Dungeon/AC/ACMultipliers.cpp index 2f74a5a58..b457e9038 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.cpp +++ b/src/Ai/Dungeon/AC/ACMultipliers.cpp @@ -1,6 +1,6 @@ -#include "AuchenaiCryptsMultipliers.h" -#include "AuchenaiCryptsActions.h" -#include "AuchenaiCryptsTriggers.h" +#include "ACMultipliers.h" +#include "ACActions.h" +#include "ACTriggers.h" #include "MovementActions.h" #include "ReachTargetActions.h" #include "FollowActions.h" diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.h b/src/Ai/Dungeon/AC/ACMultipliers.h similarity index 100% rename from src/Ai/Dungeon/AuchenaiCrypts/Multiplier/AuchenaiCryptsMultipliers.h rename to src/Ai/Dungeon/AC/ACMultipliers.h diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.cpp b/src/Ai/Dungeon/AC/ACStrategy.cpp similarity index 86% rename from src/Ai/Dungeon/AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.cpp rename to src/Ai/Dungeon/AC/ACStrategy.cpp index f975d46bb..c19fe9d47 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.cpp +++ b/src/Ai/Dungeon/AC/ACStrategy.cpp @@ -1,6 +1,6 @@ -#include "AuchenaiCryptsTriggers.h" -#include "AuchenaiCryptsStrategy.h" -#include "AuchenaiCryptsMultipliers.h" +#include "ACTriggers.h" +#include "ACStrategy.h" +#include "ACMultipliers.h" void TbcDungeonAuchenaiCryptsStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.h b/src/Ai/Dungeon/AC/ACStrategy.h similarity index 100% rename from src/Ai/Dungeon/AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.h rename to src/Ai/Dungeon/AC/ACStrategy.h diff --git a/src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsTriggerContext.h b/src/Ai/Dungeon/AC/ACTriggerContext.h similarity index 97% rename from src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsTriggerContext.h rename to src/Ai/Dungeon/AC/ACTriggerContext.h index 95f15f16a..f9c7299b4 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/AuchenaiCryptsTriggerContext.h +++ b/src/Ai/Dungeon/AC/ACTriggerContext.h @@ -3,7 +3,7 @@ #include "AiObjectContext.h" #include "TriggerContext.h" -#include "AuchenaiCryptsTriggers.h" +#include "ACTriggers.h" class TbcDungeonAuchenaiCryptsTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp b/src/Ai/Dungeon/AC/ACTriggers.cpp similarity index 96% rename from src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp rename to src/Ai/Dungeon/AC/ACTriggers.cpp index 372614d2f..38ddc9635 100644 --- a/src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.cpp +++ b/src/Ai/Dungeon/AC/ACTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "AuchenaiCryptsTriggers.h" +#include "ACTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.h b/src/Ai/Dungeon/AC/ACTriggers.h similarity index 100% rename from src/Ai/Dungeon/AuchenaiCrypts/Trigger/AuchenaiCryptsTriggers.h rename to src/Ai/Dungeon/AC/ACTriggers.h diff --git a/src/Ai/Dungeon/OldKingdom/OldKingdomActionContext.h b/src/Ai/Dungeon/AK/AKActionContext.h similarity index 96% rename from src/Ai/Dungeon/OldKingdom/OldKingdomActionContext.h rename to src/Ai/Dungeon/AK/AKActionContext.h index 19426c579..e462de443 100644 --- a/src/Ai/Dungeon/OldKingdom/OldKingdomActionContext.h +++ b/src/Ai/Dungeon/AK/AKActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "OldKingdomActions.h" +#include "AKActions.h" class WotlkDungeonOKActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/OldKingdom/Action/OldKingdomActions.cpp b/src/Ai/Dungeon/AK/AKActions.cpp similarity index 98% rename from src/Ai/Dungeon/OldKingdom/Action/OldKingdomActions.cpp rename to src/Ai/Dungeon/AK/AKActions.cpp index 8a5250a8d..edb80788c 100644 --- a/src/Ai/Dungeon/OldKingdom/Action/OldKingdomActions.cpp +++ b/src/Ai/Dungeon/AK/AKActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "OldKingdomActions.h" +#include "AKActions.h" bool AttackNadoxGuardianAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/OldKingdom/Action/OldKingdomActions.h b/src/Ai/Dungeon/AK/AKActions.h similarity index 96% rename from src/Ai/Dungeon/OldKingdom/Action/OldKingdomActions.h rename to src/Ai/Dungeon/AK/AKActions.h index cba518784..62223022c 100644 --- a/src/Ai/Dungeon/OldKingdom/Action/OldKingdomActions.h +++ b/src/Ai/Dungeon/AK/AKActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "OldKingdomTriggers.h" +#include "AKTriggers.h" class AttackNadoxGuardianAction : public AttackAction { diff --git a/src/Ai/Dungeon/OldKingdom/Multiplier/OldKingdomMultipliers.cpp b/src/Ai/Dungeon/AK/AKMultipliers.cpp similarity index 94% rename from src/Ai/Dungeon/OldKingdom/Multiplier/OldKingdomMultipliers.cpp rename to src/Ai/Dungeon/AK/AKMultipliers.cpp index dbca52316..4c979cf54 100644 --- a/src/Ai/Dungeon/OldKingdom/Multiplier/OldKingdomMultipliers.cpp +++ b/src/Ai/Dungeon/AK/AKMultipliers.cpp @@ -1,9 +1,9 @@ -#include "OldKingdomMultipliers.h" -#include "OldKingdomActions.h" +#include "AKMultipliers.h" +#include "AKActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "OldKingdomTriggers.h" +#include "AKTriggers.h" #include "Action.h" float ElderNadoxMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/OldKingdom/Multiplier/OldKingdomMultipliers.h b/src/Ai/Dungeon/AK/AKMultipliers.h similarity index 100% rename from src/Ai/Dungeon/OldKingdom/Multiplier/OldKingdomMultipliers.h rename to src/Ai/Dungeon/AK/AKMultipliers.h diff --git a/src/Ai/Dungeon/OldKingdom/Strategy/OldKingdomStrategy.cpp b/src/Ai/Dungeon/AK/AKStrategy.cpp similarity index 95% rename from src/Ai/Dungeon/OldKingdom/Strategy/OldKingdomStrategy.cpp rename to src/Ai/Dungeon/AK/AKStrategy.cpp index 484ea6ac4..181a6ef7a 100644 --- a/src/Ai/Dungeon/OldKingdom/Strategy/OldKingdomStrategy.cpp +++ b/src/Ai/Dungeon/AK/AKStrategy.cpp @@ -1,5 +1,5 @@ -#include "OldKingdomStrategy.h" -#include "OldKingdomMultipliers.h" +#include "AKStrategy.h" +#include "AKMultipliers.h" void WotlkDungeonOKStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/OldKingdom/Strategy/OldKingdomStrategy.h b/src/Ai/Dungeon/AK/AKStrategy.h similarity index 100% rename from src/Ai/Dungeon/OldKingdom/Strategy/OldKingdomStrategy.h rename to src/Ai/Dungeon/AK/AKStrategy.h diff --git a/src/Ai/Dungeon/OldKingdom/OldKingdomTriggerContext.h b/src/Ai/Dungeon/AK/AKTriggerContext.h similarity index 96% rename from src/Ai/Dungeon/OldKingdom/OldKingdomTriggerContext.h rename to src/Ai/Dungeon/AK/AKTriggerContext.h index 4c25b9a95..72d8e6076 100644 --- a/src/Ai/Dungeon/OldKingdom/OldKingdomTriggerContext.h +++ b/src/Ai/Dungeon/AK/AKTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "OldKingdomTriggers.h" +#include "AKTriggers.h" class WotlkDungeonOKTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/OldKingdom/Trigger/OldKingdomTriggers.cpp b/src/Ai/Dungeon/AK/AKTriggers.cpp similarity index 97% rename from src/Ai/Dungeon/OldKingdom/Trigger/OldKingdomTriggers.cpp rename to src/Ai/Dungeon/AK/AKTriggers.cpp index 6b72f656a..9d945edc7 100644 --- a/src/Ai/Dungeon/OldKingdom/Trigger/OldKingdomTriggers.cpp +++ b/src/Ai/Dungeon/AK/AKTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "OldKingdomTriggers.h" +#include "AKTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/OldKingdom/Trigger/OldKingdomTriggers.h b/src/Ai/Dungeon/AK/AKTriggers.h similarity index 100% rename from src/Ai/Dungeon/OldKingdom/Trigger/OldKingdomTriggers.h rename to src/Ai/Dungeon/AK/AKTriggers.h diff --git a/src/Ai/Dungeon/AzjolNerub/AzjolNerubActionContext.h b/src/Ai/Dungeon/AN/ANActionContext.h similarity index 96% rename from src/Ai/Dungeon/AzjolNerub/AzjolNerubActionContext.h rename to src/Ai/Dungeon/AN/ANActionContext.h index 6306643ba..11a5c4fe5 100644 --- a/src/Ai/Dungeon/AzjolNerub/AzjolNerubActionContext.h +++ b/src/Ai/Dungeon/AN/ANActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "AzjolNerubActions.h" +#include "ANActions.h" class WotlkDungeonANActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/AzjolNerub/Action/AzjolNerubActions.cpp b/src/Ai/Dungeon/AN/ANActions.cpp similarity index 99% rename from src/Ai/Dungeon/AzjolNerub/Action/AzjolNerubActions.cpp rename to src/Ai/Dungeon/AN/ANActions.cpp index 42026cecf..985ab473e 100644 --- a/src/Ai/Dungeon/AzjolNerub/Action/AzjolNerubActions.cpp +++ b/src/Ai/Dungeon/AN/ANActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "AzjolNerubActions.h" +#include "ANActions.h" bool AttackWebWrapAction::isUseful() { return !botAI->IsHeal(bot); } bool AttackWebWrapAction::Execute(Event /*event*/) diff --git a/src/Ai/Dungeon/AzjolNerub/Action/AzjolNerubActions.h b/src/Ai/Dungeon/AN/ANActions.h similarity index 96% rename from src/Ai/Dungeon/AzjolNerub/Action/AzjolNerubActions.h rename to src/Ai/Dungeon/AN/ANActions.h index ef388cbdb..69bcc15b7 100644 --- a/src/Ai/Dungeon/AzjolNerub/Action/AzjolNerubActions.h +++ b/src/Ai/Dungeon/AN/ANActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "AzjolNerubTriggers.h" +#include "ANTriggers.h" class AttackWebWrapAction : public AttackAction { diff --git a/src/Ai/Dungeon/AzjolNerub/Multiplier/AzjolNerubMultipliers.cpp b/src/Ai/Dungeon/AN/ANMultipliers.cpp similarity index 93% rename from src/Ai/Dungeon/AzjolNerub/Multiplier/AzjolNerubMultipliers.cpp rename to src/Ai/Dungeon/AN/ANMultipliers.cpp index 6cd6673dc..035f64bb1 100644 --- a/src/Ai/Dungeon/AzjolNerub/Multiplier/AzjolNerubMultipliers.cpp +++ b/src/Ai/Dungeon/AN/ANMultipliers.cpp @@ -1,9 +1,9 @@ -#include "AzjolNerubMultipliers.h" -#include "AzjolNerubActions.h" +#include "ANMultipliers.h" +#include "ANActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "AzjolNerubTriggers.h" +#include "ANTriggers.h" #include "Action.h" float KrikthirMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/AzjolNerub/Multiplier/AzjolNerubMultipliers.h b/src/Ai/Dungeon/AN/ANMultipliers.h similarity index 100% rename from src/Ai/Dungeon/AzjolNerub/Multiplier/AzjolNerubMultipliers.h rename to src/Ai/Dungeon/AN/ANMultipliers.h diff --git a/src/Ai/Dungeon/AzjolNerub/Strategy/AzjolNerubStrategy.cpp b/src/Ai/Dungeon/AN/ANStrategy.cpp similarity index 94% rename from src/Ai/Dungeon/AzjolNerub/Strategy/AzjolNerubStrategy.cpp rename to src/Ai/Dungeon/AN/ANStrategy.cpp index dbbb8f5bf..7353e9499 100644 --- a/src/Ai/Dungeon/AzjolNerub/Strategy/AzjolNerubStrategy.cpp +++ b/src/Ai/Dungeon/AN/ANStrategy.cpp @@ -1,5 +1,5 @@ -#include "AzjolNerubStrategy.h" -#include "AzjolNerubMultipliers.h" +#include "ANStrategy.h" +#include "ANMultipliers.h" void WotlkDungeonANStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/AzjolNerub/Strategy/AzjolNerubStrategy.h b/src/Ai/Dungeon/AN/ANStrategy.h similarity index 100% rename from src/Ai/Dungeon/AzjolNerub/Strategy/AzjolNerubStrategy.h rename to src/Ai/Dungeon/AN/ANStrategy.h diff --git a/src/Ai/Dungeon/AzjolNerub/AzjolNerubTriggerContext.h b/src/Ai/Dungeon/AN/ANTriggerContext.h similarity index 97% rename from src/Ai/Dungeon/AzjolNerub/AzjolNerubTriggerContext.h rename to src/Ai/Dungeon/AN/ANTriggerContext.h index a41cebfc6..95131501d 100644 --- a/src/Ai/Dungeon/AzjolNerub/AzjolNerubTriggerContext.h +++ b/src/Ai/Dungeon/AN/ANTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "AzjolNerubTriggers.h" +#include "ANTriggers.h" class WotlkDungeonANTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/AzjolNerub/Trigger/AzjolNerubTriggers.cpp b/src/Ai/Dungeon/AN/ANTriggers.cpp similarity index 98% rename from src/Ai/Dungeon/AzjolNerub/Trigger/AzjolNerubTriggers.cpp rename to src/Ai/Dungeon/AN/ANTriggers.cpp index f9ef4ff95..c9bbde463 100644 --- a/src/Ai/Dungeon/AzjolNerub/Trigger/AzjolNerubTriggers.cpp +++ b/src/Ai/Dungeon/AN/ANTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "AzjolNerubTriggers.h" +#include "ANTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/AzjolNerub/Trigger/AzjolNerubTriggers.h b/src/Ai/Dungeon/AN/ANTriggers.h similarity index 100% rename from src/Ai/Dungeon/AzjolNerub/Trigger/AzjolNerubTriggers.h rename to src/Ai/Dungeon/AN/ANTriggers.h diff --git a/src/Ai/Dungeon/CullingOfStratholme/CullingOfStratholmeActionContext.h b/src/Ai/Dungeon/CoS/CoSActionContext.h similarity index 94% rename from src/Ai/Dungeon/CullingOfStratholme/CullingOfStratholmeActionContext.h rename to src/Ai/Dungeon/CoS/CoSActionContext.h index 0e12c908c..782c0202b 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/CullingOfStratholmeActionContext.h +++ b/src/Ai/Dungeon/CoS/CoSActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "CullingOfStratholmeActions.h" +#include "CoSActions.h" class WotlkDungeonCoSActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/CullingOfStratholme/Action/CullingOfStratholmeActions.cpp b/src/Ai/Dungeon/CoS/CoSActions.cpp similarity index 97% rename from src/Ai/Dungeon/CullingOfStratholme/Action/CullingOfStratholmeActions.cpp rename to src/Ai/Dungeon/CoS/CoSActions.cpp index b2732c3cf..91b76b51b 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/Action/CullingOfStratholmeActions.cpp +++ b/src/Ai/Dungeon/CoS/CoSActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "CullingOfStratholmeActions.h" +#include "CoSActions.h" bool ExplodeGhoulSpreadAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/CullingOfStratholme/Action/CullingOfStratholmeActions.h b/src/Ai/Dungeon/CoS/CoSActions.h similarity index 93% rename from src/Ai/Dungeon/CullingOfStratholme/Action/CullingOfStratholmeActions.h rename to src/Ai/Dungeon/CoS/CoSActions.h index 989cb6ab0..98ece6eb5 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/Action/CullingOfStratholmeActions.h +++ b/src/Ai/Dungeon/CoS/CoSActions.h @@ -6,7 +6,7 @@ #include "GenericSpellActions.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "CullingOfStratholmeTriggers.h" +#include "CoSTriggers.h" class ExplodeGhoulSpreadAction : public MovementAction { diff --git a/src/Ai/Dungeon/CullingOfStratholme/Multiplier/CullingOfStratholmeMultipliers.cpp b/src/Ai/Dungeon/CoS/CoSMultipliers.cpp similarity index 76% rename from src/Ai/Dungeon/CullingOfStratholme/Multiplier/CullingOfStratholmeMultipliers.cpp rename to src/Ai/Dungeon/CoS/CoSMultipliers.cpp index 1fbbc6b3e..9a5852f48 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/Multiplier/CullingOfStratholmeMultipliers.cpp +++ b/src/Ai/Dungeon/CoS/CoSMultipliers.cpp @@ -1,9 +1,9 @@ -#include "CullingOfStratholmeMultipliers.h" -#include "CullingOfStratholmeActions.h" +#include "CoSMultipliers.h" +#include "CoSActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "CullingOfStratholmeTriggers.h" +#include "CoSTriggers.h" #include "Action.h" float EpochMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/CullingOfStratholme/Multiplier/CullingOfStratholmeMultipliers.h b/src/Ai/Dungeon/CoS/CoSMultipliers.h similarity index 100% rename from src/Ai/Dungeon/CullingOfStratholme/Multiplier/CullingOfStratholmeMultipliers.h rename to src/Ai/Dungeon/CoS/CoSMultipliers.h diff --git a/src/Ai/Dungeon/CullingOfStratholme/Strategy/CullingOfStratholmeStrategy.cpp b/src/Ai/Dungeon/CoS/CoSStrategy.cpp similarity index 90% rename from src/Ai/Dungeon/CullingOfStratholme/Strategy/CullingOfStratholmeStrategy.cpp rename to src/Ai/Dungeon/CoS/CoSStrategy.cpp index 90765bded..f51a35255 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/Strategy/CullingOfStratholmeStrategy.cpp +++ b/src/Ai/Dungeon/CoS/CoSStrategy.cpp @@ -1,5 +1,5 @@ -#include "CullingOfStratholmeStrategy.h" -#include "CullingOfStratholmeMultipliers.h" +#include "CoSStrategy.h" +#include "CoSMultipliers.h" void WotlkDungeonCoSStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/CullingOfStratholme/Strategy/CullingOfStratholmeStrategy.h b/src/Ai/Dungeon/CoS/CoSStrategy.h similarity index 100% rename from src/Ai/Dungeon/CullingOfStratholme/Strategy/CullingOfStratholmeStrategy.h rename to src/Ai/Dungeon/CoS/CoSStrategy.h diff --git a/src/Ai/Dungeon/CullingOfStratholme/CullingOfStratholmeTriggerContext.h b/src/Ai/Dungeon/CoS/CoSTriggerContext.h similarity index 94% rename from src/Ai/Dungeon/CullingOfStratholme/CullingOfStratholmeTriggerContext.h rename to src/Ai/Dungeon/CoS/CoSTriggerContext.h index 6e35eac85..302d99381 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/CullingOfStratholmeTriggerContext.h +++ b/src/Ai/Dungeon/CoS/CoSTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "CullingOfStratholmeTriggers.h" +#include "CoSTriggers.h" class WotlkDungeonCoSTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/CullingOfStratholme/Trigger/CullingOfStratholmeTriggers.cpp b/src/Ai/Dungeon/CoS/CoSTriggers.cpp similarity index 95% rename from src/Ai/Dungeon/CullingOfStratholme/Trigger/CullingOfStratholmeTriggers.cpp rename to src/Ai/Dungeon/CoS/CoSTriggers.cpp index cb67ad077..60b195a8c 100644 --- a/src/Ai/Dungeon/CullingOfStratholme/Trigger/CullingOfStratholmeTriggers.cpp +++ b/src/Ai/Dungeon/CoS/CoSTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "CullingOfStratholmeTriggers.h" +#include "CoSTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/CullingOfStratholme/Trigger/CullingOfStratholmeTriggers.h b/src/Ai/Dungeon/CoS/CoSTriggers.h similarity index 100% rename from src/Ai/Dungeon/CullingOfStratholme/Trigger/CullingOfStratholmeTriggers.h rename to src/Ai/Dungeon/CoS/CoSTriggers.h diff --git a/src/Ai/Dungeon/DraktharonKeep/DrakTharonKeepActionContext.h b/src/Ai/Dungeon/DTK/DTKActionContext.h similarity index 98% rename from src/Ai/Dungeon/DraktharonKeep/DrakTharonKeepActionContext.h rename to src/Ai/Dungeon/DTK/DTKActionContext.h index 1435eedbe..61c163292 100644 --- a/src/Ai/Dungeon/DraktharonKeep/DrakTharonKeepActionContext.h +++ b/src/Ai/Dungeon/DTK/DTKActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "DrakTharonKeepActions.h" +#include "DTKActions.h" class WotlkDungeonDTKActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/DraktharonKeep/Action/DrakTharonKeepActions.cpp b/src/Ai/Dungeon/DTK/DTKActions.cpp similarity index 99% rename from src/Ai/Dungeon/DraktharonKeep/Action/DrakTharonKeepActions.cpp rename to src/Ai/Dungeon/DTK/DTKActions.cpp index 07e23699e..52258a601 100644 --- a/src/Ai/Dungeon/DraktharonKeep/Action/DrakTharonKeepActions.cpp +++ b/src/Ai/Dungeon/DTK/DTKActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "DrakTharonKeepActions.h" +#include "DTKActions.h" bool CorpseExplodeSpreadAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/DraktharonKeep/Action/DrakTharonKeepActions.h b/src/Ai/Dungeon/DTK/DTKActions.h similarity index 98% rename from src/Ai/Dungeon/DraktharonKeep/Action/DrakTharonKeepActions.h rename to src/Ai/Dungeon/DTK/DTKActions.h index 8c59a7c24..5eaca264a 100644 --- a/src/Ai/Dungeon/DraktharonKeep/Action/DrakTharonKeepActions.h +++ b/src/Ai/Dungeon/DTK/DTKActions.h @@ -6,7 +6,7 @@ #include "GenericSpellActions.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "DrakTharonKeepTriggers.h" +#include "DTKTriggers.h" const Position NOVOS_PARTY_POSITION = Position(-378.852f, -760.349f, 28.587f); diff --git a/src/Ai/Dungeon/DraktharonKeep/Multiplier/DrakTharonKeepMultipliers.cpp b/src/Ai/Dungeon/DTK/DTKMultipliers.cpp similarity index 93% rename from src/Ai/Dungeon/DraktharonKeep/Multiplier/DrakTharonKeepMultipliers.cpp rename to src/Ai/Dungeon/DTK/DTKMultipliers.cpp index 8fd119dc4..866a5c602 100644 --- a/src/Ai/Dungeon/DraktharonKeep/Multiplier/DrakTharonKeepMultipliers.cpp +++ b/src/Ai/Dungeon/DTK/DTKMultipliers.cpp @@ -1,9 +1,9 @@ -#include "DrakTharonKeepMultipliers.h" -#include "DrakTharonKeepActions.h" +#include "DTKMultipliers.h" +#include "DTKActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "DrakTharonKeepTriggers.h" +#include "DTKTriggers.h" #include "Action.h" float NovosMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/DraktharonKeep/Multiplier/DrakTharonKeepMultipliers.h b/src/Ai/Dungeon/DTK/DTKMultipliers.h similarity index 100% rename from src/Ai/Dungeon/DraktharonKeep/Multiplier/DrakTharonKeepMultipliers.h rename to src/Ai/Dungeon/DTK/DTKMultipliers.h diff --git a/src/Ai/Dungeon/DraktharonKeep/Strategy/DrakTharonKeepStrategy.cpp b/src/Ai/Dungeon/DTK/DTKStrategy.cpp similarity index 95% rename from src/Ai/Dungeon/DraktharonKeep/Strategy/DrakTharonKeepStrategy.cpp rename to src/Ai/Dungeon/DTK/DTKStrategy.cpp index 791a0ea71..96590672c 100644 --- a/src/Ai/Dungeon/DraktharonKeep/Strategy/DrakTharonKeepStrategy.cpp +++ b/src/Ai/Dungeon/DTK/DTKStrategy.cpp @@ -1,5 +1,5 @@ -#include "DrakTharonKeepStrategy.h" -#include "DrakTharonKeepMultipliers.h" +#include "DTKStrategy.h" +#include "DTKMultipliers.h" void WotlkDungeonDTKStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/DraktharonKeep/Strategy/DrakTharonKeepStrategy.h b/src/Ai/Dungeon/DTK/DTKStrategy.h similarity index 100% rename from src/Ai/Dungeon/DraktharonKeep/Strategy/DrakTharonKeepStrategy.h rename to src/Ai/Dungeon/DTK/DTKStrategy.h diff --git a/src/Ai/Dungeon/DraktharonKeep/DrakTharonKeepTriggerContext.h b/src/Ai/Dungeon/DTK/DTKTriggerContext.h similarity index 97% rename from src/Ai/Dungeon/DraktharonKeep/DrakTharonKeepTriggerContext.h rename to src/Ai/Dungeon/DTK/DTKTriggerContext.h index ff7739107..954c1da05 100644 --- a/src/Ai/Dungeon/DraktharonKeep/DrakTharonKeepTriggerContext.h +++ b/src/Ai/Dungeon/DTK/DTKTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "DrakTharonKeepTriggers.h" +#include "DTKTriggers.h" class WotlkDungeonDTKTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/DraktharonKeep/Trigger/DrakTharonKeepTriggers.cpp b/src/Ai/Dungeon/DTK/DTKTriggers.cpp similarity index 97% rename from src/Ai/Dungeon/DraktharonKeep/Trigger/DrakTharonKeepTriggers.cpp rename to src/Ai/Dungeon/DTK/DTKTriggers.cpp index 406f4d433..9af9cccb4 100644 --- a/src/Ai/Dungeon/DraktharonKeep/Trigger/DrakTharonKeepTriggers.cpp +++ b/src/Ai/Dungeon/DTK/DTKTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "DrakTharonKeepTriggers.h" +#include "DTKTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/DraktharonKeep/Trigger/DrakTharonKeepTriggers.h b/src/Ai/Dungeon/DTK/DTKTriggers.h similarity index 100% rename from src/Ai/Dungeon/DraktharonKeep/Trigger/DrakTharonKeepTriggers.h rename to src/Ai/Dungeon/DTK/DTKTriggers.h diff --git a/src/Ai/Dungeon/DungeonStrategyContext.h b/src/Ai/Dungeon/DungeonStrategyContext.h index 07e5fe505..e2365ea75 100644 --- a/src/Ai/Dungeon/DungeonStrategyContext.h +++ b/src/Ai/Dungeon/DungeonStrategyContext.h @@ -2,22 +2,22 @@ #define _PLAYERBOT_DUNGEONSTRATEGYCONTEXT_H #include "Strategy.h" -#include "AuchenaiCrypts/Strategy/AuchenaiCryptsStrategy.h" -#include "UtgardeKeep/Strategy/UtgardeKeepStrategy.h" -#include "Nexus/Strategy/NexusStrategy.h" -#include "AzjolNerub/Strategy/AzjolNerubStrategy.h" -#include "OldKingdom/Strategy/OldKingdomStrategy.h" -#include "DraktharonKeep/Strategy/DrakTharonKeepStrategy.h" -#include "VioletHold/Strategy/VioletHoldStrategy.h" -#include "Gundrak/Strategy/GundrakStrategy.h" -#include "HallsOfStone/Strategy/HallsOfStoneStrategy.h" -#include "HallsOfLightning/Strategy/HallsOfLightningStrategy.h" -#include "Oculus/Strategy/OculusStrategy.h" -#include "UtgardePinnacle/Strategy/UtgardePinnacleStrategy.h" -#include "CullingOfStratholme/Strategy/CullingOfStratholmeStrategy.h" -#include "ForgeOfSouls/Strategy/ForgeOfSoulsStrategy.h" -#include "PitOfSaron/Strategy/PitOfSaronStrategy.h" -#include "TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.h" +#include "ACStrategy.h" +#include "UKStrategy.h" +#include "NexStrategy.h" +#include "ANStrategy.h" +#include "AKStrategy.h" +#include "DTKStrategy.h" +#include "VHStrategy.h" +#include "GDStrategy.h" +#include "HoSStrategy.h" +#include "HoLStrategy.h" +#include "OCStrategy.h" +#include "UPStrategy.h" +#include "CoSStrategy.h" +#include "FoSStrategy.h" +#include "PoSStrategy.h" +#include "TOCStrategy.h" /* Full list/TODO: diff --git a/src/Ai/Dungeon/ForgeOfSouls/ForgeOfSoulsActionContext.h b/src/Ai/Dungeon/FoS/FoSActionContext.h similarity index 97% rename from src/Ai/Dungeon/ForgeOfSouls/ForgeOfSoulsActionContext.h rename to src/Ai/Dungeon/FoS/FoSActionContext.h index 4797b69c1..1a87e2647 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/ForgeOfSoulsActionContext.h +++ b/src/Ai/Dungeon/FoS/FoSActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "ForgeOfSoulsActions.h" +#include "FoSActions.h" class WotlkDungeonFoSActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/ForgeOfSouls/Action/ForgeOfSoulsActions.cpp b/src/Ai/Dungeon/FoS/FoSActions.cpp similarity index 99% rename from src/Ai/Dungeon/ForgeOfSouls/Action/ForgeOfSoulsActions.cpp rename to src/Ai/Dungeon/FoS/FoSActions.cpp index cb29453e0..34c377dff 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/Action/ForgeOfSoulsActions.cpp +++ b/src/Ai/Dungeon/FoS/FoSActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "ForgeOfSoulsActions.h" +#include "FoSActions.h" bool MoveFromBronjahmAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/ForgeOfSouls/Action/ForgeOfSoulsActions.h b/src/Ai/Dungeon/FoS/FoSActions.h similarity index 97% rename from src/Ai/Dungeon/ForgeOfSouls/Action/ForgeOfSoulsActions.h rename to src/Ai/Dungeon/FoS/FoSActions.h index d9b762be6..f91c93a21 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/Action/ForgeOfSoulsActions.h +++ b/src/Ai/Dungeon/FoS/FoSActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "ForgeOfSoulsTriggers.h" +#include "FoSTriggers.h" const Position BRONJAHM_TANK_POSITION = Position(5297.920f, 2506.698f, 686.068f); diff --git a/src/Ai/Dungeon/ForgeOfSouls/Multiplier/ForgeOfSoulsMultipliers.cpp b/src/Ai/Dungeon/FoS/FoSMultipliers.cpp similarity index 88% rename from src/Ai/Dungeon/ForgeOfSouls/Multiplier/ForgeOfSoulsMultipliers.cpp rename to src/Ai/Dungeon/FoS/FoSMultipliers.cpp index 7873e7c1d..ceed84ea7 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/Multiplier/ForgeOfSoulsMultipliers.cpp +++ b/src/Ai/Dungeon/FoS/FoSMultipliers.cpp @@ -1,10 +1,10 @@ -#include "ForgeOfSoulsMultipliers.h" -#include "ForgeOfSoulsActions.h" +#include "FoSMultipliers.h" +#include "FoSActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "ForgeOfSoulsTriggers.h" -#include "ForgeOfSoulsActions.h" +#include "FoSTriggers.h" +#include "FoSActions.h" float BronjahmMultiplier::GetValue(Action* action) { Unit* boss = AI_VALUE2(Unit *, "find target", "bronjahm"); diff --git a/src/Ai/Dungeon/ForgeOfSouls/Multiplier/ForgeOfSoulsMultipliers.h b/src/Ai/Dungeon/FoS/FoSMultipliers.h similarity index 100% rename from src/Ai/Dungeon/ForgeOfSouls/Multiplier/ForgeOfSoulsMultipliers.h rename to src/Ai/Dungeon/FoS/FoSMultipliers.h diff --git a/src/Ai/Dungeon/ForgeOfSouls/Strategy/ForgeOfSoulsStrategy.cpp b/src/Ai/Dungeon/FoS/FoSStrategy.cpp similarity index 91% rename from src/Ai/Dungeon/ForgeOfSouls/Strategy/ForgeOfSoulsStrategy.cpp rename to src/Ai/Dungeon/FoS/FoSStrategy.cpp index 9ff321982..d359fe414 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/Strategy/ForgeOfSoulsStrategy.cpp +++ b/src/Ai/Dungeon/FoS/FoSStrategy.cpp @@ -1,5 +1,5 @@ -#include "ForgeOfSoulsStrategy.h" -#include "ForgeOfSoulsMultipliers.h" +#include "FoSStrategy.h" +#include "FoSMultipliers.h" void WotlkDungeonFoSStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Dungeon/ForgeOfSouls/Strategy/ForgeOfSoulsStrategy.h b/src/Ai/Dungeon/FoS/FoSStrategy.h similarity index 100% rename from src/Ai/Dungeon/ForgeOfSouls/Strategy/ForgeOfSoulsStrategy.h rename to src/Ai/Dungeon/FoS/FoSStrategy.h diff --git a/src/Ai/Dungeon/ForgeOfSouls/ForgeOfSoulsTriggerContext.h b/src/Ai/Dungeon/FoS/FoSTriggerContext.h similarity index 97% rename from src/Ai/Dungeon/ForgeOfSouls/ForgeOfSoulsTriggerContext.h rename to src/Ai/Dungeon/FoS/FoSTriggerContext.h index 129124127..aa8a0d4af 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/ForgeOfSoulsTriggerContext.h +++ b/src/Ai/Dungeon/FoS/FoSTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "ForgeOfSoulsTriggers.h" +#include "FoSTriggers.h" class WotlkDungeonFoSTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/ForgeOfSouls/Trigger/ForgeOfSoulsTriggers.cpp b/src/Ai/Dungeon/FoS/FoSTriggers.cpp similarity index 97% rename from src/Ai/Dungeon/ForgeOfSouls/Trigger/ForgeOfSoulsTriggers.cpp rename to src/Ai/Dungeon/FoS/FoSTriggers.cpp index eb8e66e11..f124ab35d 100644 --- a/src/Ai/Dungeon/ForgeOfSouls/Trigger/ForgeOfSoulsTriggers.cpp +++ b/src/Ai/Dungeon/FoS/FoSTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "ForgeOfSoulsTriggers.h" +#include "FoSTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/ForgeOfSouls/Trigger/ForgeOfSoulsTriggers.h b/src/Ai/Dungeon/FoS/FoSTriggers.h similarity index 100% rename from src/Ai/Dungeon/ForgeOfSouls/Trigger/ForgeOfSoulsTriggers.h rename to src/Ai/Dungeon/FoS/FoSTriggers.h diff --git a/src/Ai/Dungeon/Gundrak/GundrakActionContext.h b/src/Ai/Dungeon/GD/GDActionContext.h similarity index 96% rename from src/Ai/Dungeon/Gundrak/GundrakActionContext.h rename to src/Ai/Dungeon/GD/GDActionContext.h index 746fed394..3dd4f7164 100644 --- a/src/Ai/Dungeon/Gundrak/GundrakActionContext.h +++ b/src/Ai/Dungeon/GD/GDActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "GundrakActions.h" +#include "GDActions.h" class WotlkDungeonGDActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/Gundrak/Action/GundrakActions.cpp b/src/Ai/Dungeon/GD/GDActions.cpp similarity index 98% rename from src/Ai/Dungeon/Gundrak/Action/GundrakActions.cpp rename to src/Ai/Dungeon/GD/GDActions.cpp index 7dbcb6d66..4cada90e3 100644 --- a/src/Ai/Dungeon/Gundrak/Action/GundrakActions.cpp +++ b/src/Ai/Dungeon/GD/GDActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "GundrakActions.h" +#include "GDActions.h" bool AvoidPoisonNovaAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/Gundrak/Action/GundrakActions.h b/src/Ai/Dungeon/GD/GDActions.h similarity index 96% rename from src/Ai/Dungeon/Gundrak/Action/GundrakActions.h rename to src/Ai/Dungeon/GD/GDActions.h index 095cc5cfa..17070ac1e 100644 --- a/src/Ai/Dungeon/Gundrak/Action/GundrakActions.h +++ b/src/Ai/Dungeon/GD/GDActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "GundrakTriggers.h" +#include "GDTriggers.h" class AvoidPoisonNovaAction : public MovementAction { diff --git a/src/Ai/Dungeon/Gundrak/Multiplier/GundrakMultipliers.cpp b/src/Ai/Dungeon/GD/GDMultipliers.cpp similarity index 94% rename from src/Ai/Dungeon/Gundrak/Multiplier/GundrakMultipliers.cpp rename to src/Ai/Dungeon/GD/GDMultipliers.cpp index 2d4404255..c9780f286 100644 --- a/src/Ai/Dungeon/Gundrak/Multiplier/GundrakMultipliers.cpp +++ b/src/Ai/Dungeon/GD/GDMultipliers.cpp @@ -1,9 +1,9 @@ -#include "GundrakMultipliers.h" -#include "GundrakActions.h" +#include "GDMultipliers.h" +#include "GDActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "GundrakTriggers.h" +#include "GDTriggers.h" #include "Action.h" float SladranMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/Gundrak/Multiplier/GundrakMultipliers.h b/src/Ai/Dungeon/GD/GDMultipliers.h similarity index 100% rename from src/Ai/Dungeon/Gundrak/Multiplier/GundrakMultipliers.h rename to src/Ai/Dungeon/GD/GDMultipliers.h diff --git a/src/Ai/Dungeon/Gundrak/Strategy/GundrakStrategy.cpp b/src/Ai/Dungeon/GD/GDStrategy.cpp similarity index 94% rename from src/Ai/Dungeon/Gundrak/Strategy/GundrakStrategy.cpp rename to src/Ai/Dungeon/GD/GDStrategy.cpp index c8244e2ca..a092c3041 100644 --- a/src/Ai/Dungeon/Gundrak/Strategy/GundrakStrategy.cpp +++ b/src/Ai/Dungeon/GD/GDStrategy.cpp @@ -1,5 +1,5 @@ -#include "GundrakStrategy.h" -#include "GundrakMultipliers.h" +#include "GDStrategy.h" +#include "GDMultipliers.h" void WotlkDungeonGDStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/Gundrak/Strategy/GundrakStrategy.h b/src/Ai/Dungeon/GD/GDStrategy.h similarity index 100% rename from src/Ai/Dungeon/Gundrak/Strategy/GundrakStrategy.h rename to src/Ai/Dungeon/GD/GDStrategy.h diff --git a/src/Ai/Dungeon/Gundrak/GundrakTriggerContext.h b/src/Ai/Dungeon/GD/GDTriggerContext.h similarity index 96% rename from src/Ai/Dungeon/Gundrak/GundrakTriggerContext.h rename to src/Ai/Dungeon/GD/GDTriggerContext.h index 4d0e5dee8..e85e61a1d 100644 --- a/src/Ai/Dungeon/Gundrak/GundrakTriggerContext.h +++ b/src/Ai/Dungeon/GD/GDTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "GundrakTriggers.h" +#include "GDTriggers.h" class WotlkDungeonGDTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/Gundrak/Trigger/GundrakTriggers.cpp b/src/Ai/Dungeon/GD/GDTriggers.cpp similarity index 97% rename from src/Ai/Dungeon/Gundrak/Trigger/GundrakTriggers.cpp rename to src/Ai/Dungeon/GD/GDTriggers.cpp index b3e98cfdb..13107e920 100644 --- a/src/Ai/Dungeon/Gundrak/Trigger/GundrakTriggers.cpp +++ b/src/Ai/Dungeon/GD/GDTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "GundrakTriggers.h" +#include "GDTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/Gundrak/Trigger/GundrakTriggers.h b/src/Ai/Dungeon/GD/GDTriggers.h similarity index 100% rename from src/Ai/Dungeon/Gundrak/Trigger/GundrakTriggers.h rename to src/Ai/Dungeon/GD/GDTriggers.h diff --git a/src/Ai/Dungeon/HallsOfReflection/TODO b/src/Ai/Dungeon/HallsOfReflection/TODO deleted file mode 100644 index e69de29bb..000000000 diff --git a/src/Ai/Dungeon/HallsOfLightning/HallsOfLightningActionContext.h b/src/Ai/Dungeon/HoL/HoLActionContext.h similarity index 98% rename from src/Ai/Dungeon/HallsOfLightning/HallsOfLightningActionContext.h rename to src/Ai/Dungeon/HoL/HoLActionContext.h index c3073d492..f17380c9a 100644 --- a/src/Ai/Dungeon/HallsOfLightning/HallsOfLightningActionContext.h +++ b/src/Ai/Dungeon/HoL/HoLActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "HallsOfLightningActions.h" +#include "HoLActions.h" class WotlkDungeonHoLActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/HallsOfLightning/Action/HallsOfLightningActions.cpp b/src/Ai/Dungeon/HoL/HoLActions.cpp similarity index 99% rename from src/Ai/Dungeon/HallsOfLightning/Action/HallsOfLightningActions.cpp rename to src/Ai/Dungeon/HoL/HoLActions.cpp index 7dcf64333..f665e475d 100644 --- a/src/Ai/Dungeon/HallsOfLightning/Action/HallsOfLightningActions.cpp +++ b/src/Ai/Dungeon/HoL/HoLActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "HallsOfLightningActions.h" +#include "HoLActions.h" bool BjarngrimTargetAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/HallsOfLightning/Action/HallsOfLightningActions.h b/src/Ai/Dungeon/HoL/HoLActions.h similarity index 98% rename from src/Ai/Dungeon/HallsOfLightning/Action/HallsOfLightningActions.h rename to src/Ai/Dungeon/HoL/HoLActions.h index fe81aa448..80bb51c22 100644 --- a/src/Ai/Dungeon/HallsOfLightning/Action/HallsOfLightningActions.h +++ b/src/Ai/Dungeon/HoL/HoLActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "HallsOfLightningTriggers.h" +#include "HoLTriggers.h" const Position IONAR_TANK_POSITION = Position(1078.860f, -261.928f, 61.226f); const Position DISPERSE_POSITION = Position(1161.152f, -261.584f, 53.223f); diff --git a/src/Ai/Dungeon/HallsOfLightning/Multiplier/HallsOfLightningMultipliers.cpp b/src/Ai/Dungeon/HoL/HoLMultipliers.cpp similarity index 96% rename from src/Ai/Dungeon/HallsOfLightning/Multiplier/HallsOfLightningMultipliers.cpp rename to src/Ai/Dungeon/HoL/HoLMultipliers.cpp index 3bf9fcfd6..3fdc645e9 100644 --- a/src/Ai/Dungeon/HallsOfLightning/Multiplier/HallsOfLightningMultipliers.cpp +++ b/src/Ai/Dungeon/HoL/HoLMultipliers.cpp @@ -1,9 +1,9 @@ -#include "HallsOfLightningMultipliers.h" -#include "HallsOfLightningActions.h" +#include "HoLMultipliers.h" +#include "HoLActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "HallsOfLightningTriggers.h" +#include "HoLTriggers.h" #include "Action.h" #include "WarriorActions.h" diff --git a/src/Ai/Dungeon/HallsOfLightning/Multiplier/HallsOfLightningMultipliers.h b/src/Ai/Dungeon/HoL/HoLMultipliers.h similarity index 100% rename from src/Ai/Dungeon/HallsOfLightning/Multiplier/HallsOfLightningMultipliers.h rename to src/Ai/Dungeon/HoL/HoLMultipliers.h diff --git a/src/Ai/Dungeon/HallsOfLightning/Strategy/HallsOfLightningStrategy.cpp b/src/Ai/Dungeon/HoL/HoLStrategy.cpp similarity index 95% rename from src/Ai/Dungeon/HallsOfLightning/Strategy/HallsOfLightningStrategy.cpp rename to src/Ai/Dungeon/HoL/HoLStrategy.cpp index 1266fb0b9..e977fd3b5 100644 --- a/src/Ai/Dungeon/HallsOfLightning/Strategy/HallsOfLightningStrategy.cpp +++ b/src/Ai/Dungeon/HoL/HoLStrategy.cpp @@ -1,5 +1,5 @@ -#include "HallsOfLightningStrategy.h" -#include "HallsOfLightningMultipliers.h" +#include "HoLStrategy.h" +#include "HoLMultipliers.h" void WotlkDungeonHoLStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/HallsOfLightning/Strategy/HallsOfLightningStrategy.h b/src/Ai/Dungeon/HoL/HoLStrategy.h similarity index 100% rename from src/Ai/Dungeon/HallsOfLightning/Strategy/HallsOfLightningStrategy.h rename to src/Ai/Dungeon/HoL/HoLStrategy.h diff --git a/src/Ai/Dungeon/HallsOfLightning/HallsOfLightningTriggerContext.h b/src/Ai/Dungeon/HoL/HoLTriggerContext.h similarity index 98% rename from src/Ai/Dungeon/HallsOfLightning/HallsOfLightningTriggerContext.h rename to src/Ai/Dungeon/HoL/HoLTriggerContext.h index 74cd0cd73..999abaa24 100644 --- a/src/Ai/Dungeon/HallsOfLightning/HallsOfLightningTriggerContext.h +++ b/src/Ai/Dungeon/HoL/HoLTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "HallsOfLightningTriggers.h" +#include "HoLTriggers.h" class WotlkDungeonHoLTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/HallsOfLightning/Trigger/HallsOfLightningTriggers.cpp b/src/Ai/Dungeon/HoL/HoLTriggers.cpp similarity index 98% rename from src/Ai/Dungeon/HallsOfLightning/Trigger/HallsOfLightningTriggers.cpp rename to src/Ai/Dungeon/HoL/HoLTriggers.cpp index da88807ca..6b63ce5f5 100644 --- a/src/Ai/Dungeon/HallsOfLightning/Trigger/HallsOfLightningTriggers.cpp +++ b/src/Ai/Dungeon/HoL/HoLTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "HallsOfLightningTriggers.h" +#include "HoLTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/HallsOfLightning/Trigger/HallsOfLightningTriggers.h b/src/Ai/Dungeon/HoL/HoLTriggers.h similarity index 100% rename from src/Ai/Dungeon/HallsOfLightning/Trigger/HallsOfLightningTriggers.h rename to src/Ai/Dungeon/HoL/HoLTriggers.h diff --git a/src/Ai/Dungeon/HallsOfStone/HallsOfStoneActionContext.h b/src/Ai/Dungeon/HoS/HoSActionContext.h similarity index 95% rename from src/Ai/Dungeon/HallsOfStone/HallsOfStoneActionContext.h rename to src/Ai/Dungeon/HoS/HoSActionContext.h index 40b469b40..44ccfafcd 100644 --- a/src/Ai/Dungeon/HallsOfStone/HallsOfStoneActionContext.h +++ b/src/Ai/Dungeon/HoS/HoSActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "HallsOfStoneActions.h" +#include "HoSActions.h" class WotlkDungeonHoSActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/HallsOfStone/Action/HallsOfStoneActions.cpp b/src/Ai/Dungeon/HoS/HoSActions.cpp similarity index 97% rename from src/Ai/Dungeon/HallsOfStone/Action/HallsOfStoneActions.cpp rename to src/Ai/Dungeon/HoS/HoSActions.cpp index 51f1072b5..556553f8f 100644 --- a/src/Ai/Dungeon/HallsOfStone/Action/HallsOfStoneActions.cpp +++ b/src/Ai/Dungeon/HoS/HoSActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "HallsOfStoneActions.h" +#include "HoSActions.h" bool ShatterSpreadAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/HallsOfStone/Action/HallsOfStoneActions.h b/src/Ai/Dungeon/HoS/HoSActions.h similarity index 94% rename from src/Ai/Dungeon/HallsOfStone/Action/HallsOfStoneActions.h rename to src/Ai/Dungeon/HoS/HoSActions.h index ad7058afd..a564a968e 100644 --- a/src/Ai/Dungeon/HallsOfStone/Action/HallsOfStoneActions.h +++ b/src/Ai/Dungeon/HoS/HoSActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "HallsOfStoneTriggers.h" +#include "HoSTriggers.h" class ShatterSpreadAction : public MovementAction { diff --git a/src/Ai/Dungeon/HallsOfStone/Multiplier/HallsOfStoneMultipliers.cpp b/src/Ai/Dungeon/HoS/HoSMultipliers.cpp similarity index 92% rename from src/Ai/Dungeon/HallsOfStone/Multiplier/HallsOfStoneMultipliers.cpp rename to src/Ai/Dungeon/HoS/HoSMultipliers.cpp index 443905bbb..3813b1388 100644 --- a/src/Ai/Dungeon/HallsOfStone/Multiplier/HallsOfStoneMultipliers.cpp +++ b/src/Ai/Dungeon/HoS/HoSMultipliers.cpp @@ -1,9 +1,9 @@ -#include "HallsOfStoneMultipliers.h" -#include "HallsOfStoneActions.h" +#include "HoSMultipliers.h" +#include "HoSActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "HallsOfStoneTriggers.h" +#include "HoSTriggers.h" #include "Action.h" float KrystallusMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/HallsOfStone/Multiplier/HallsOfStoneMultipliers.h b/src/Ai/Dungeon/HoS/HoSMultipliers.h similarity index 100% rename from src/Ai/Dungeon/HallsOfStone/Multiplier/HallsOfStoneMultipliers.h rename to src/Ai/Dungeon/HoS/HoSMultipliers.h diff --git a/src/Ai/Dungeon/HallsOfStone/Strategy/HallsOfStoneStrategy.cpp b/src/Ai/Dungeon/HoS/HoSStrategy.cpp similarity index 93% rename from src/Ai/Dungeon/HallsOfStone/Strategy/HallsOfStoneStrategy.cpp rename to src/Ai/Dungeon/HoS/HoSStrategy.cpp index 47006a9e4..7a83c309d 100644 --- a/src/Ai/Dungeon/HallsOfStone/Strategy/HallsOfStoneStrategy.cpp +++ b/src/Ai/Dungeon/HoS/HoSStrategy.cpp @@ -1,5 +1,5 @@ -#include "HallsOfStoneStrategy.h" -#include "HallsOfStoneMultipliers.h" +#include "HoSStrategy.h" +#include "HoSMultipliers.h" void WotlkDungeonHoSStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/HallsOfStone/Strategy/HallsOfStoneStrategy.h b/src/Ai/Dungeon/HoS/HoSStrategy.h similarity index 100% rename from src/Ai/Dungeon/HallsOfStone/Strategy/HallsOfStoneStrategy.h rename to src/Ai/Dungeon/HoS/HoSStrategy.h diff --git a/src/Ai/Dungeon/HallsOfStone/HallsOfStoneTriggerContext.h b/src/Ai/Dungeon/HoS/HoSTriggerContext.h similarity index 95% rename from src/Ai/Dungeon/HallsOfStone/HallsOfStoneTriggerContext.h rename to src/Ai/Dungeon/HoS/HoSTriggerContext.h index bd3d6dd01..c6da70b69 100644 --- a/src/Ai/Dungeon/HallsOfStone/HallsOfStoneTriggerContext.h +++ b/src/Ai/Dungeon/HoS/HoSTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "HallsOfStoneTriggers.h" +#include "HoSTriggers.h" class WotlkDungeonHoSTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/HallsOfStone/Trigger/HallsOfStoneTriggers.cpp b/src/Ai/Dungeon/HoS/HoSTriggers.cpp similarity index 95% rename from src/Ai/Dungeon/HallsOfStone/Trigger/HallsOfStoneTriggers.cpp rename to src/Ai/Dungeon/HoS/HoSTriggers.cpp index 2e6e37b86..78b37e0ce 100644 --- a/src/Ai/Dungeon/HallsOfStone/Trigger/HallsOfStoneTriggers.cpp +++ b/src/Ai/Dungeon/HoS/HoSTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "HallsOfStoneTriggers.h" +#include "HoSTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/HallsOfStone/Trigger/HallsOfStoneTriggers.h b/src/Ai/Dungeon/HoS/HoSTriggers.h similarity index 100% rename from src/Ai/Dungeon/HallsOfStone/Trigger/HallsOfStoneTriggers.h rename to src/Ai/Dungeon/HoS/HoSTriggers.h diff --git a/src/Ai/Dungeon/Nexus/NexusActionContext.h b/src/Ai/Dungeon/Nex/NexActionContext.h similarity index 98% rename from src/Ai/Dungeon/Nexus/NexusActionContext.h rename to src/Ai/Dungeon/Nex/NexActionContext.h index c02422625..e8d91ba75 100644 --- a/src/Ai/Dungeon/Nexus/NexusActionContext.h +++ b/src/Ai/Dungeon/Nex/NexActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "NexusActions.h" +#include "NexActions.h" class WotlkDungeonNexActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/Nexus/Action/NexusActions.cpp b/src/Ai/Dungeon/Nex/NexActions.cpp similarity index 99% rename from src/Ai/Dungeon/Nexus/Action/NexusActions.cpp rename to src/Ai/Dungeon/Nex/NexActions.cpp index 12b546b5e..1dacc803e 100644 --- a/src/Ai/Dungeon/Nexus/Action/NexusActions.cpp +++ b/src/Ai/Dungeon/Nex/NexActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "NexusActions.h" +#include "NexActions.h" bool MoveFromWhirlwindAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/Nexus/Action/NexusActions.h b/src/Ai/Dungeon/Nex/NexActions.h similarity index 98% rename from src/Ai/Dungeon/Nexus/Action/NexusActions.h rename to src/Ai/Dungeon/Nex/NexActions.h index 96790c367..672cf0778 100644 --- a/src/Ai/Dungeon/Nexus/Action/NexusActions.h +++ b/src/Ai/Dungeon/Nex/NexActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "NexusTriggers.h" +#include "NexTriggers.h" class MoveFromWhirlwindAction : public MovementAction { diff --git a/src/Ai/Dungeon/Nexus/Multiplier/NexusMultipliers.cpp b/src/Ai/Dungeon/Nex/NexMultipliers.cpp similarity index 97% rename from src/Ai/Dungeon/Nexus/Multiplier/NexusMultipliers.cpp rename to src/Ai/Dungeon/Nex/NexMultipliers.cpp index 7adc79b45..129b8a098 100644 --- a/src/Ai/Dungeon/Nexus/Multiplier/NexusMultipliers.cpp +++ b/src/Ai/Dungeon/Nex/NexMultipliers.cpp @@ -1,9 +1,9 @@ -#include "NexusMultipliers.h" -#include "NexusActions.h" +#include "NexMultipliers.h" +#include "NexActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "NexusTriggers.h" +#include "NexTriggers.h" float FactionCommanderMultiplier::GetValue(Action* action) { diff --git a/src/Ai/Dungeon/Nexus/Multiplier/NexusMultipliers.h b/src/Ai/Dungeon/Nex/NexMultipliers.h similarity index 100% rename from src/Ai/Dungeon/Nexus/Multiplier/NexusMultipliers.h rename to src/Ai/Dungeon/Nex/NexMultipliers.h diff --git a/src/Ai/Dungeon/Nexus/Strategy/NexusStrategy.cpp b/src/Ai/Dungeon/Nex/NexStrategy.cpp similarity index 97% rename from src/Ai/Dungeon/Nexus/Strategy/NexusStrategy.cpp rename to src/Ai/Dungeon/Nex/NexStrategy.cpp index e633ba982..7f2e773d7 100644 --- a/src/Ai/Dungeon/Nexus/Strategy/NexusStrategy.cpp +++ b/src/Ai/Dungeon/Nex/NexStrategy.cpp @@ -1,5 +1,5 @@ -#include "NexusStrategy.h" -#include "NexusMultipliers.h" +#include "NexStrategy.h" +#include "NexMultipliers.h" void WotlkDungeonNexStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/Nexus/Strategy/NexusStrategy.h b/src/Ai/Dungeon/Nex/NexStrategy.h similarity index 100% rename from src/Ai/Dungeon/Nexus/Strategy/NexusStrategy.h rename to src/Ai/Dungeon/Nex/NexStrategy.h diff --git a/src/Ai/Dungeon/Nexus/NexusTriggerContext.h b/src/Ai/Dungeon/Nex/NexTriggerContext.h similarity index 98% rename from src/Ai/Dungeon/Nexus/NexusTriggerContext.h rename to src/Ai/Dungeon/Nex/NexTriggerContext.h index 38ebbcb3d..706215c2f 100644 --- a/src/Ai/Dungeon/Nexus/NexusTriggerContext.h +++ b/src/Ai/Dungeon/Nex/NexTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "NexusTriggers.h" +#include "NexTriggers.h" class WotlkDungeonNexTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.cpp b/src/Ai/Dungeon/Nex/NexTriggers.cpp similarity index 99% rename from src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.cpp rename to src/Ai/Dungeon/Nex/NexTriggers.cpp index 02be3f70e..45febf0df 100644 --- a/src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.cpp +++ b/src/Ai/Dungeon/Nex/NexTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "NexusTriggers.h" +#include "NexTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.h b/src/Ai/Dungeon/Nex/NexTriggers.h similarity index 100% rename from src/Ai/Dungeon/Nexus/Trigger/NexusTriggers.h rename to src/Ai/Dungeon/Nex/NexTriggers.h diff --git a/src/Ai/Dungeon/Oculus/OculusActionContext.h b/src/Ai/Dungeon/OC/OCActionContext.h similarity index 98% rename from src/Ai/Dungeon/Oculus/OculusActionContext.h rename to src/Ai/Dungeon/OC/OCActionContext.h index fa5036e54..fefeecd44 100644 --- a/src/Ai/Dungeon/Oculus/OculusActionContext.h +++ b/src/Ai/Dungeon/OC/OCActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "OculusActions.h" +#include "OCActions.h" class WotlkDungeonOccActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/Oculus/Action/OculusActions.cpp b/src/Ai/Dungeon/OC/OCActions.cpp similarity index 99% rename from src/Ai/Dungeon/Oculus/Action/OculusActions.cpp rename to src/Ai/Dungeon/OC/OCActions.cpp index 385451003..babfff206 100644 --- a/src/Ai/Dungeon/Oculus/Action/OculusActions.cpp +++ b/src/Ai/Dungeon/OC/OCActions.cpp @@ -1,6 +1,6 @@ -#include "OculusTriggers.h" +#include "OCTriggers.h" #include "Playerbots.h" -#include "OculusActions.h" +#include "OCActions.h" #include "LastSpellCastValue.h" bool AvoidUnstableSphereAction::Execute(Event /*event*/) diff --git a/src/Ai/Dungeon/Oculus/Action/OculusActions.h b/src/Ai/Dungeon/OC/OCActions.h similarity index 100% rename from src/Ai/Dungeon/Oculus/Action/OculusActions.h rename to src/Ai/Dungeon/OC/OCActions.h diff --git a/src/Ai/Dungeon/Oculus/Multiplier/OculusMultipliers.cpp b/src/Ai/Dungeon/OC/OCMultipliers.cpp similarity index 97% rename from src/Ai/Dungeon/Oculus/Multiplier/OculusMultipliers.cpp rename to src/Ai/Dungeon/OC/OCMultipliers.cpp index f8fcdd3f1..a8a21e693 100644 --- a/src/Ai/Dungeon/Oculus/Multiplier/OculusMultipliers.cpp +++ b/src/Ai/Dungeon/OC/OCMultipliers.cpp @@ -1,9 +1,9 @@ -#include "OculusMultipliers.h" -#include "OculusActions.h" +#include "OCMultipliers.h" +#include "OCActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "OculusTriggers.h" +#include "OCTriggers.h" #include "FollowActions.h" #include "ReachTargetActions.h" #include "Playerbots.h" diff --git a/src/Ai/Dungeon/Oculus/Multiplier/OculusMultipliers.h b/src/Ai/Dungeon/OC/OCMultipliers.h similarity index 100% rename from src/Ai/Dungeon/Oculus/Multiplier/OculusMultipliers.h rename to src/Ai/Dungeon/OC/OCMultipliers.h diff --git a/src/Ai/Dungeon/Oculus/Strategy/OculusStrategy.cpp b/src/Ai/Dungeon/OC/OCStrategy.cpp similarity index 96% rename from src/Ai/Dungeon/Oculus/Strategy/OculusStrategy.cpp rename to src/Ai/Dungeon/OC/OCStrategy.cpp index 4c558469e..a96cab926 100644 --- a/src/Ai/Dungeon/Oculus/Strategy/OculusStrategy.cpp +++ b/src/Ai/Dungeon/OC/OCStrategy.cpp @@ -1,5 +1,5 @@ -#include "OculusStrategy.h" -#include "OculusMultipliers.h" +#include "OCStrategy.h" +#include "OCMultipliers.h" void WotlkDungeonOccStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/Oculus/Strategy/OculusStrategy.h b/src/Ai/Dungeon/OC/OCStrategy.h similarity index 100% rename from src/Ai/Dungeon/Oculus/Strategy/OculusStrategy.h rename to src/Ai/Dungeon/OC/OCStrategy.h diff --git a/src/Ai/Dungeon/Oculus/OculusTriggerContext.h b/src/Ai/Dungeon/OC/OCTriggerContext.h similarity index 98% rename from src/Ai/Dungeon/Oculus/OculusTriggerContext.h rename to src/Ai/Dungeon/OC/OCTriggerContext.h index ccd2d8ca1..da92923d9 100644 --- a/src/Ai/Dungeon/Oculus/OculusTriggerContext.h +++ b/src/Ai/Dungeon/OC/OCTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "OculusTriggers.h" +#include "OCTriggers.h" class WotlkDungeonOccTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/Oculus/Trigger/OculusTriggers.cpp b/src/Ai/Dungeon/OC/OCTriggers.cpp similarity index 98% rename from src/Ai/Dungeon/Oculus/Trigger/OculusTriggers.cpp rename to src/Ai/Dungeon/OC/OCTriggers.cpp index 9cc8288f3..e80a82bf8 100644 --- a/src/Ai/Dungeon/Oculus/Trigger/OculusTriggers.cpp +++ b/src/Ai/Dungeon/OC/OCTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "OculusTriggers.h" +#include "OCTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" #include "Unit.h" diff --git a/src/Ai/Dungeon/Oculus/Trigger/OculusTriggers.h b/src/Ai/Dungeon/OC/OCTriggers.h similarity index 100% rename from src/Ai/Dungeon/Oculus/Trigger/OculusTriggers.h rename to src/Ai/Dungeon/OC/OCTriggers.h diff --git a/src/Ai/Dungeon/PitOfSaron/PitOfSaronActionContext.h b/src/Ai/Dungeon/PoS/PoSActionContext.h similarity index 95% rename from src/Ai/Dungeon/PitOfSaron/PitOfSaronActionContext.h rename to src/Ai/Dungeon/PoS/PoSActionContext.h index 816202a8a..b2bf1a16a 100644 --- a/src/Ai/Dungeon/PitOfSaron/PitOfSaronActionContext.h +++ b/src/Ai/Dungeon/PoS/PoSActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "PitOfSaronActions.h" +#include "PoSActions.h" class WotlkDungeonPoSActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp b/src/Ai/Dungeon/PoS/PoSActions.cpp similarity index 99% rename from src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp rename to src/Ai/Dungeon/PoS/PoSActions.cpp index 201a44199..60edaa012 100644 --- a/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.cpp +++ b/src/Ai/Dungeon/PoS/PoSActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "PitOfSaronActions.h" +#include "PoSActions.h" bool IckAndKrickAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.h b/src/Ai/Dungeon/PoS/PoSActions.h similarity index 96% rename from src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.h rename to src/Ai/Dungeon/PoS/PoSActions.h index a467766f1..b61b863b4 100644 --- a/src/Ai/Dungeon/PitOfSaron/Action/PitOfSaronActions.h +++ b/src/Ai/Dungeon/PoS/PoSActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "PitOfSaronTriggers.h" +#include "PoSTriggers.h" const Position ICKANDKRICK_TANK_POSITION = Position(816.8508f, 102.331505f, 509.1586f); diff --git a/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp b/src/Ai/Dungeon/PoS/PoSMultipliers.cpp similarity index 93% rename from src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp rename to src/Ai/Dungeon/PoS/PoSMultipliers.cpp index 00de758c1..c112e08d6 100644 --- a/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.cpp +++ b/src/Ai/Dungeon/PoS/PoSMultipliers.cpp @@ -1,9 +1,9 @@ -#include "PitOfSaronMultipliers.h" -#include "PitOfSaronActions.h" +#include "PoSMultipliers.h" +#include "PoSActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "PitOfSaronTriggers.h" +#include "PoSTriggers.h" float IckAndKrickMultiplier::GetValue(Action* action) { diff --git a/src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.h b/src/Ai/Dungeon/PoS/PoSMultipliers.h similarity index 100% rename from src/Ai/Dungeon/PitOfSaron/Multiplier/PitOfSaronMultipliers.h rename to src/Ai/Dungeon/PoS/PoSMultipliers.h diff --git a/src/Ai/Dungeon/PitOfSaron/Strategy/PitOfSaronStrategy.cpp b/src/Ai/Dungeon/PoS/PoSStrategy.cpp similarity index 87% rename from src/Ai/Dungeon/PitOfSaron/Strategy/PitOfSaronStrategy.cpp rename to src/Ai/Dungeon/PoS/PoSStrategy.cpp index 641af0a6d..4af650021 100644 --- a/src/Ai/Dungeon/PitOfSaron/Strategy/PitOfSaronStrategy.cpp +++ b/src/Ai/Dungeon/PoS/PoSStrategy.cpp @@ -1,5 +1,5 @@ -#include "PitOfSaronStrategy.h" -#include "PitOfSaronMultipliers.h" +#include "PoSStrategy.h" +#include "PoSMultipliers.h" void WotlkDungeonPoSStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Dungeon/PitOfSaron/Strategy/PitOfSaronStrategy.h b/src/Ai/Dungeon/PoS/PoSStrategy.h similarity index 100% rename from src/Ai/Dungeon/PitOfSaron/Strategy/PitOfSaronStrategy.h rename to src/Ai/Dungeon/PoS/PoSStrategy.h diff --git a/src/Ai/Dungeon/PitOfSaron/PitOfSaronTriggerContext.h b/src/Ai/Dungeon/PoS/PoSTriggerContext.h similarity index 95% rename from src/Ai/Dungeon/PitOfSaron/PitOfSaronTriggerContext.h rename to src/Ai/Dungeon/PoS/PoSTriggerContext.h index a31bff949..b6f3b2cf0 100644 --- a/src/Ai/Dungeon/PitOfSaron/PitOfSaronTriggerContext.h +++ b/src/Ai/Dungeon/PoS/PoSTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "PitOfSaronTriggers.h" +#include "PoSTriggers.h" class WotlkDungeonPoSTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/PitOfSaron/Trigger/PitOfSaronTriggers.cpp b/src/Ai/Dungeon/PoS/PoSTriggers.cpp similarity index 92% rename from src/Ai/Dungeon/PitOfSaron/Trigger/PitOfSaronTriggers.cpp rename to src/Ai/Dungeon/PoS/PoSTriggers.cpp index f744302cd..f43b68a89 100644 --- a/src/Ai/Dungeon/PitOfSaron/Trigger/PitOfSaronTriggers.cpp +++ b/src/Ai/Dungeon/PoS/PoSTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "PitOfSaronTriggers.h" +#include "PoSTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/PitOfSaron/Trigger/PitOfSaronTriggers.h b/src/Ai/Dungeon/PoS/PoSTriggers.h similarity index 100% rename from src/Ai/Dungeon/PitOfSaron/Trigger/PitOfSaronTriggers.h rename to src/Ai/Dungeon/PoS/PoSTriggers.h diff --git a/src/Ai/Dungeon/TrialOfTheChampion/TrialOfTheChampionActionContext.h b/src/Ai/Dungeon/TOC/TOCActionContext.h similarity index 96% rename from src/Ai/Dungeon/TrialOfTheChampion/TrialOfTheChampionActionContext.h rename to src/Ai/Dungeon/TOC/TOCActionContext.h index 21f877f24..ae6804b86 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/TrialOfTheChampionActionContext.h +++ b/src/Ai/Dungeon/TOC/TOCActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "TrialOfTheChampionActions.h" +#include "TOCActions.h" class WotlkDungeonToCActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Action/TrialOfTheChampionActions.cpp b/src/Ai/Dungeon/TOC/TOCActions.cpp similarity index 99% rename from src/Ai/Dungeon/TrialOfTheChampion/Action/TrialOfTheChampionActions.cpp rename to src/Ai/Dungeon/TOC/TOCActions.cpp index f3b071fe0..9938ed5bd 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Action/TrialOfTheChampionActions.cpp +++ b/src/Ai/Dungeon/TOC/TOCActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "TrialOfTheChampionActions.h" +#include "TOCActions.h" #include "NearestNpcsValue.h" #include "ObjectAccessor.h" #include "Vehicle.h" diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Action/TrialOfTheChampionActions.h b/src/Ai/Dungeon/TOC/TOCActions.h similarity index 97% rename from src/Ai/Dungeon/TrialOfTheChampion/Action/TrialOfTheChampionActions.h rename to src/Ai/Dungeon/TOC/TOCActions.h index ab2c18ae8..ad1c0fa26 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Action/TrialOfTheChampionActions.h +++ b/src/Ai/Dungeon/TOC/TOCActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "TrialOfTheChampionTriggers.h" +#include "TOCTriggers.h" #include "MovementActions.h" #include "LastMovementValue.h" #include "ObjectGuid.h" diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Multiplier/TrialOfTheChampionMultipliers.cpp b/src/Ai/Dungeon/TOC/TOCMultipliers.cpp similarity index 59% rename from src/Ai/Dungeon/TrialOfTheChampion/Multiplier/TrialOfTheChampionMultipliers.cpp rename to src/Ai/Dungeon/TOC/TOCMultipliers.cpp index c090ef68b..b2a724109 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Multiplier/TrialOfTheChampionMultipliers.cpp +++ b/src/Ai/Dungeon/TOC/TOCMultipliers.cpp @@ -1,9 +1,9 @@ -#include "TrialOfTheChampionMultipliers.h" -#include "TrialOfTheChampionActions.h" +#include "TOCMultipliers.h" +#include "TOCActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "TrialOfTheChampionTriggers.h" +#include "TOCTriggers.h" #include "Action.h" //float tocMultiplier::GetValue(Action* action) { return 1.0f; } diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Multiplier/TrialOfTheChampionMultipliers.h b/src/Ai/Dungeon/TOC/TOCMultipliers.h similarity index 100% rename from src/Ai/Dungeon/TrialOfTheChampion/Multiplier/TrialOfTheChampionMultipliers.h rename to src/Ai/Dungeon/TOC/TOCMultipliers.h diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp b/src/Ai/Dungeon/TOC/TOCStrategy.cpp similarity index 94% rename from src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp rename to src/Ai/Dungeon/TOC/TOCStrategy.cpp index 0912a912c..62ae7fb8d 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.cpp +++ b/src/Ai/Dungeon/TOC/TOCStrategy.cpp @@ -1,4 +1,4 @@ -#include "TrialOfTheChampionStrategy.h" +#include "TOCStrategy.h" void WotlkDungeonToCStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.h b/src/Ai/Dungeon/TOC/TOCStrategy.h similarity index 92% rename from src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.h rename to src/Ai/Dungeon/TOC/TOCStrategy.h index 12416d5ad..4a0c7c783 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Strategy/TrialOfTheChampionStrategy.h +++ b/src/Ai/Dungeon/TOC/TOCStrategy.h @@ -4,7 +4,7 @@ #include "AiObjectContext.h" #include "Multiplier.h" #include "Strategy.h" -#include "TrialOfTheChampionMultipliers.h" +#include "TOCMultipliers.h" class WotlkDungeonToCStrategy : public Strategy { diff --git a/src/Ai/Dungeon/TrialOfTheChampion/TrialOfTheChampionTriggerContext.h b/src/Ai/Dungeon/TOC/TOCTriggerContext.h similarity index 96% rename from src/Ai/Dungeon/TrialOfTheChampion/TrialOfTheChampionTriggerContext.h rename to src/Ai/Dungeon/TOC/TOCTriggerContext.h index f1b55c523..2e27aeeef 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/TrialOfTheChampionTriggerContext.h +++ b/src/Ai/Dungeon/TOC/TOCTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "TrialOfTheChampionTriggers.h" +#include "TOCTriggers.h" class WotlkDungeonToCTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Trigger/TrialOfTheChampionTriggers.cpp b/src/Ai/Dungeon/TOC/TOCTriggers.cpp similarity index 97% rename from src/Ai/Dungeon/TrialOfTheChampion/Trigger/TrialOfTheChampionTriggers.cpp rename to src/Ai/Dungeon/TOC/TOCTriggers.cpp index 6c388382e..2f6894043 100644 --- a/src/Ai/Dungeon/TrialOfTheChampion/Trigger/TrialOfTheChampionTriggers.cpp +++ b/src/Ai/Dungeon/TOC/TOCTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "TrialOfTheChampionTriggers.h" +#include "TOCTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/TrialOfTheChampion/Trigger/TrialOfTheChampionTriggers.h b/src/Ai/Dungeon/TOC/TOCTriggers.h similarity index 100% rename from src/Ai/Dungeon/TrialOfTheChampion/Trigger/TrialOfTheChampionTriggers.h rename to src/Ai/Dungeon/TOC/TOCTriggers.h diff --git a/src/Ai/Dungeon/TbcDungeonActionContext.h b/src/Ai/Dungeon/TbcDungeonActionContext.h index 8c3547224..6b4bf72a8 100644 --- a/src/Ai/Dungeon/TbcDungeonActionContext.h +++ b/src/Ai/Dungeon/TbcDungeonActionContext.h @@ -1,6 +1,6 @@ #ifndef _PLAYERBOT_TBCDUNGEONACTIONCONTEXT_H #define _PLAYERBOT_TBCDUNGEONACTIONCONTEXT_H -#include "AuchenaiCrypts/AuchenaiCryptsActionContext.h" +#include "ACActionContext.h" #endif diff --git a/src/Ai/Dungeon/TbcDungeonTriggerContext.h b/src/Ai/Dungeon/TbcDungeonTriggerContext.h index 9a680b7af..f28933999 100644 --- a/src/Ai/Dungeon/TbcDungeonTriggerContext.h +++ b/src/Ai/Dungeon/TbcDungeonTriggerContext.h @@ -1,6 +1,6 @@ #ifndef _PLAYERBOT_TBCDUNGEONTRIGGERCONTEXT_H #define _PLAYERBOT_TBCDUNGEONTRIGGERCONTEXT_H -#include "AuchenaiCrypts/AuchenaiCryptsTriggerContext.h" +#include "ACTriggerContext.h" #endif diff --git a/src/Ai/Dungeon/UtgardeKeep/UtgardeKeepActionContext.h b/src/Ai/Dungeon/UK/UKActionContext.h similarity index 98% rename from src/Ai/Dungeon/UtgardeKeep/UtgardeKeepActionContext.h rename to src/Ai/Dungeon/UK/UKActionContext.h index 0e51e56b4..b52aa1846 100644 --- a/src/Ai/Dungeon/UtgardeKeep/UtgardeKeepActionContext.h +++ b/src/Ai/Dungeon/UK/UKActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "UtgardeKeepActions.h" +#include "UKActions.h" class WotlkDungeonUKActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/UtgardeKeep/Action/UtgardeKeepActions.cpp b/src/Ai/Dungeon/UK/UKActions.cpp similarity index 98% rename from src/Ai/Dungeon/UtgardeKeep/Action/UtgardeKeepActions.cpp rename to src/Ai/Dungeon/UK/UKActions.cpp index 85d8590ee..b11ff6746 100644 --- a/src/Ai/Dungeon/UtgardeKeep/Action/UtgardeKeepActions.cpp +++ b/src/Ai/Dungeon/UK/UKActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "UtgardeKeepActions.h" +#include "UKActions.h" bool AttackFrostTombAction::isUseful() { return !botAI->IsHeal(bot); } bool AttackFrostTombAction::Execute(Event /*event*/) diff --git a/src/Ai/Dungeon/UtgardeKeep/Action/UtgardeKeepActions.h b/src/Ai/Dungeon/UK/UKActions.h similarity index 97% rename from src/Ai/Dungeon/UtgardeKeep/Action/UtgardeKeepActions.h rename to src/Ai/Dungeon/UK/UKActions.h index c9c77d520..c7d4c59d4 100644 --- a/src/Ai/Dungeon/UtgardeKeep/Action/UtgardeKeepActions.h +++ b/src/Ai/Dungeon/UK/UKActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "UtgardeKeepTriggers.h" +#include "UKTriggers.h" class AttackFrostTombAction : public AttackAction { diff --git a/src/Ai/Dungeon/UtgardeKeep/Multiplier/UtgardeKeepMultipliers.cpp b/src/Ai/Dungeon/UK/UKMultipliers.cpp similarity index 96% rename from src/Ai/Dungeon/UtgardeKeep/Multiplier/UtgardeKeepMultipliers.cpp rename to src/Ai/Dungeon/UK/UKMultipliers.cpp index e9a411dac..98f5528f2 100644 --- a/src/Ai/Dungeon/UtgardeKeep/Multiplier/UtgardeKeepMultipliers.cpp +++ b/src/Ai/Dungeon/UK/UKMultipliers.cpp @@ -1,8 +1,8 @@ -#include "UtgardeKeepMultipliers.h" -#include "UtgardeKeepActions.h" +#include "UKMultipliers.h" +#include "UKActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" -#include "UtgardeKeepTriggers.h" +#include "UKTriggers.h" float PrinceKelesethMultiplier::GetValue(Action* action) { diff --git a/src/Ai/Dungeon/UtgardeKeep/Multiplier/UtgardeKeepMultipliers.h b/src/Ai/Dungeon/UK/UKMultipliers.h similarity index 100% rename from src/Ai/Dungeon/UtgardeKeep/Multiplier/UtgardeKeepMultipliers.h rename to src/Ai/Dungeon/UK/UKMultipliers.h diff --git a/src/Ai/Dungeon/UtgardeKeep/Strategy/UtgardeKeepStrategy.cpp b/src/Ai/Dungeon/UK/UKStrategy.cpp similarity index 96% rename from src/Ai/Dungeon/UtgardeKeep/Strategy/UtgardeKeepStrategy.cpp rename to src/Ai/Dungeon/UK/UKStrategy.cpp index 562cb8ec5..b298edbc1 100644 --- a/src/Ai/Dungeon/UtgardeKeep/Strategy/UtgardeKeepStrategy.cpp +++ b/src/Ai/Dungeon/UK/UKStrategy.cpp @@ -1,5 +1,5 @@ -#include "UtgardeKeepStrategy.h" -#include "UtgardeKeepMultipliers.h" +#include "UKStrategy.h" +#include "UKMultipliers.h" void WotlkDungeonUKStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/UtgardeKeep/Strategy/UtgardeKeepStrategy.h b/src/Ai/Dungeon/UK/UKStrategy.h similarity index 100% rename from src/Ai/Dungeon/UtgardeKeep/Strategy/UtgardeKeepStrategy.h rename to src/Ai/Dungeon/UK/UKStrategy.h diff --git a/src/Ai/Dungeon/UtgardeKeep/UtgardeKeepTriggerContext.h b/src/Ai/Dungeon/UK/UKTriggerContext.h similarity index 98% rename from src/Ai/Dungeon/UtgardeKeep/UtgardeKeepTriggerContext.h rename to src/Ai/Dungeon/UK/UKTriggerContext.h index 52ec95dae..59bc18972 100644 --- a/src/Ai/Dungeon/UtgardeKeep/UtgardeKeepTriggerContext.h +++ b/src/Ai/Dungeon/UK/UKTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "UtgardeKeepTriggers.h" +#include "UKTriggers.h" class WotlkDungeonUKTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/UtgardeKeep/Trigger/UtgardeKeepTriggers.cpp b/src/Ai/Dungeon/UK/UKTriggers.cpp similarity index 98% rename from src/Ai/Dungeon/UtgardeKeep/Trigger/UtgardeKeepTriggers.cpp rename to src/Ai/Dungeon/UK/UKTriggers.cpp index e19234bd0..4fda7a0a3 100644 --- a/src/Ai/Dungeon/UtgardeKeep/Trigger/UtgardeKeepTriggers.cpp +++ b/src/Ai/Dungeon/UK/UKTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "UtgardeKeepTriggers.h" +#include "UKTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/UtgardeKeep/Trigger/UtgardeKeepTriggers.h b/src/Ai/Dungeon/UK/UKTriggers.h similarity index 100% rename from src/Ai/Dungeon/UtgardeKeep/Trigger/UtgardeKeepTriggers.h rename to src/Ai/Dungeon/UK/UKTriggers.h diff --git a/src/Ai/Dungeon/UtgardePinnacle/UtgardePinnacleActionContext.h b/src/Ai/Dungeon/UP/UPActionContext.h similarity index 96% rename from src/Ai/Dungeon/UtgardePinnacle/UtgardePinnacleActionContext.h rename to src/Ai/Dungeon/UP/UPActionContext.h index 9e7532b9a..bab3c83b2 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/UtgardePinnacleActionContext.h +++ b/src/Ai/Dungeon/UP/UPActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "UtgardePinnacleActions.h" +#include "UPActions.h" class WotlkDungeonUPActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/UtgardePinnacle/Action/UtgardePinnacleActions.cpp b/src/Ai/Dungeon/UP/UPActions.cpp similarity index 98% rename from src/Ai/Dungeon/UtgardePinnacle/Action/UtgardePinnacleActions.cpp rename to src/Ai/Dungeon/UP/UPActions.cpp index 8025f1aac..802da7262 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/Action/UtgardePinnacleActions.cpp +++ b/src/Ai/Dungeon/UP/UPActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "UtgardePinnacleActions.h" +#include "UPActions.h" bool AvoidFreezingCloudAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/UtgardePinnacle/Action/UtgardePinnacleActions.h b/src/Ai/Dungeon/UP/UPActions.h similarity index 94% rename from src/Ai/Dungeon/UtgardePinnacle/Action/UtgardePinnacleActions.h rename to src/Ai/Dungeon/UP/UPActions.h index 38e90dd15..444b0e184 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/Action/UtgardePinnacleActions.h +++ b/src/Ai/Dungeon/UP/UPActions.h @@ -5,7 +5,7 @@ #include "AttackAction.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "UtgardePinnacleTriggers.h" +#include "UPTriggers.h" class AvoidFreezingCloudAction : public MovementAction { diff --git a/src/Ai/Dungeon/UtgardePinnacle/Multiplier/UtgardePinnacleMultipliers.cpp b/src/Ai/Dungeon/UP/UPMultipliers.cpp similarity index 96% rename from src/Ai/Dungeon/UtgardePinnacle/Multiplier/UtgardePinnacleMultipliers.cpp rename to src/Ai/Dungeon/UP/UPMultipliers.cpp index cc34cb6a4..bccf84028 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/Multiplier/UtgardePinnacleMultipliers.cpp +++ b/src/Ai/Dungeon/UP/UPMultipliers.cpp @@ -1,9 +1,9 @@ -#include "UtgardePinnacleMultipliers.h" -#include "UtgardePinnacleActions.h" +#include "UPMultipliers.h" +#include "UPActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "UtgardePinnacleTriggers.h" +#include "UPTriggers.h" #include "Action.h" float SkadiMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/UtgardePinnacle/Multiplier/UtgardePinnacleMultipliers.h b/src/Ai/Dungeon/UP/UPMultipliers.h similarity index 100% rename from src/Ai/Dungeon/UtgardePinnacle/Multiplier/UtgardePinnacleMultipliers.h rename to src/Ai/Dungeon/UP/UPMultipliers.h diff --git a/src/Ai/Dungeon/UtgardePinnacle/Strategy/UtgardePinnacleStrategy.cpp b/src/Ai/Dungeon/UP/UPStrategy.cpp similarity index 92% rename from src/Ai/Dungeon/UtgardePinnacle/Strategy/UtgardePinnacleStrategy.cpp rename to src/Ai/Dungeon/UP/UPStrategy.cpp index fe104f34f..392c23c2f 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/Strategy/UtgardePinnacleStrategy.cpp +++ b/src/Ai/Dungeon/UP/UPStrategy.cpp @@ -1,5 +1,5 @@ -#include "UtgardePinnacleStrategy.h" -#include "UtgardePinnacleMultipliers.h" +#include "UPStrategy.h" +#include "UPMultipliers.h" void WotlkDungeonUPStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/UtgardePinnacle/Strategy/UtgardePinnacleStrategy.h b/src/Ai/Dungeon/UP/UPStrategy.h similarity index 100% rename from src/Ai/Dungeon/UtgardePinnacle/Strategy/UtgardePinnacleStrategy.h rename to src/Ai/Dungeon/UP/UPStrategy.h diff --git a/src/Ai/Dungeon/UtgardePinnacle/UtgardePinnacleTriggerContext.h b/src/Ai/Dungeon/UP/UPTriggerContext.h similarity index 95% rename from src/Ai/Dungeon/UtgardePinnacle/UtgardePinnacleTriggerContext.h rename to src/Ai/Dungeon/UP/UPTriggerContext.h index 527453f8b..ffcafad67 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/UtgardePinnacleTriggerContext.h +++ b/src/Ai/Dungeon/UP/UPTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "UtgardePinnacleTriggers.h" +#include "UPTriggers.h" class WotlkDungeonUPTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/UtgardePinnacle/Trigger/UtgardePinnacleTriggers.cpp b/src/Ai/Dungeon/UP/UPTriggers.cpp similarity index 98% rename from src/Ai/Dungeon/UtgardePinnacle/Trigger/UtgardePinnacleTriggers.cpp rename to src/Ai/Dungeon/UP/UPTriggers.cpp index dc35e8be0..4baeaa725 100644 --- a/src/Ai/Dungeon/UtgardePinnacle/Trigger/UtgardePinnacleTriggers.cpp +++ b/src/Ai/Dungeon/UP/UPTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "UtgardePinnacleTriggers.h" +#include "UPTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/UtgardePinnacle/Trigger/UtgardePinnacleTriggers.h b/src/Ai/Dungeon/UP/UPTriggers.h similarity index 100% rename from src/Ai/Dungeon/UtgardePinnacle/Trigger/UtgardePinnacleTriggers.h rename to src/Ai/Dungeon/UP/UPTriggers.h diff --git a/src/Ai/Dungeon/VioletHold/VioletHoldActionContext.h b/src/Ai/Dungeon/VH/VHActionContext.h similarity index 97% rename from src/Ai/Dungeon/VioletHold/VioletHoldActionContext.h rename to src/Ai/Dungeon/VH/VHActionContext.h index 902332f15..783d49081 100644 --- a/src/Ai/Dungeon/VioletHold/VioletHoldActionContext.h +++ b/src/Ai/Dungeon/VH/VHActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "VioletHoldActions.h" +#include "VHActions.h" class WotlkDungeonVHActionContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/VioletHold/Action/VioletHoldActions.cpp b/src/Ai/Dungeon/VH/VHActions.cpp similarity index 98% rename from src/Ai/Dungeon/VioletHold/Action/VioletHoldActions.cpp rename to src/Ai/Dungeon/VH/VHActions.cpp index b61f84bdf..aa04fdb41 100644 --- a/src/Ai/Dungeon/VioletHold/Action/VioletHoldActions.cpp +++ b/src/Ai/Dungeon/VH/VHActions.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "VioletHoldActions.h" +#include "VHActions.h" bool AttackErekemAction::Execute(Event /*event*/) { diff --git a/src/Ai/Dungeon/VioletHold/Action/VioletHoldActions.h b/src/Ai/Dungeon/VH/VHActions.h similarity index 97% rename from src/Ai/Dungeon/VioletHold/Action/VioletHoldActions.h rename to src/Ai/Dungeon/VH/VHActions.h index fc7ce9d29..64e5e74f5 100644 --- a/src/Ai/Dungeon/VioletHold/Action/VioletHoldActions.h +++ b/src/Ai/Dungeon/VH/VHActions.h @@ -6,7 +6,7 @@ #include "GenericSpellActions.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "VioletHoldTriggers.h" +#include "VHTriggers.h" class AttackErekemAction : public AttackAction { diff --git a/src/Ai/Dungeon/VioletHold/Multiplier/VioletHoldMultipliers.cpp b/src/Ai/Dungeon/VH/VHMultipliers.cpp similarity index 93% rename from src/Ai/Dungeon/VioletHold/Multiplier/VioletHoldMultipliers.cpp rename to src/Ai/Dungeon/VH/VHMultipliers.cpp index 3d3a13cd0..d5f79324a 100644 --- a/src/Ai/Dungeon/VioletHold/Multiplier/VioletHoldMultipliers.cpp +++ b/src/Ai/Dungeon/VH/VHMultipliers.cpp @@ -1,9 +1,9 @@ -#include "VioletHoldMultipliers.h" -#include "VioletHoldActions.h" +#include "VHMultipliers.h" +#include "VHActions.h" #include "GenericSpellActions.h" #include "ChooseTargetActions.h" #include "MovementActions.h" -#include "VioletHoldTriggers.h" +#include "VHTriggers.h" #include "Action.h" float ErekemMultiplier::GetValue(Action* action) diff --git a/src/Ai/Dungeon/VioletHold/Multiplier/VioletHoldMultipliers.h b/src/Ai/Dungeon/VH/VHMultipliers.h similarity index 100% rename from src/Ai/Dungeon/VioletHold/Multiplier/VioletHoldMultipliers.h rename to src/Ai/Dungeon/VH/VHMultipliers.h diff --git a/src/Ai/Dungeon/VioletHold/Strategy/VioletHoldStrategy.cpp b/src/Ai/Dungeon/VH/VHStrategy.cpp similarity index 95% rename from src/Ai/Dungeon/VioletHold/Strategy/VioletHoldStrategy.cpp rename to src/Ai/Dungeon/VH/VHStrategy.cpp index ffc00e306..a30fa733a 100644 --- a/src/Ai/Dungeon/VioletHold/Strategy/VioletHoldStrategy.cpp +++ b/src/Ai/Dungeon/VH/VHStrategy.cpp @@ -1,5 +1,5 @@ -#include "VioletHoldStrategy.h" -#include "VioletHoldMultipliers.h" +#include "VHStrategy.h" +#include "VHMultipliers.h" void WotlkDungeonVHStrategy::InitTriggers(std::vector &triggers) { diff --git a/src/Ai/Dungeon/VioletHold/Strategy/VioletHoldStrategy.h b/src/Ai/Dungeon/VH/VHStrategy.h similarity index 100% rename from src/Ai/Dungeon/VioletHold/Strategy/VioletHoldStrategy.h rename to src/Ai/Dungeon/VH/VHStrategy.h diff --git a/src/Ai/Dungeon/VioletHold/VioletHoldTriggerContext.h b/src/Ai/Dungeon/VH/VHTriggerContext.h similarity index 97% rename from src/Ai/Dungeon/VioletHold/VioletHoldTriggerContext.h rename to src/Ai/Dungeon/VH/VHTriggerContext.h index 45d298121..9106f2a13 100644 --- a/src/Ai/Dungeon/VioletHold/VioletHoldTriggerContext.h +++ b/src/Ai/Dungeon/VH/VHTriggerContext.h @@ -3,7 +3,7 @@ #include "NamedObjectContext.h" #include "AiObjectContext.h" -#include "VioletHoldTriggers.h" +#include "VHTriggers.h" class WotlkDungeonVHTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Dungeon/VioletHold/Trigger/VioletHoldTriggers.cpp b/src/Ai/Dungeon/VH/VHTriggers.cpp similarity index 97% rename from src/Ai/Dungeon/VioletHold/Trigger/VioletHoldTriggers.cpp rename to src/Ai/Dungeon/VH/VHTriggers.cpp index 87284b0e4..26d05f96f 100644 --- a/src/Ai/Dungeon/VioletHold/Trigger/VioletHoldTriggers.cpp +++ b/src/Ai/Dungeon/VH/VHTriggers.cpp @@ -1,5 +1,5 @@ #include "Playerbots.h" -#include "VioletHoldTriggers.h" +#include "VHTriggers.h" #include "AiObject.h" #include "AiObjectContext.h" diff --git a/src/Ai/Dungeon/VioletHold/Trigger/VioletHoldTriggers.h b/src/Ai/Dungeon/VH/VHTriggers.h similarity index 100% rename from src/Ai/Dungeon/VioletHold/Trigger/VioletHoldTriggers.h rename to src/Ai/Dungeon/VH/VHTriggers.h diff --git a/src/Ai/Dungeon/WotlkDungeonActionContext.h b/src/Ai/Dungeon/WotlkDungeonActionContext.h index c7202de61..b77f94fcc 100644 --- a/src/Ai/Dungeon/WotlkDungeonActionContext.h +++ b/src/Ai/Dungeon/WotlkDungeonActionContext.h @@ -1,21 +1,21 @@ #ifndef _PLAYERBOT_WOTLKDUNGEONACTIONCONTEXT_H #define _PLAYERBOT_WOTLKDUNGEONACTIONCONTEXT_H -#include "UtgardeKeep/UtgardeKeepActionContext.h" -#include "Nexus/NexusActionContext.h" -#include "AzjolNerub/AzjolNerubActionContext.h" -#include "OldKingdom/OldKingdomActionContext.h" -#include "DraktharonKeep/DrakTharonKeepActionContext.h" -#include "VioletHold/VioletHoldActionContext.h" -#include "Gundrak/GundrakActionContext.h" -#include "HallsOfStone/HallsOfStoneActionContext.h" -#include "HallsOfLightning/HallsOfLightningActionContext.h" -#include "Oculus/OculusActionContext.h" -#include "UtgardePinnacle/UtgardePinnacleActionContext.h" -#include "CullingOfStratholme/CullingOfStratholmeActionContext.h" -#include "ForgeOfSouls/ForgeOfSoulsActionContext.h" -#include "PitOfSaron/PitOfSaronActionContext.h" -#include "TrialOfTheChampion/TrialOfTheChampionActionContext.h" +#include "UKActionContext.h" +#include "NexActionContext.h" +#include "ANActionContext.h" +#include "AKActionContext.h" +#include "DTKActionContext.h" +#include "VHActionContext.h" +#include "GDActionContext.h" +#include "HoSActionContext.h" +#include "HoLActionContext.h" +#include "OCActionContext.h" +#include "UPActionContext.h" +#include "CoSActionContext.h" +#include "FoSActionContext.h" +#include "PoSActionContext.h" +#include "TOCActionContext.h" // #include "HallsOfReflection/HallsOfReflectionActionContext.h" #endif diff --git a/src/Ai/Dungeon/WotlkDungeonTriggerContext.h b/src/Ai/Dungeon/WotlkDungeonTriggerContext.h index 630aecbd9..b07973d6b 100644 --- a/src/Ai/Dungeon/WotlkDungeonTriggerContext.h +++ b/src/Ai/Dungeon/WotlkDungeonTriggerContext.h @@ -1,21 +1,21 @@ #ifndef _PLAYERBOT_WOTLKDUNGEONTRIGGERCONTEXT_H #define _PLAYERBOT_WOTLKDUNGEONTRIGGERCONTEXT_H -#include "UtgardeKeep/UtgardeKeepTriggerContext.h" -#include "Nexus/NexusTriggerContext.h" -#include "AzjolNerub/AzjolNerubTriggerContext.h" -#include "OldKingdom/OldKingdomTriggerContext.h" -#include "DraktharonKeep/DrakTharonKeepTriggerContext.h" -#include "VioletHold/VioletHoldTriggerContext.h" -#include "Gundrak/GundrakTriggerContext.h" -#include "HallsOfStone/HallsOfStoneTriggerContext.h" -#include "HallsOfLightning/HallsOfLightningTriggerContext.h" -#include "Oculus/OculusTriggerContext.h" -#include "UtgardePinnacle/UtgardePinnacleTriggerContext.h" -#include "CullingOfStratholme/CullingOfStratholmeTriggerContext.h" -#include "ForgeOfSouls/ForgeOfSoulsTriggerContext.h" -#include "PitOfSaron/PitOfSaronTriggerContext.h" -#include "TrialOfTheChampion/TrialOfTheChampionTriggerContext.h" +#include "UKTriggerContext.h" +#include "NexTriggerContext.h" +#include "ANTriggerContext.h" +#include "AKTriggerContext.h" +#include "DTKTriggerContext.h" +#include "VHTriggerContext.h" +#include "GDTriggerContext.h" +#include "HoSTriggerContext.h" +#include "HoLTriggerContext.h" +#include "OCTriggerContext.h" +#include "UPTriggerContext.h" +#include "CoSTriggerContext.h" +#include "FoSTriggerContext.h" +#include "PoSTriggerContext.h" +#include "TOCTriggerContext.h" // #include "HallsOfReflection/HallsOfReflectionTriggerContext.h" #endif diff --git a/src/Ai/Raid/Aq20/RaidAq20ActionContext.h b/src/Ai/Raid/Aq20/Aq20ActionContext.h similarity index 93% rename from src/Ai/Raid/Aq20/RaidAq20ActionContext.h rename to src/Ai/Raid/Aq20/Aq20ActionContext.h index ea3afcf41..cde831f5c 100644 --- a/src/Ai/Raid/Aq20/RaidAq20ActionContext.h +++ b/src/Ai/Raid/Aq20/Aq20ActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidAq20Actions.h" +#include "Aq20Actions.h" class RaidAq20ActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/Aq20/Action/RaidAq20Actions.cpp b/src/Ai/Raid/Aq20/Aq20Actions.cpp similarity index 97% rename from src/Ai/Raid/Aq20/Action/RaidAq20Actions.cpp rename to src/Ai/Raid/Aq20/Aq20Actions.cpp index 5d9b4aaa3..8f4d63801 100644 --- a/src/Ai/Raid/Aq20/Action/RaidAq20Actions.cpp +++ b/src/Ai/Raid/Aq20/Aq20Actions.cpp @@ -1,6 +1,6 @@ -#include "RaidAq20Actions.h" +#include "Aq20Actions.h" -#include "RaidAq20Utils.h" +#include "Aq20Utils.h" bool Aq20UseCrystalAction::Execute(Event /*event*/) { diff --git a/src/Ai/Raid/Aq20/Action/RaidAq20Actions.h b/src/Ai/Raid/Aq20/Aq20Actions.h similarity index 100% rename from src/Ai/Raid/Aq20/Action/RaidAq20Actions.h rename to src/Ai/Raid/Aq20/Aq20Actions.h diff --git a/src/Ai/Raid/Aq20/Strategy/RaidAq20Strategy.cpp b/src/Ai/Raid/Aq20/Aq20Strategy.cpp similarity index 88% rename from src/Ai/Raid/Aq20/Strategy/RaidAq20Strategy.cpp rename to src/Ai/Raid/Aq20/Aq20Strategy.cpp index 93e0462ca..a16c2b652 100644 --- a/src/Ai/Raid/Aq20/Strategy/RaidAq20Strategy.cpp +++ b/src/Ai/Raid/Aq20/Aq20Strategy.cpp @@ -1,4 +1,4 @@ -#include "RaidAq20Strategy.h" +#include "Aq20Strategy.h" #include "Strategy.h" diff --git a/src/Ai/Raid/Aq20/Strategy/RaidAq20Strategy.h b/src/Ai/Raid/Aq20/Aq20Strategy.h similarity index 100% rename from src/Ai/Raid/Aq20/Strategy/RaidAq20Strategy.h rename to src/Ai/Raid/Aq20/Aq20Strategy.h diff --git a/src/Ai/Raid/Aq20/RaidAq20TriggerContext.h b/src/Ai/Raid/Aq20/Aq20TriggerContext.h similarity index 93% rename from src/Ai/Raid/Aq20/RaidAq20TriggerContext.h rename to src/Ai/Raid/Aq20/Aq20TriggerContext.h index b0307ca6a..cdc101da1 100644 --- a/src/Ai/Raid/Aq20/RaidAq20TriggerContext.h +++ b/src/Ai/Raid/Aq20/Aq20TriggerContext.h @@ -2,7 +2,7 @@ #define _PLAYERBOT_RAIDAQ20TRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidAq20Triggers.h" +#include "Aq20Triggers.h" class RaidAq20TriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/Aq20/Trigger/RaidAq20Triggers.cpp b/src/Ai/Raid/Aq20/Aq20Triggers.cpp similarity index 96% rename from src/Ai/Raid/Aq20/Trigger/RaidAq20Triggers.cpp rename to src/Ai/Raid/Aq20/Aq20Triggers.cpp index 913cb2690..77bd0395d 100644 --- a/src/Ai/Raid/Aq20/Trigger/RaidAq20Triggers.cpp +++ b/src/Ai/Raid/Aq20/Aq20Triggers.cpp @@ -1,6 +1,6 @@ -#include "RaidAq20Triggers.h" +#include "Aq20Triggers.h" -#include "RaidAq20Utils.h" +#include "Aq20Utils.h" bool Aq20MoveToCrystalTrigger::IsActive() { diff --git a/src/Ai/Raid/Aq20/Trigger/RaidAq20Triggers.h b/src/Ai/Raid/Aq20/Aq20Triggers.h similarity index 100% rename from src/Ai/Raid/Aq20/Trigger/RaidAq20Triggers.h rename to src/Ai/Raid/Aq20/Aq20Triggers.h diff --git a/src/Ai/Raid/Aq20/Util/RaidAq20Utils.cpp b/src/Ai/Raid/Aq20/Aq20Utils.cpp similarity index 97% rename from src/Ai/Raid/Aq20/Util/RaidAq20Utils.cpp rename to src/Ai/Raid/Aq20/Aq20Utils.cpp index 41637af7b..e7c74d4f3 100644 --- a/src/Ai/Raid/Aq20/Util/RaidAq20Utils.cpp +++ b/src/Ai/Raid/Aq20/Aq20Utils.cpp @@ -1,4 +1,4 @@ -#include "RaidAq20Utils.h" +#include "Aq20Utils.h" #include "SpellAuras.h" diff --git a/src/Ai/Raid/Aq20/Util/RaidAq20Utils.h b/src/Ai/Raid/Aq20/Aq20Utils.h similarity index 100% rename from src/Ai/Raid/Aq20/Util/RaidAq20Utils.h rename to src/Ai/Raid/Aq20/Aq20Utils.h diff --git a/src/Ai/Raid/BlackTemple/RaidBlackTempleActionContext.h b/src/Ai/Raid/BT/BTActionContext.h similarity index 99% rename from src/Ai/Raid/BlackTemple/RaidBlackTempleActionContext.h rename to src/Ai/Raid/BT/BTActionContext.h index 8271449b5..7a962857e 100644 --- a/src/Ai/Raid/BlackTemple/RaidBlackTempleActionContext.h +++ b/src/Ai/Raid/BT/BTActionContext.h @@ -7,7 +7,7 @@ #define _PLAYERBOT_RAIDBLACKTEMPLEACTIONCONTEXT_H #include "NamedObjectContext.h" -#include "RaidBlackTempleActions.h" +#include "BTActions.h" class RaidBlackTempleActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/BlackTemple/Action/RaidBlackTempleActions.cpp b/src/Ai/Raid/BT/BTActions.cpp similarity index 99% rename from src/Ai/Raid/BlackTemple/Action/RaidBlackTempleActions.cpp rename to src/Ai/Raid/BT/BTActions.cpp index cd6c06892..42c33509e 100644 --- a/src/Ai/Raid/BlackTemple/Action/RaidBlackTempleActions.cpp +++ b/src/Ai/Raid/BT/BTActions.cpp @@ -3,13 +3,13 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidBlackTempleActions.h" +#include "BTActions.h" #include #include "CreatureAI.h" #include "Playerbots.h" -#include "RaidBlackTempleHelpers.h" +#include "BTHelpers.h" #include "RaidBossHelpers.h" using namespace BlackTempleHelpers; diff --git a/src/Ai/Raid/BlackTemple/Action/RaidBlackTempleActions.h b/src/Ai/Raid/BT/BTActions.h similarity index 99% rename from src/Ai/Raid/BlackTemple/Action/RaidBlackTempleActions.h rename to src/Ai/Raid/BT/BTActions.h index d4bc41d23..b4386f892 100644 --- a/src/Ai/Raid/BlackTemple/Action/RaidBlackTempleActions.h +++ b/src/Ai/Raid/BT/BTActions.h @@ -9,7 +9,7 @@ #include "Action.h" #include "AttackAction.h" #include "MovementActions.h" -#include "RaidBlackTempleHelpers.h" +#include "BTHelpers.h" namespace BlackTempleHelpers { diff --git a/src/Ai/Raid/BlackTemple/Util/RaidBlackTempleHelpers.cpp b/src/Ai/Raid/BT/BTHelpers.cpp similarity index 99% rename from src/Ai/Raid/BlackTemple/Util/RaidBlackTempleHelpers.cpp rename to src/Ai/Raid/BT/BTHelpers.cpp index 75b0be0ba..2ba4adca2 100644 --- a/src/Ai/Raid/BlackTemple/Util/RaidBlackTempleHelpers.cpp +++ b/src/Ai/Raid/BT/BTHelpers.cpp @@ -3,7 +3,7 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidBlackTempleHelpers.h" +#include "BTHelpers.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/BlackTemple/Util/RaidBlackTempleHelpers.h b/src/Ai/Raid/BT/BTHelpers.h similarity index 100% rename from src/Ai/Raid/BlackTemple/Util/RaidBlackTempleHelpers.h rename to src/Ai/Raid/BT/BTHelpers.h diff --git a/src/Ai/Raid/BlackTemple/Multiplier/RaidBlackTempleMultipliers.cpp b/src/Ai/Raid/BT/BTMultipliers.cpp similarity index 99% rename from src/Ai/Raid/BlackTemple/Multiplier/RaidBlackTempleMultipliers.cpp rename to src/Ai/Raid/BT/BTMultipliers.cpp index 94e5143a6..6e484e421 100644 --- a/src/Ai/Raid/BlackTemple/Multiplier/RaidBlackTempleMultipliers.cpp +++ b/src/Ai/Raid/BT/BTMultipliers.cpp @@ -3,7 +3,7 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidBlackTempleMultipliers.h" +#include "BTMultipliers.h" #include "ChooseTargetActions.h" #include "DKActions.h" @@ -15,8 +15,8 @@ #include "MageActions.h" #include "PaladinActions.h" #include "PriestActions.h" -#include "RaidBlackTempleActions.h" -#include "RaidBlackTempleHelpers.h" +#include "BTActions.h" +#include "BTHelpers.h" #include "ReachTargetActions.h" #include "RogueActions.h" #include "ShamanActions.h" diff --git a/src/Ai/Raid/BlackTemple/Multiplier/RaidBlackTempleMultipliers.h b/src/Ai/Raid/BT/BTMultipliers.h similarity index 100% rename from src/Ai/Raid/BlackTemple/Multiplier/RaidBlackTempleMultipliers.h rename to src/Ai/Raid/BT/BTMultipliers.h diff --git a/src/Ai/Raid/BlackTemple/Strategy/RaidBlackTempleStrategy.cpp b/src/Ai/Raid/BT/BTStrategy.cpp similarity index 99% rename from src/Ai/Raid/BlackTemple/Strategy/RaidBlackTempleStrategy.cpp rename to src/Ai/Raid/BT/BTStrategy.cpp index 157469895..3fd0adeff 100644 --- a/src/Ai/Raid/BlackTemple/Strategy/RaidBlackTempleStrategy.cpp +++ b/src/Ai/Raid/BT/BTStrategy.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidBlackTempleStrategy.h" +#include "BTStrategy.h" -#include "RaidBlackTempleMultipliers.h" +#include "BTMultipliers.h" void RaidBlackTempleStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/BlackTemple/Strategy/RaidBlackTempleStrategy.h b/src/Ai/Raid/BT/BTStrategy.h similarity index 100% rename from src/Ai/Raid/BlackTemple/Strategy/RaidBlackTempleStrategy.h rename to src/Ai/Raid/BT/BTStrategy.h diff --git a/src/Ai/Raid/BlackTemple/RaidBlackTempleTriggerContext.h b/src/Ai/Raid/BT/BTTriggerContext.h similarity index 99% rename from src/Ai/Raid/BlackTemple/RaidBlackTempleTriggerContext.h rename to src/Ai/Raid/BT/BTTriggerContext.h index d9cc09489..ee10108ad 100644 --- a/src/Ai/Raid/BlackTemple/RaidBlackTempleTriggerContext.h +++ b/src/Ai/Raid/BT/BTTriggerContext.h @@ -7,7 +7,7 @@ #define _PLAYERBOT_RAIDBLACKTEMPLETRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidBlackTempleTriggers.h" +#include "BTTriggers.h" class RaidBlackTempleTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/BlackTemple/Trigger/RaidBlackTempleTriggers.cpp b/src/Ai/Raid/BT/BTTriggers.cpp similarity index 99% rename from src/Ai/Raid/BlackTemple/Trigger/RaidBlackTempleTriggers.cpp rename to src/Ai/Raid/BT/BTTriggers.cpp index 388e28d8b..6dc5e574c 100644 --- a/src/Ai/Raid/BlackTemple/Trigger/RaidBlackTempleTriggers.cpp +++ b/src/Ai/Raid/BT/BTTriggers.cpp @@ -3,12 +3,12 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidBlackTempleTriggers.h" +#include "BTTriggers.h" #include "AiFactory.h" #include "Playerbots.h" -#include "RaidBlackTempleActions.h" -#include "RaidBlackTempleHelpers.h" +#include "BTActions.h" +#include "BTHelpers.h" #include "RaidBossHelpers.h" #include "SharedDefines.h" diff --git a/src/Ai/Raid/BlackTemple/Trigger/RaidBlackTempleTriggers.h b/src/Ai/Raid/BT/BTTriggers.h similarity index 100% rename from src/Ai/Raid/BlackTemple/Trigger/RaidBlackTempleTriggers.h rename to src/Ai/Raid/BT/BTTriggers.h diff --git a/src/Ai/Raid/BlackwingLair/RaidBwlActionContext.h b/src/Ai/Raid/BWL/BWLActionContext.h similarity index 80% rename from src/Ai/Raid/BlackwingLair/RaidBwlActionContext.h rename to src/Ai/Raid/BWL/BWLActionContext.h index 7b73f410f..db93476fe 100644 --- a/src/Ai/Raid/BlackwingLair/RaidBwlActionContext.h +++ b/src/Ai/Raid/BWL/BWLActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidBwlActions.h" +#include "BWLActions.h" class RaidBwlActionContext : public NamedObjectContext { @@ -13,12 +13,14 @@ public: creators["bwl check onyxia scale cloak"] = &RaidBwlActionContext::bwl_check_onyxia_scale_cloak; creators["bwl turn off suppression device"] = &RaidBwlActionContext::bwl_turn_off_suppression_device; creators["bwl use hourglass sand"] = &RaidBwlActionContext::bwl_use_hourglass_sand; + creators["bwl nefarian fear ward"] = &RaidBwlActionContext::bwl_nefarian_fear_ward; } private: static Action* bwl_check_onyxia_scale_cloak(PlayerbotAI* botAI) { return new BwlOnyxiaScaleCloakAuraCheckAction(botAI); } static Action* bwl_turn_off_suppression_device(PlayerbotAI* botAI) { return new BwlTurnOffSuppressionDeviceAction(botAI); } static Action* bwl_use_hourglass_sand(PlayerbotAI* botAI) { return new BwlUseHourglassSandAction(botAI); } + static Action* bwl_nefarian_fear_ward(PlayerbotAI* botAI) { return new BwlNefarianFearWardAction(botAI); } }; #endif diff --git a/src/Ai/Raid/BlackwingLair/Action/RaidBwlActions.cpp b/src/Ai/Raid/BWL/BWLActions.cpp similarity index 70% rename from src/Ai/Raid/BlackwingLair/Action/RaidBwlActions.cpp rename to src/Ai/Raid/BWL/BWLActions.cpp index 2d018fc91..10c8dc4ae 100644 --- a/src/Ai/Raid/BlackwingLair/Action/RaidBwlActions.cpp +++ b/src/Ai/Raid/BWL/BWLActions.cpp @@ -1,7 +1,7 @@ -#include "RaidBwlActions.h" +#include "BWLActions.h" #include "Playerbots.h" -#include "RaidBwlHelpers.h" +#include "BWLHelpers.h" using namespace BlackwingLairHelpers; @@ -38,3 +38,16 @@ bool BwlUseHourglassSandAction::Execute(Event /*event*/) { return botAI->CastSpell(SPELL_HOURGLASS_SAND, bot); } + +bool BwlNefarianFearWardAction::Execute(Event /*event*/) +{ + Unit* nefarian = AI_VALUE2(Unit*, "find target", "nefarian"); + if (!nefarian) + return false; + + Unit* victim = nefarian->GetVictim(); + if (!victim) + return false; + + return botAI->CastSpell("fear ward", victim); +} diff --git a/src/Ai/Raid/BlackwingLair/Action/RaidBwlActions.h b/src/Ai/Raid/BWL/BWLActions.h similarity index 80% rename from src/Ai/Raid/BlackwingLair/Action/RaidBwlActions.h rename to src/Ai/Raid/BWL/BWLActions.h index 27037414a..28b2f667c 100644 --- a/src/Ai/Raid/BlackwingLair/Action/RaidBwlActions.h +++ b/src/Ai/Raid/BWL/BWLActions.h @@ -29,4 +29,11 @@ public: bool Execute(Event event) override; }; +class BwlNefarianFearWardAction : public Action +{ +public: + BwlNefarianFearWardAction(PlayerbotAI* botAI) : Action(botAI, "bwl nefarian fear ward") {} + bool Execute(Event event) override; +}; + #endif diff --git a/src/Ai/Raid/BlackwingLair/Util/RaidBwlHelpers.cpp b/src/Ai/Raid/BWL/BWLHelpers.cpp similarity index 91% rename from src/Ai/Raid/BlackwingLair/Util/RaidBwlHelpers.cpp rename to src/Ai/Raid/BWL/BWLHelpers.cpp index cc0714bd1..c4536064f 100644 --- a/src/Ai/Raid/BlackwingLair/Util/RaidBwlHelpers.cpp +++ b/src/Ai/Raid/BWL/BWLHelpers.cpp @@ -1,4 +1,4 @@ -#include "RaidBwlHelpers.h" +#include "BWLHelpers.h" namespace BlackwingLairHelpers { diff --git a/src/Ai/Raid/BlackwingLair/Util/RaidBwlHelpers.h b/src/Ai/Raid/BWL/BWLHelpers.h similarity index 85% rename from src/Ai/Raid/BlackwingLair/Util/RaidBwlHelpers.h rename to src/Ai/Raid/BWL/BWLHelpers.h index 3333d826d..c76f0e892 100644 --- a/src/Ai/Raid/BlackwingLair/Util/RaidBwlHelpers.h +++ b/src/Ai/Raid/BWL/BWLHelpers.h @@ -12,7 +12,10 @@ namespace BlackwingLairHelpers // Chromaggus SPELL_BROOD_AFFLICTION_BRONZE = 23170, - SPELL_HOURGLASS_SAND = 23645 + SPELL_HOURGLASS_SAND = 23645, + + // Nefarian + SPELL_WILD_MAGIC = 23410 }; enum BlackwingLairGameObjects diff --git a/src/Ai/Raid/BlackwingLair/Strategy/RaidBwlStrategy.cpp b/src/Ai/Raid/BWL/BWLStrategy.cpp similarity index 63% rename from src/Ai/Raid/BlackwingLair/Strategy/RaidBwlStrategy.cpp rename to src/Ai/Raid/BWL/BWLStrategy.cpp index ec36b2cde..1e69be6e8 100644 --- a/src/Ai/Raid/BlackwingLair/Strategy/RaidBwlStrategy.cpp +++ b/src/Ai/Raid/BWL/BWLStrategy.cpp @@ -1,4 +1,4 @@ -#include "RaidBwlStrategy.h" +#include "BWLStrategy.h" void RaidBwlStrategy::InitTriggers(std::vector& triggers) { @@ -10,4 +10,10 @@ void RaidBwlStrategy::InitTriggers(std::vector& triggers) triggers.push_back(new TriggerNode("bwl affliction bronze", { NextAction("bwl use hourglass sand", ACTION_RAID) })); + + triggers.push_back(new TriggerNode("bwl wild magic", { + NextAction("ice block", ACTION_RAID) })); + + triggers.push_back(new TriggerNode("bwl nefarian fear ward", { + NextAction("bwl nefarian fear ward", ACTION_RAID) })); } diff --git a/src/Ai/Raid/BlackwingLair/Strategy/RaidBwlStrategy.h b/src/Ai/Raid/BWL/BWLStrategy.h similarity index 100% rename from src/Ai/Raid/BlackwingLair/Strategy/RaidBwlStrategy.h rename to src/Ai/Raid/BWL/BWLStrategy.h diff --git a/src/Ai/Raid/BlackwingLair/RaidBwlTriggerContext.h b/src/Ai/Raid/BWL/BWLTriggerContext.h similarity index 62% rename from src/Ai/Raid/BlackwingLair/RaidBwlTriggerContext.h rename to src/Ai/Raid/BWL/BWLTriggerContext.h index de2ce0058..e3b9b599d 100644 --- a/src/Ai/Raid/BlackwingLair/RaidBwlTriggerContext.h +++ b/src/Ai/Raid/BWL/BWLTriggerContext.h @@ -2,7 +2,7 @@ #define _PLAYERBOT_RAIDBWLTRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidBwlTriggers.h" +#include "BWLTriggers.h" class RaidBwlTriggerContext : public NamedObjectContext { @@ -11,11 +11,15 @@ public: { creators["bwl suppression device"] = &RaidBwlTriggerContext::bwl_suppression_device; creators["bwl affliction bronze"] = &RaidBwlTriggerContext::bwl_affliction_bronze; + creators["bwl wild magic"] = &RaidBwlTriggerContext::bwl_wild_magic; + creators["bwl nefarian fear ward"] = &RaidBwlTriggerContext::bwl_nefarian_fear_ward; } private: static Trigger* bwl_suppression_device(PlayerbotAI* ai) { return new BwlSuppressionDeviceTrigger(ai); } static Trigger* bwl_affliction_bronze(PlayerbotAI* ai) { return new BwlAfflictionBronzeTrigger(ai); } + static Trigger* bwl_wild_magic(PlayerbotAI* ai) { return new BwlWildMagicTrigger(ai); } + static Trigger* bwl_nefarian_fear_ward(PlayerbotAI* ai) { return new BwlNefarianFearWardTrigger(ai); } }; #endif diff --git a/src/Ai/Raid/BlackwingLair/Trigger/RaidBwlTriggers.cpp b/src/Ai/Raid/BWL/BWLTriggers.cpp similarity index 50% rename from src/Ai/Raid/BlackwingLair/Trigger/RaidBwlTriggers.cpp rename to src/Ai/Raid/BWL/BWLTriggers.cpp index 4b4bee1ad..c977563d0 100644 --- a/src/Ai/Raid/BlackwingLair/Trigger/RaidBwlTriggers.cpp +++ b/src/Ai/Raid/BWL/BWLTriggers.cpp @@ -1,7 +1,7 @@ -#include "RaidBwlTriggers.h" +#include "BWLTriggers.h" #include "Playerbots.h" -#include "RaidBwlHelpers.h" +#include "BWLHelpers.h" using namespace BlackwingLairHelpers; @@ -27,3 +27,24 @@ bool BwlAfflictionBronzeTrigger::IsActive() { return bot->HasAura(SPELL_BROOD_AFFLICTION_BRONZE); } + +bool BwlWildMagicTrigger::IsActive() +{ + return bot->getClass() == CLASS_MAGE && bot->HasAura(SPELL_WILD_MAGIC); +} + +bool BwlNefarianFearWardTrigger::IsActive() +{ + if (bot->getClass() != CLASS_PRIEST) + return false; + + Unit* nefarian = AI_VALUE2(Unit*, "find target", "nefarian"); + if (!nefarian || !nefarian->IsInCombat()) + return false; + + Unit* victim = nefarian->GetVictim(); + if (!victim) + return false; + + return !botAI->HasAura("fear ward", victim); +} diff --git a/src/Ai/Raid/BlackwingLair/Trigger/RaidBwlTriggers.h b/src/Ai/Raid/BWL/BWLTriggers.h similarity index 57% rename from src/Ai/Raid/BlackwingLair/Trigger/RaidBwlTriggers.h rename to src/Ai/Raid/BWL/BWLTriggers.h index 0aa290007..8222cf592 100644 --- a/src/Ai/Raid/BlackwingLair/Trigger/RaidBwlTriggers.h +++ b/src/Ai/Raid/BWL/BWLTriggers.h @@ -21,4 +21,20 @@ public: bool IsActive() override; }; +// Nefarian + +class BwlWildMagicTrigger : public Trigger +{ +public: + BwlWildMagicTrigger(PlayerbotAI* botAI) : Trigger(botAI, "bwl wild magic") {} + bool IsActive() override; +}; + +class BwlNefarianFearWardTrigger : public Trigger +{ +public: + BwlNefarianFearWardTrigger(PlayerbotAI* botAI) : Trigger(botAI, "bwl nefarian fear ward") {} + bool IsActive() override; +}; + #endif diff --git a/src/Ai/Raid/EyeOfEternity/RaidEoEActionContext.h b/src/Ai/Raid/EoE/EoEActionContext.h similarity index 97% rename from src/Ai/Raid/EyeOfEternity/RaidEoEActionContext.h rename to src/Ai/Raid/EoE/EoEActionContext.h index 620610e91..230c417b4 100644 --- a/src/Ai/Raid/EyeOfEternity/RaidEoEActionContext.h +++ b/src/Ai/Raid/EoE/EoEActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidEoEActions.h" +#include "EoEActions.h" class RaidEoEActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/EyeOfEternity/Action/RaidEoEActions.cpp b/src/Ai/Raid/EoE/EoEActions.cpp similarity index 99% rename from src/Ai/Raid/EyeOfEternity/Action/RaidEoEActions.cpp rename to src/Ai/Raid/EoE/EoEActions.cpp index b08db3f33..051c51344 100644 --- a/src/Ai/Raid/EyeOfEternity/Action/RaidEoEActions.cpp +++ b/src/Ai/Raid/EoE/EoEActions.cpp @@ -1,6 +1,6 @@ #include "Playerbots.h" -#include "RaidEoEActions.h" -#include "RaidEoETriggers.h" +#include "EoEActions.h" +#include "EoETriggers.h" bool MalygosPositionAction::Execute(Event /*event*/) { diff --git a/src/Ai/Raid/EyeOfEternity/Action/RaidEoEActions.h b/src/Ai/Raid/EoE/EoEActions.h similarity index 100% rename from src/Ai/Raid/EyeOfEternity/Action/RaidEoEActions.h rename to src/Ai/Raid/EoE/EoEActions.h diff --git a/src/Ai/Raid/EyeOfEternity/Multiplier/RaidEoEMultipliers.cpp b/src/Ai/Raid/EoE/EoEMultipliers.cpp similarity index 95% rename from src/Ai/Raid/EyeOfEternity/Multiplier/RaidEoEMultipliers.cpp rename to src/Ai/Raid/EoE/EoEMultipliers.cpp index a2d8a3f1d..490b31125 100644 --- a/src/Ai/Raid/EyeOfEternity/Multiplier/RaidEoEMultipliers.cpp +++ b/src/Ai/Raid/EoE/EoEMultipliers.cpp @@ -1,4 +1,4 @@ -#include "RaidEoEMultipliers.h" +#include "EoEMultipliers.h" #include "ChooseTargetActions.h" #include "DKActions.h" @@ -9,8 +9,8 @@ #include "GenericSpellActions.h" #include "MovementActions.h" #include "PaladinActions.h" -#include "RaidEoEActions.h" -#include "RaidEoETriggers.h" +#include "EoEActions.h" +#include "EoETriggers.h" #include "ReachTargetActions.h" #include "ScriptedCreature.h" #include "WarriorActions.h" diff --git a/src/Ai/Raid/EyeOfEternity/Multiplier/RaidEoEMultipliers.h b/src/Ai/Raid/EoE/EoEMultipliers.h similarity index 100% rename from src/Ai/Raid/EyeOfEternity/Multiplier/RaidEoEMultipliers.h rename to src/Ai/Raid/EoE/EoEMultipliers.h diff --git a/src/Ai/Raid/EyeOfEternity/Strategy/RaidEoEStrategy.cpp b/src/Ai/Raid/EoE/EoEStrategy.cpp similarity index 91% rename from src/Ai/Raid/EyeOfEternity/Strategy/RaidEoEStrategy.cpp rename to src/Ai/Raid/EoE/EoEStrategy.cpp index 3c0ff7ffd..273a9aecd 100644 --- a/src/Ai/Raid/EyeOfEternity/Strategy/RaidEoEStrategy.cpp +++ b/src/Ai/Raid/EoE/EoEStrategy.cpp @@ -1,5 +1,5 @@ -#include "RaidEoEStrategy.h" -#include "RaidEoEMultipliers.h" +#include "EoEStrategy.h" +#include "EoEMultipliers.h" #include "Strategy.h" void RaidEoEStrategy::InitTriggers(std::vector& triggers) diff --git a/src/Ai/Raid/EyeOfEternity/Strategy/RaidEoEStrategy.h b/src/Ai/Raid/EoE/EoEStrategy.h similarity index 100% rename from src/Ai/Raid/EyeOfEternity/Strategy/RaidEoEStrategy.h rename to src/Ai/Raid/EoE/EoEStrategy.h diff --git a/src/Ai/Raid/EyeOfEternity/RaidEoETriggerContext.h b/src/Ai/Raid/EoE/EoETriggerContext.h similarity index 95% rename from src/Ai/Raid/EyeOfEternity/RaidEoETriggerContext.h rename to src/Ai/Raid/EoE/EoETriggerContext.h index c545e10eb..fee06ac20 100644 --- a/src/Ai/Raid/EyeOfEternity/RaidEoETriggerContext.h +++ b/src/Ai/Raid/EoE/EoETriggerContext.h @@ -2,7 +2,7 @@ #define _PLAYERBOT_RAIDEOETRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidEoETriggers.h" +#include "EoETriggers.h" class RaidEoETriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/EyeOfEternity/Trigger/RaidEoETriggers.cpp b/src/Ai/Raid/EoE/EoETriggers.cpp similarity index 97% rename from src/Ai/Raid/EyeOfEternity/Trigger/RaidEoETriggers.cpp rename to src/Ai/Raid/EoE/EoETriggers.cpp index f07456d04..e98244659 100644 --- a/src/Ai/Raid/EyeOfEternity/Trigger/RaidEoETriggers.cpp +++ b/src/Ai/Raid/EoE/EoETriggers.cpp @@ -1,4 +1,4 @@ -#include "RaidEoETriggers.h" +#include "EoETriggers.h" #include "SharedDefines.h" diff --git a/src/Ai/Raid/EyeOfEternity/Trigger/RaidEoETriggers.h b/src/Ai/Raid/EoE/EoETriggers.h similarity index 100% rename from src/Ai/Raid/EyeOfEternity/Trigger/RaidEoETriggers.h rename to src/Ai/Raid/EoE/EoETriggers.h diff --git a/src/Ai/Raid/GruulsLair/RaidGruulsLairActionContext.h b/src/Ai/Raid/Gruul/GruulActionContext.h similarity index 99% rename from src/Ai/Raid/GruulsLair/RaidGruulsLairActionContext.h rename to src/Ai/Raid/Gruul/GruulActionContext.h index 3850f58c6..1e39d5bfe 100644 --- a/src/Ai/Raid/GruulsLair/RaidGruulsLairActionContext.h +++ b/src/Ai/Raid/Gruul/GruulActionContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDGRUULSLAIRACTIONCONTEXT_H #define _PLAYERBOT_RAIDGRUULSLAIRACTIONCONTEXT_H -#include "RaidGruulsLairActions.h" +#include "GruulActions.h" #include "NamedObjectContext.h" class RaidGruulsLairActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/GruulsLair/Action/RaidGruulsLairActions.cpp b/src/Ai/Raid/Gruul/GruulActions.cpp similarity index 99% rename from src/Ai/Raid/GruulsLair/Action/RaidGruulsLairActions.cpp rename to src/Ai/Raid/Gruul/GruulActions.cpp index d39d8a5ed..f4b8b5d30 100644 --- a/src/Ai/Raid/GruulsLair/Action/RaidGruulsLairActions.cpp +++ b/src/Ai/Raid/Gruul/GruulActions.cpp @@ -1,5 +1,5 @@ -#include "RaidGruulsLairActions.h" -#include "RaidGruulsLairHelpers.h" +#include "GruulActions.h" +#include "GruulHelpers.h" #include "CreatureAI.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/GruulsLair/Action/RaidGruulsLairActions.h b/src/Ai/Raid/Gruul/GruulActions.h similarity index 100% rename from src/Ai/Raid/GruulsLair/Action/RaidGruulsLairActions.h rename to src/Ai/Raid/Gruul/GruulActions.h diff --git a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp b/src/Ai/Raid/Gruul/GruulHelpers.cpp similarity index 99% rename from src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp rename to src/Ai/Raid/Gruul/GruulHelpers.cpp index 7195f0ebd..4c90f6e41 100644 --- a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.cpp +++ b/src/Ai/Raid/Gruul/GruulHelpers.cpp @@ -1,4 +1,4 @@ -#include "RaidGruulsLairHelpers.h" +#include "GruulHelpers.h" #include "AiFactory.h" #include "GroupReference.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.h b/src/Ai/Raid/Gruul/GruulHelpers.h similarity index 100% rename from src/Ai/Raid/GruulsLair/Util/RaidGruulsLairHelpers.h rename to src/Ai/Raid/Gruul/GruulHelpers.h diff --git a/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp b/src/Ai/Raid/Gruul/GruulMultipliers.cpp similarity index 96% rename from src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp rename to src/Ai/Raid/Gruul/GruulMultipliers.cpp index 7c8fb731e..e5a02698f 100644 --- a/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.cpp +++ b/src/Ai/Raid/Gruul/GruulMultipliers.cpp @@ -1,6 +1,6 @@ -#include "RaidGruulsLairMultipliers.h" -#include "RaidGruulsLairActions.h" -#include "RaidGruulsLairHelpers.h" +#include "GruulMultipliers.h" +#include "GruulActions.h" +#include "GruulHelpers.h" #include "ChooseTargetActions.h" #include "DruidBearActions.h" #include "DruidCatActions.h" diff --git a/src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.h b/src/Ai/Raid/Gruul/GruulMultipliers.h similarity index 100% rename from src/Ai/Raid/GruulsLair/Multiplier/RaidGruulsLairMultipliers.h rename to src/Ai/Raid/Gruul/GruulMultipliers.h diff --git a/src/Ai/Raid/GruulsLair/Strategy/RaidGruulsLairStrategy.cpp b/src/Ai/Raid/Gruul/GruulStrategy.cpp similarity index 97% rename from src/Ai/Raid/GruulsLair/Strategy/RaidGruulsLairStrategy.cpp rename to src/Ai/Raid/Gruul/GruulStrategy.cpp index 249c8e8a8..4f4297650 100644 --- a/src/Ai/Raid/GruulsLair/Strategy/RaidGruulsLairStrategy.cpp +++ b/src/Ai/Raid/Gruul/GruulStrategy.cpp @@ -1,5 +1,5 @@ -#include "RaidGruulsLairStrategy.h" -#include "RaidGruulsLairMultipliers.h" +#include "GruulStrategy.h" +#include "GruulMultipliers.h" void RaidGruulsLairStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/GruulsLair/Strategy/RaidGruulsLairStrategy.h b/src/Ai/Raid/Gruul/GruulStrategy.h similarity index 100% rename from src/Ai/Raid/GruulsLair/Strategy/RaidGruulsLairStrategy.h rename to src/Ai/Raid/Gruul/GruulStrategy.h diff --git a/src/Ai/Raid/GruulsLair/RaidGruulsLairTriggerContext.h b/src/Ai/Raid/Gruul/GruulTriggerContext.h similarity index 99% rename from src/Ai/Raid/GruulsLair/RaidGruulsLairTriggerContext.h rename to src/Ai/Raid/Gruul/GruulTriggerContext.h index 35a0f138e..110a69e35 100644 --- a/src/Ai/Raid/GruulsLair/RaidGruulsLairTriggerContext.h +++ b/src/Ai/Raid/Gruul/GruulTriggerContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDGRUULSLAIRTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDGRUULSLAIRTRIGGERCONTEXT_H -#include "RaidGruulsLairTriggers.h" +#include "GruulTriggers.h" #include "NamedObjectContext.h" class RaidGruulsLairTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp b/src/Ai/Raid/Gruul/GruulTriggers.cpp similarity index 98% rename from src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp rename to src/Ai/Raid/Gruul/GruulTriggers.cpp index 3caadb384..82c3e18ac 100644 --- a/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.cpp +++ b/src/Ai/Raid/Gruul/GruulTriggers.cpp @@ -1,5 +1,5 @@ -#include "RaidGruulsLairTriggers.h" -#include "RaidGruulsLairHelpers.h" +#include "GruulTriggers.h" +#include "GruulHelpers.h" #include "Playerbots.h" using namespace GruulsLairHelpers; diff --git a/src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.h b/src/Ai/Raid/Gruul/GruulTriggers.h similarity index 100% rename from src/Ai/Raid/GruulsLair/Trigger/RaidGruulsLairTriggers.h rename to src/Ai/Raid/Gruul/GruulTriggers.h diff --git a/src/Ai/Raid/HyjalSummit/RaidHyjalSummitActionContext.h b/src/Ai/Raid/Hyjal/HyjalActionContext.h similarity index 99% rename from src/Ai/Raid/HyjalSummit/RaidHyjalSummitActionContext.h rename to src/Ai/Raid/Hyjal/HyjalActionContext.h index 02164df46..f19778500 100644 --- a/src/Ai/Raid/HyjalSummit/RaidHyjalSummitActionContext.h +++ b/src/Ai/Raid/Hyjal/HyjalActionContext.h @@ -6,7 +6,7 @@ #ifndef _PLAYERBOT_RAIDHYJALSUMMITACTIONCONTEXT_H #define _PLAYERBOT_RAIDHYJALSUMMITACTIONCONTEXT_H -#include "RaidHyjalSummitActions.h" +#include "HyjalActions.h" #include "NamedObjectContext.h" class RaidHyjalSummitActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/HyjalSummit/Action/RaidHyjalSummitActions.cpp b/src/Ai/Raid/Hyjal/HyjalActions.cpp similarity index 99% rename from src/Ai/Raid/HyjalSummit/Action/RaidHyjalSummitActions.cpp rename to src/Ai/Raid/Hyjal/HyjalActions.cpp index 557f3e6b0..ec7a594a3 100644 --- a/src/Ai/Raid/HyjalSummit/Action/RaidHyjalSummitActions.cpp +++ b/src/Ai/Raid/Hyjal/HyjalActions.cpp @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidHyjalSummitActions.h" -#include "RaidHyjalSummitHelpers.h" +#include "HyjalActions.h" +#include "HyjalHelpers.h" #include "Playerbots.h" #include "RaidBossHelpers.h" #include "Timer.h" diff --git a/src/Ai/Raid/HyjalSummit/Action/RaidHyjalSummitActions.h b/src/Ai/Raid/Hyjal/HyjalActions.h similarity index 100% rename from src/Ai/Raid/HyjalSummit/Action/RaidHyjalSummitActions.h rename to src/Ai/Raid/Hyjal/HyjalActions.h diff --git a/src/Ai/Raid/HyjalSummit/Multiplier/RaidHyjalSummitMultipliers.cpp b/src/Ai/Raid/Hyjal/HyjalMultipliers.cpp similarity index 98% rename from src/Ai/Raid/HyjalSummit/Multiplier/RaidHyjalSummitMultipliers.cpp rename to src/Ai/Raid/Hyjal/HyjalMultipliers.cpp index a9f666464..7ad9ea12f 100644 --- a/src/Ai/Raid/HyjalSummit/Multiplier/RaidHyjalSummitMultipliers.cpp +++ b/src/Ai/Raid/Hyjal/HyjalMultipliers.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidHyjalSummitMultipliers.h" -#include "RaidHyjalSummitActions.h" -#include "RaidHyjalSummitHelpers.h" +#include "HyjalMultipliers.h" +#include "HyjalActions.h" +#include "HyjalHelpers.h" #include "AiFactory.h" #include "ChooseTargetActions.h" #include "DKActions.h" diff --git a/src/Ai/Raid/HyjalSummit/Multiplier/RaidHyjalSummitMultipliers.h b/src/Ai/Raid/Hyjal/HyjalMultipliers.h similarity index 100% rename from src/Ai/Raid/HyjalSummit/Multiplier/RaidHyjalSummitMultipliers.h rename to src/Ai/Raid/Hyjal/HyjalMultipliers.h diff --git a/src/Ai/Raid/HyjalSummit/Strategy/RaidHyjalSummitStrategy.cpp b/src/Ai/Raid/Hyjal/HyjalStrategy.cpp similarity index 98% rename from src/Ai/Raid/HyjalSummit/Strategy/RaidHyjalSummitStrategy.cpp rename to src/Ai/Raid/Hyjal/HyjalStrategy.cpp index 77486fb48..66ff111c2 100644 --- a/src/Ai/Raid/HyjalSummit/Strategy/RaidHyjalSummitStrategy.cpp +++ b/src/Ai/Raid/Hyjal/HyjalStrategy.cpp @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidHyjalSummitStrategy.h" -#include "RaidHyjalSummitMultipliers.h" +#include "HyjalStrategy.h" +#include "HyjalMultipliers.h" void RaidHyjalSummitStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/HyjalSummit/Strategy/RaidHyjalSummitStrategy.h b/src/Ai/Raid/Hyjal/HyjalStrategy.h similarity index 100% rename from src/Ai/Raid/HyjalSummit/Strategy/RaidHyjalSummitStrategy.h rename to src/Ai/Raid/Hyjal/HyjalStrategy.h diff --git a/src/Ai/Raid/HyjalSummit/RaidHyjalSummitTriggerContext.h b/src/Ai/Raid/Hyjal/HyjalTriggerContext.h similarity index 99% rename from src/Ai/Raid/HyjalSummit/RaidHyjalSummitTriggerContext.h rename to src/Ai/Raid/Hyjal/HyjalTriggerContext.h index a7c564ee0..93aef5d9c 100644 --- a/src/Ai/Raid/HyjalSummit/RaidHyjalSummitTriggerContext.h +++ b/src/Ai/Raid/Hyjal/HyjalTriggerContext.h @@ -6,7 +6,7 @@ #ifndef _PLAYERBOT_RAIDHYJALSUMMITTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDHYJALSUMMITTRIGGERCONTEXT_H -#include "RaidHyjalSummitTriggers.h" +#include "HyjalTriggers.h" #include "NamedObjectContext.h" class RaidHyjalSummitTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/HyjalSummit/Trigger/RaidHyjalSummitTriggers.cpp b/src/Ai/Raid/Hyjal/HyjalTriggers.cpp similarity index 98% rename from src/Ai/Raid/HyjalSummit/Trigger/RaidHyjalSummitTriggers.cpp rename to src/Ai/Raid/Hyjal/HyjalTriggers.cpp index 3b9a6455d..403098cd8 100644 --- a/src/Ai/Raid/HyjalSummit/Trigger/RaidHyjalSummitTriggers.cpp +++ b/src/Ai/Raid/Hyjal/HyjalTriggers.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidHyjalSummitTriggers.h" -#include "RaidHyjalSummitHelpers.h" -#include "RaidHyjalSummitActions.h" +#include "HyjalTriggers.h" +#include "HyjalHelpers.h" +#include "HyjalActions.h" #include "AiFactory.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/HyjalSummit/Trigger/RaidHyjalSummitTriggers.h b/src/Ai/Raid/Hyjal/HyjalTriggers.h similarity index 100% rename from src/Ai/Raid/HyjalSummit/Trigger/RaidHyjalSummitTriggers.h rename to src/Ai/Raid/Hyjal/HyjalTriggers.h diff --git a/src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitHelpers.cpp b/src/Ai/Raid/Hyjal/Util/HyjalHelpers.cpp similarity index 99% rename from src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitHelpers.cpp rename to src/Ai/Raid/Hyjal/Util/HyjalHelpers.cpp index 04ed97cd0..d15bacf1b 100644 --- a/src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitHelpers.cpp +++ b/src/Ai/Raid/Hyjal/Util/HyjalHelpers.cpp @@ -3,7 +3,7 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidHyjalSummitHelpers.h" +#include "HyjalHelpers.h" #include diff --git a/src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitHelpers.h b/src/Ai/Raid/Hyjal/Util/HyjalHelpers.h similarity index 100% rename from src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitHelpers.h rename to src/Ai/Raid/Hyjal/Util/HyjalHelpers.h diff --git a/src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitScripts.cpp b/src/Ai/Raid/Hyjal/Util/HyjalScripts.cpp similarity index 99% rename from src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitScripts.cpp rename to src/Ai/Raid/Hyjal/Util/HyjalScripts.cpp index a1ccf4005..d3ccc19c9 100644 --- a/src/Ai/Raid/HyjalSummit/Util/RaidHyjalSummitScripts.cpp +++ b/src/Ai/Raid/Hyjal/Util/HyjalScripts.cpp @@ -3,7 +3,7 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidHyjalSummitHelpers.h" +#include "HyjalHelpers.h" #include "AllCreatureScript.h" #include "ObjectAccessor.h" #include "Player.h" diff --git a/src/Ai/Raid/Karazhan/RaidKarazhanActionContext.h b/src/Ai/Raid/Kara/KaraActionContext.h similarity index 99% rename from src/Ai/Raid/Karazhan/RaidKarazhanActionContext.h rename to src/Ai/Raid/Kara/KaraActionContext.h index e555cd14d..63d64174f 100644 --- a/src/Ai/Raid/Karazhan/RaidKarazhanActionContext.h +++ b/src/Ai/Raid/Kara/KaraActionContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDKARAZHANACTIONCONTEXT_H #define _PLAYERBOT_RAIDKARAZHANACTIONCONTEXT_H -#include "RaidKarazhanActions.h" +#include "KaraActions.h" #include "NamedObjectContext.h" class RaidKarazhanActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp b/src/Ai/Raid/Kara/KaraActions.cpp similarity index 99% rename from src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp rename to src/Ai/Raid/Kara/KaraActions.cpp index 9fc25827e..10d3639b5 100644 --- a/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.cpp +++ b/src/Ai/Raid/Kara/KaraActions.cpp @@ -1,5 +1,5 @@ -#include "RaidKarazhanActions.h" -#include "RaidKarazhanHelpers.h" +#include "KaraActions.h" +#include "KaraHelpers.h" #include "Playerbots.h" #include "PlayerbotTextMgr.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.h b/src/Ai/Raid/Kara/KaraActions.h similarity index 100% rename from src/Ai/Raid/Karazhan/Action/RaidKarazhanActions.h rename to src/Ai/Raid/Kara/KaraActions.h diff --git a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp b/src/Ai/Raid/Kara/KaraHelpers.cpp similarity index 99% rename from src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp rename to src/Ai/Raid/Kara/KaraHelpers.cpp index 82ecbdb7b..50de2e3a4 100644 --- a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.cpp +++ b/src/Ai/Raid/Kara/KaraHelpers.cpp @@ -1,4 +1,4 @@ -#include "RaidKarazhanHelpers.h" +#include "KaraHelpers.h" #include "Playerbots.h" namespace KarazhanHelpers diff --git a/src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.h b/src/Ai/Raid/Kara/KaraHelpers.h similarity index 100% rename from src/Ai/Raid/Karazhan/Util/RaidKarazhanHelpers.h rename to src/Ai/Raid/Kara/KaraHelpers.h diff --git a/src/Ai/Raid/Karazhan/Multiplier/RaidKarazhanMultipliers.cpp b/src/Ai/Raid/Kara/KaraMultipliers.cpp similarity index 99% rename from src/Ai/Raid/Karazhan/Multiplier/RaidKarazhanMultipliers.cpp rename to src/Ai/Raid/Kara/KaraMultipliers.cpp index e68a3885d..5f857539b 100644 --- a/src/Ai/Raid/Karazhan/Multiplier/RaidKarazhanMultipliers.cpp +++ b/src/Ai/Raid/Kara/KaraMultipliers.cpp @@ -1,6 +1,6 @@ -#include "RaidKarazhanMultipliers.h" -#include "RaidKarazhanActions.h" -#include "RaidKarazhanHelpers.h" +#include "KaraMultipliers.h" +#include "KaraActions.h" +#include "KaraHelpers.h" #include "AttackAction.h" #include "ChooseTargetActions.h" #include "DruidActions.h" diff --git a/src/Ai/Raid/Karazhan/Multiplier/RaidKarazhanMultipliers.h b/src/Ai/Raid/Kara/KaraMultipliers.h similarity index 100% rename from src/Ai/Raid/Karazhan/Multiplier/RaidKarazhanMultipliers.h rename to src/Ai/Raid/Kara/KaraMultipliers.h diff --git a/src/Ai/Raid/Karazhan/Strategy/RaidKarazhanStrategy.cpp b/src/Ai/Raid/Kara/KaraStrategy.cpp similarity index 99% rename from src/Ai/Raid/Karazhan/Strategy/RaidKarazhanStrategy.cpp rename to src/Ai/Raid/Kara/KaraStrategy.cpp index d9bbf8162..45dbc68d0 100644 --- a/src/Ai/Raid/Karazhan/Strategy/RaidKarazhanStrategy.cpp +++ b/src/Ai/Raid/Kara/KaraStrategy.cpp @@ -1,5 +1,5 @@ -#include "RaidKarazhanStrategy.h" -#include "RaidKarazhanMultipliers.h" +#include "KaraStrategy.h" +#include "KaraMultipliers.h" void RaidKarazhanStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/Karazhan/Strategy/RaidKarazhanStrategy.h b/src/Ai/Raid/Kara/KaraStrategy.h similarity index 100% rename from src/Ai/Raid/Karazhan/Strategy/RaidKarazhanStrategy.h rename to src/Ai/Raid/Kara/KaraStrategy.h diff --git a/src/Ai/Raid/Karazhan/RaidKarazhanTriggerContext.h b/src/Ai/Raid/Kara/KaraTriggerContext.h similarity index 99% rename from src/Ai/Raid/Karazhan/RaidKarazhanTriggerContext.h rename to src/Ai/Raid/Kara/KaraTriggerContext.h index a9c430734..77d3090e7 100644 --- a/src/Ai/Raid/Karazhan/RaidKarazhanTriggerContext.h +++ b/src/Ai/Raid/Kara/KaraTriggerContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDKARAZHANTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDKARAZHANTRIGGERCONTEXT_H -#include "RaidKarazhanTriggers.h" +#include "KaraTriggers.h" #include "NamedObjectContext.h" class RaidKarazhanTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/Karazhan/Trigger/RaidKarazhanTriggers.cpp b/src/Ai/Raid/Kara/KaraTriggers.cpp similarity index 99% rename from src/Ai/Raid/Karazhan/Trigger/RaidKarazhanTriggers.cpp rename to src/Ai/Raid/Kara/KaraTriggers.cpp index 3c43aa898..f11c3919b 100644 --- a/src/Ai/Raid/Karazhan/Trigger/RaidKarazhanTriggers.cpp +++ b/src/Ai/Raid/Kara/KaraTriggers.cpp @@ -1,6 +1,6 @@ -#include "RaidKarazhanTriggers.h" -#include "RaidKarazhanHelpers.h" -#include "RaidKarazhanActions.h" +#include "KaraTriggers.h" +#include "KaraHelpers.h" +#include "KaraActions.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/Karazhan/Trigger/RaidKarazhanTriggers.h b/src/Ai/Raid/Kara/KaraTriggers.h similarity index 100% rename from src/Ai/Raid/Karazhan/Trigger/RaidKarazhanTriggers.h rename to src/Ai/Raid/Kara/KaraTriggers.h diff --git a/src/Ai/Raid/MoltenCore/RaidMcActionContext.h b/src/Ai/Raid/MC/MCActionContext.h similarity index 99% rename from src/Ai/Raid/MoltenCore/RaidMcActionContext.h rename to src/Ai/Raid/MC/MCActionContext.h index aaccb80d3..3cc95257a 100644 --- a/src/Ai/Raid/MoltenCore/RaidMcActionContext.h +++ b/src/Ai/Raid/MC/MCActionContext.h @@ -4,7 +4,7 @@ #include "Action.h" #include "BossAuraActions.h" #include "NamedObjectContext.h" -#include "RaidMcActions.h" +#include "MCActions.h" class RaidMcActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/MoltenCore/Action/RaidMcActions.cpp b/src/Ai/Raid/MC/MCActions.cpp similarity index 99% rename from src/Ai/Raid/MoltenCore/Action/RaidMcActions.cpp rename to src/Ai/Raid/MC/MCActions.cpp index d2bc2edc1..96050ac43 100644 --- a/src/Ai/Raid/MoltenCore/Action/RaidMcActions.cpp +++ b/src/Ai/Raid/MC/MCActions.cpp @@ -1,8 +1,8 @@ -#include "RaidMcActions.h" +#include "MCActions.h" #include "Playerbots.h" #include "RtiTargetValue.h" -#include "RaidMcHelpers.h" +#include "MCHelpers.h" static constexpr float LIVING_BOMB_DISTANCE = 20.0f; static constexpr float INFERNO_DISTANCE = 20.0f; diff --git a/src/Ai/Raid/MoltenCore/Action/RaidMcActions.h b/src/Ai/Raid/MC/MCActions.h similarity index 100% rename from src/Ai/Raid/MoltenCore/Action/RaidMcActions.h rename to src/Ai/Raid/MC/MCActions.h diff --git a/src/Ai/Raid/MoltenCore/Util/RaidMcHelpers.h b/src/Ai/Raid/MC/MCHelpers.h similarity index 100% rename from src/Ai/Raid/MoltenCore/Util/RaidMcHelpers.h rename to src/Ai/Raid/MC/MCHelpers.h diff --git a/src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.cpp b/src/Ai/Raid/MC/MCMultipliers.cpp similarity index 97% rename from src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.cpp rename to src/Ai/Raid/MC/MCMultipliers.cpp index d1ee936b0..d72763564 100644 --- a/src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.cpp +++ b/src/Ai/Raid/MC/MCMultipliers.cpp @@ -1,4 +1,4 @@ -#include "RaidMcMultipliers.h" +#include "MCMultipliers.h" #include "Playerbots.h" #include "ChooseTargetActions.h" @@ -9,8 +9,8 @@ #include "ShamanActions.h" #include "WarriorActions.h" #include "DKActions.h" -#include "RaidMcActions.h" -#include "RaidMcHelpers.h" +#include "MCActions.h" +#include "MCHelpers.h" using namespace MoltenCoreHelpers; diff --git a/src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.h b/src/Ai/Raid/MC/MCMultipliers.h similarity index 100% rename from src/Ai/Raid/MoltenCore/Multiplier/RaidMcMultipliers.h rename to src/Ai/Raid/MC/MCMultipliers.h diff --git a/src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.cpp b/src/Ai/Raid/MC/MCStrategy.cpp similarity index 98% rename from src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.cpp rename to src/Ai/Raid/MC/MCStrategy.cpp index 3eddb76a7..fc63c66b9 100644 --- a/src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.cpp +++ b/src/Ai/Raid/MC/MCStrategy.cpp @@ -1,6 +1,6 @@ -#include "RaidMcStrategy.h" +#include "MCStrategy.h" -#include "RaidMcMultipliers.h" +#include "MCMultipliers.h" #include "Strategy.h" void RaidMcStrategy::InitTriggers(std::vector& triggers) diff --git a/src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.h b/src/Ai/Raid/MC/MCStrategy.h similarity index 100% rename from src/Ai/Raid/MoltenCore/Strategy/RaidMcStrategy.h rename to src/Ai/Raid/MC/MCStrategy.h diff --git a/src/Ai/Raid/MoltenCore/RaidMcTriggerContext.h b/src/Ai/Raid/MC/MCTriggerContext.h similarity index 99% rename from src/Ai/Raid/MoltenCore/RaidMcTriggerContext.h rename to src/Ai/Raid/MC/MCTriggerContext.h index 1f694fe65..7efa95298 100644 --- a/src/Ai/Raid/MoltenCore/RaidMcTriggerContext.h +++ b/src/Ai/Raid/MC/MCTriggerContext.h @@ -3,7 +3,7 @@ #include "BossAuraTriggers.h" #include "NamedObjectContext.h" -#include "RaidMcTriggers.h" +#include "MCTriggers.h" class RaidMcTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.cpp b/src/Ai/Raid/MC/MCTriggers.cpp similarity index 95% rename from src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.cpp rename to src/Ai/Raid/MC/MCTriggers.cpp index 834d703d3..b9b2aa1b7 100644 --- a/src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.cpp +++ b/src/Ai/Raid/MC/MCTriggers.cpp @@ -1,7 +1,7 @@ -#include "RaidMcTriggers.h" +#include "MCTriggers.h" #include "SharedDefines.h" -#include "RaidMcHelpers.h" +#include "MCHelpers.h" using namespace MoltenCoreHelpers; diff --git a/src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.h b/src/Ai/Raid/MC/MCTriggers.h similarity index 100% rename from src/Ai/Raid/MoltenCore/Trigger/RaidMcTriggers.h rename to src/Ai/Raid/MC/MCTriggers.h diff --git a/src/Ai/Raid/Magtheridon/RaidMagtheridonActionContext.h b/src/Ai/Raid/Mag/MagActionContext.h similarity index 98% rename from src/Ai/Raid/Magtheridon/RaidMagtheridonActionContext.h rename to src/Ai/Raid/Mag/MagActionContext.h index 48e8cfd35..2a040ebcd 100644 --- a/src/Ai/Raid/Magtheridon/RaidMagtheridonActionContext.h +++ b/src/Ai/Raid/Mag/MagActionContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDMAGTHERIDONACTIONCONTEXT_H #define _PLAYERBOT_RAIDMAGTHERIDONACTIONCONTEXT_H -#include "RaidMagtheridonActions.h" +#include "MagActions.h" #include "NamedObjectContext.h" class RaidMagtheridonActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp b/src/Ai/Raid/Mag/MagActions.cpp similarity index 99% rename from src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp rename to src/Ai/Raid/Mag/MagActions.cpp index a9e9bcfd7..fc5a9d680 100644 --- a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.cpp +++ b/src/Ai/Raid/Mag/MagActions.cpp @@ -1,5 +1,5 @@ -#include "RaidMagtheridonActions.h" -#include "RaidMagtheridonHelpers.h" +#include "MagActions.h" +#include "MagHelpers.h" #include "Creature.h" #include "ObjectAccessor.h" #include "ObjectGuid.h" diff --git a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h b/src/Ai/Raid/Mag/MagActions.h similarity index 98% rename from src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h rename to src/Ai/Raid/Mag/MagActions.h index 7abc493c2..dd1660d40 100644 --- a/src/Ai/Raid/Magtheridon/Action/RaidMagtheridonActions.h +++ b/src/Ai/Raid/Mag/MagActions.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDMAGTHERIDONACTIONS_H #define _PLAYERBOT_RAIDMAGTHERIDONACTIONS_H -#include "RaidMagtheridonHelpers.h" +#include "MagHelpers.h" #include "Action.h" #include "AttackAction.h" #include "MovementActions.h" diff --git a/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp b/src/Ai/Raid/Mag/MagHelpers.cpp similarity index 99% rename from src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp rename to src/Ai/Raid/Mag/MagHelpers.cpp index e51ad24e5..39bfbcf27 100644 --- a/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.cpp +++ b/src/Ai/Raid/Mag/MagHelpers.cpp @@ -1,4 +1,4 @@ -#include "RaidMagtheridonHelpers.h" +#include "MagHelpers.h" #include "Creature.h" #include "GameObject.h" #include "Map.h" diff --git a/src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.h b/src/Ai/Raid/Mag/MagHelpers.h similarity index 100% rename from src/Ai/Raid/Magtheridon/Util/RaidMagtheridonHelpers.h rename to src/Ai/Raid/Mag/MagHelpers.h diff --git a/src/Ai/Raid/Magtheridon/Multiplier/RaidMagtheridonMultipliers.cpp b/src/Ai/Raid/Mag/MagMultipliers.cpp similarity index 95% rename from src/Ai/Raid/Magtheridon/Multiplier/RaidMagtheridonMultipliers.cpp rename to src/Ai/Raid/Mag/MagMultipliers.cpp index 55aaf90e9..94ae6d6a9 100644 --- a/src/Ai/Raid/Magtheridon/Multiplier/RaidMagtheridonMultipliers.cpp +++ b/src/Ai/Raid/Mag/MagMultipliers.cpp @@ -1,9 +1,9 @@ #include #include -#include "RaidMagtheridonMultipliers.h" -#include "RaidMagtheridonActions.h" -#include "RaidMagtheridonHelpers.h" +#include "MagMultipliers.h" +#include "MagActions.h" +#include "MagHelpers.h" #include "ChooseTargetActions.h" #include "GenericSpellActions.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/Magtheridon/Multiplier/RaidMagtheridonMultipliers.h b/src/Ai/Raid/Mag/MagMultipliers.h similarity index 100% rename from src/Ai/Raid/Magtheridon/Multiplier/RaidMagtheridonMultipliers.h rename to src/Ai/Raid/Mag/MagMultipliers.h diff --git a/src/Ai/Raid/Magtheridon/Strategy/RaidMagtheridonStrategy.cpp b/src/Ai/Raid/Mag/MagStrategy.cpp similarity index 96% rename from src/Ai/Raid/Magtheridon/Strategy/RaidMagtheridonStrategy.cpp rename to src/Ai/Raid/Mag/MagStrategy.cpp index 73d240825..fc6d041ff 100644 --- a/src/Ai/Raid/Magtheridon/Strategy/RaidMagtheridonStrategy.cpp +++ b/src/Ai/Raid/Mag/MagStrategy.cpp @@ -1,5 +1,5 @@ -#include "RaidMagtheridonStrategy.h" -#include "RaidMagtheridonMultipliers.h" +#include "MagStrategy.h" +#include "MagMultipliers.h" void RaidMagtheridonStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/Magtheridon/Strategy/RaidMagtheridonStrategy.h b/src/Ai/Raid/Mag/MagStrategy.h similarity index 100% rename from src/Ai/Raid/Magtheridon/Strategy/RaidMagtheridonStrategy.h rename to src/Ai/Raid/Mag/MagStrategy.h diff --git a/src/Ai/Raid/Magtheridon/RaidMagtheridonTriggerContext.h b/src/Ai/Raid/Mag/MagTriggerContext.h similarity index 98% rename from src/Ai/Raid/Magtheridon/RaidMagtheridonTriggerContext.h rename to src/Ai/Raid/Mag/MagTriggerContext.h index 482152e0e..dcaa08fa0 100644 --- a/src/Ai/Raid/Magtheridon/RaidMagtheridonTriggerContext.h +++ b/src/Ai/Raid/Mag/MagTriggerContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDMAGTHERIDONTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDMAGTHERIDONTRIGGERCONTEXT_H -#include "RaidMagtheridonTriggers.h" +#include "MagTriggers.h" #include "NamedObjectContext.h" class RaidMagtheridonTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/Magtheridon/Trigger/RaidMagtheridonTriggers.cpp b/src/Ai/Raid/Mag/MagTriggers.cpp similarity index 98% rename from src/Ai/Raid/Magtheridon/Trigger/RaidMagtheridonTriggers.cpp rename to src/Ai/Raid/Mag/MagTriggers.cpp index 43aa3361f..28f110c97 100644 --- a/src/Ai/Raid/Magtheridon/Trigger/RaidMagtheridonTriggers.cpp +++ b/src/Ai/Raid/Mag/MagTriggers.cpp @@ -1,5 +1,5 @@ -#include "RaidMagtheridonTriggers.h" -#include "RaidMagtheridonHelpers.h" +#include "MagTriggers.h" +#include "MagHelpers.h" #include "Playerbots.h" using namespace MagtheridonHelpers; diff --git a/src/Ai/Raid/Magtheridon/Trigger/RaidMagtheridonTriggers.h b/src/Ai/Raid/Mag/MagTriggers.h similarity index 100% rename from src/Ai/Raid/Magtheridon/Trigger/RaidMagtheridonTriggers.h rename to src/Ai/Raid/Mag/MagTriggers.h diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions.h b/src/Ai/Raid/Naxx/Action/NaxxActions.h similarity index 99% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions.h rename to src/Ai/Raid/Naxx/Action/NaxxActions.h index f2712d74d..8b854130e 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions.h +++ b/src/Ai/Raid/Naxx/Action/NaxxActions.h @@ -7,7 +7,7 @@ #include "MovementActions.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "RaidNaxxBossHelper.h" +#include "NaxxBossHelper.h" class GrobbulusGoBehindAction : public MovementAction { diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Anubrekhan.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Anubrekhan.cpp similarity index 98% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Anubrekhan.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Anubrekhan.cpp index 4391ba76c..fbab03646 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Anubrekhan.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Anubrekhan.cpp @@ -1,6 +1,6 @@ #include "ObjectGuid.h" #include "Playerbots.h" -#include "RaidNaxxActions.h" +#include "NaxxActions.h" bool AnubrekhanChooseTargetAction::Execute(Event /*event*/) { diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Faerlina.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Faerlina.cpp similarity index 60% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Faerlina.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Faerlina.cpp index 0c52be786..75d20b0fe 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Faerlina.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Faerlina.cpp @@ -1,3 +1,3 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" // Reserved for Faerlina-specific actions. diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_FourHorsemen.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_FourHorsemen.cpp similarity index 98% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_FourHorsemen.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_FourHorsemen.cpp index 291b225e7..7d62d669e 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_FourHorsemen.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_FourHorsemen.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Gluth.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Gluth.cpp similarity index 99% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Gluth.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Gluth.cpp index f95f17ff1..cde175bba 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Gluth.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Gluth.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "PlayerbotAIConfig.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Gothik.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Gothik.cpp similarity index 59% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Gothik.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Gothik.cpp index a33fef305..fcf39d74c 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Gothik.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Gothik.cpp @@ -1,3 +1,3 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" // Reserved for Gothik-specific actions. diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Grobbulus.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Grobbulus.cpp similarity index 97% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Grobbulus.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Grobbulus.cpp index 1917c3e13..73bd84637 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Grobbulus.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Grobbulus.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Heigan.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Heigan.cpp similarity index 97% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Heigan.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Heigan.cpp index 9e6221957..78e8c4de8 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Heigan.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Heigan.cpp @@ -1,6 +1,6 @@ #include "Playerbots.h" -#include "RaidNaxxActions.h" -#include "RaidNaxxSpellIds.h" +#include "NaxxActions.h" +#include "NaxxSpellIds.h" #include "Spell.h" #include "Timer.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Kelthuzad.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Kelthuzad.cpp similarity index 99% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Kelthuzad.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Kelthuzad.cpp index 5f7741170..cb149fc4e 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Kelthuzad.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Kelthuzad.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "PlayerbotAIConfig.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Loatheb.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Loatheb.cpp similarity index 98% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Loatheb.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Loatheb.cpp index df43cabe6..8cc2f21bf 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Loatheb.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Loatheb.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Maexxna.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Maexxna.cpp similarity index 59% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Maexxna.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Maexxna.cpp index cfb7d27db..810638b13 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Maexxna.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Maexxna.cpp @@ -1,3 +1,3 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" // Reserved for Maexxna-specific actions. diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Noth.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Noth.cpp similarity index 57% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Noth.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Noth.cpp index 4f8fe24a3..a7e2e7e95 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Noth.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Noth.cpp @@ -1,3 +1,3 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" // Reserved for Noth-specific actions. diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Patchwerk.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Patchwerk.cpp similarity index 97% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Patchwerk.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Patchwerk.cpp index e0e2ee3e9..c7af988f3 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Patchwerk.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Patchwerk.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include #include diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Razuvious.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Razuvious.cpp similarity index 99% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Razuvious.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Razuvious.cpp index ce0ca6caf..5d91db0c6 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Razuvious.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Razuvious.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "ObjectGuid.h" #include "PlayerbotAIConfig.h" diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Sapphiron.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Sapphiron.cpp similarity index 97% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Sapphiron.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Sapphiron.cpp index 5fb6d8686..55bcdabc4 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Sapphiron.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Sapphiron.cpp @@ -1,9 +1,9 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "PlayerbotAIConfig.h" #include "Playerbots.h" -#include "RaidNaxxBossHelper.h" -#include "RaidNaxxSpellIds.h" +#include "NaxxBossHelper.h" +#include "NaxxSpellIds.h" bool SapphironGroundPositionAction::Execute(Event /*event*/) { diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Shared.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Shared.cpp similarity index 93% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Shared.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Shared.cpp index 50b3bc1d8..300592780 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Shared.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Shared.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" uint32 RotateAroundTheCenterPointAction::FindNearestWaypoint() { diff --git a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Thaddius.cpp b/src/Ai/Raid/Naxx/Action/NaxxActions_Thaddius.cpp similarity index 98% rename from src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Thaddius.cpp rename to src/Ai/Raid/Naxx/Action/NaxxActions_Thaddius.cpp index 145604da0..016a9faa5 100644 --- a/src/Ai/Raid/Naxxramas/Action/RaidNaxxActions_Thaddius.cpp +++ b/src/Ai/Raid/Naxx/Action/NaxxActions_Thaddius.cpp @@ -1,8 +1,8 @@ -#include "RaidNaxxActions.h" +#include "NaxxActions.h" #include "PlayerbotAIConfig.h" #include "Playerbots.h" -#include "RaidNaxxSpellIds.h" +#include "NaxxSpellIds.h" bool ThaddiusAttackNearestPetAction::isUseful() { diff --git a/src/Ai/Raid/Naxxramas/RaidNaxxActionContext.h b/src/Ai/Raid/Naxx/NaxxActionContext.h similarity index 99% rename from src/Ai/Raid/Naxxramas/RaidNaxxActionContext.h rename to src/Ai/Raid/Naxx/NaxxActionContext.h index 4aaf9462e..46645e315 100644 --- a/src/Ai/Raid/Naxxramas/RaidNaxxActionContext.h +++ b/src/Ai/Raid/Naxx/NaxxActionContext.h @@ -8,7 +8,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidNaxxActions.h" +#include "NaxxActions.h" class RaidNaxxActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/Naxxramas/Util/RaidNaxxBossHelper.h b/src/Ai/Raid/Naxx/NaxxBossHelper.h similarity index 99% rename from src/Ai/Raid/Naxxramas/Util/RaidNaxxBossHelper.h rename to src/Ai/Raid/Naxx/NaxxBossHelper.h index a13a5b893..7bec3a7df 100644 --- a/src/Ai/Raid/Naxxramas/Util/RaidNaxxBossHelper.h +++ b/src/Ai/Raid/Naxx/NaxxBossHelper.h @@ -16,7 +16,7 @@ #include "SharedDefines.h" #include "Spell.h" #include "Timer.h" -#include "RaidNaxxSpellIds.h" +#include "NaxxSpellIds.h" const uint32 NAXX_MAP_ID = 533; diff --git a/src/Ai/Raid/Naxxramas/Multiplier/RaidNaxxMultipliers.cpp b/src/Ai/Raid/Naxx/NaxxMultipliers.cpp similarity index 99% rename from src/Ai/Raid/Naxxramas/Multiplier/RaidNaxxMultipliers.cpp rename to src/Ai/Raid/Naxx/NaxxMultipliers.cpp index 39e7668fa..b7700eb1b 100644 --- a/src/Ai/Raid/Naxxramas/Multiplier/RaidNaxxMultipliers.cpp +++ b/src/Ai/Raid/Naxx/NaxxMultipliers.cpp @@ -1,4 +1,4 @@ -#include "RaidNaxxMultipliers.h" +#include "NaxxMultipliers.h" #include "ChooseTargetActions.h" #include "DKActions.h" @@ -12,8 +12,8 @@ #include "MovementActions.h" #include "PaladinActions.h" #include "PriestActions.h" -#include "RaidNaxxActions.h" -#include "RaidNaxxSpellIds.h" +#include "NaxxActions.h" +#include "NaxxSpellIds.h" #include "ReachTargetActions.h" #include "RogueActions.h" #include "ScriptedCreature.h" diff --git a/src/Ai/Raid/Naxxramas/Multiplier/RaidNaxxMultipliers.h b/src/Ai/Raid/Naxx/NaxxMultipliers.h similarity index 98% rename from src/Ai/Raid/Naxxramas/Multiplier/RaidNaxxMultipliers.h rename to src/Ai/Raid/Naxx/NaxxMultipliers.h index f51420a2a..d7eed4029 100644 --- a/src/Ai/Raid/Naxxramas/Multiplier/RaidNaxxMultipliers.h +++ b/src/Ai/Raid/Naxx/NaxxMultipliers.h @@ -3,7 +3,7 @@ #define _PLAYERBOT_RAIDNAXXMULTIPLIERS_H #include "Multiplier.h" -#include "RaidNaxxBossHelper.h" +#include "NaxxBossHelper.h" class GrobbulusMultiplier : public Multiplier { diff --git a/src/Ai/Raid/Naxxramas/Util/RaidNaxxSpellIds.h b/src/Ai/Raid/Naxx/NaxxSpellIds.h similarity index 100% rename from src/Ai/Raid/Naxxramas/Util/RaidNaxxSpellIds.h rename to src/Ai/Raid/Naxx/NaxxSpellIds.h diff --git a/src/Ai/Raid/Naxxramas/Strategy/RaidNaxxStrategy.cpp b/src/Ai/Raid/Naxx/NaxxStrategy.cpp similarity index 98% rename from src/Ai/Raid/Naxxramas/Strategy/RaidNaxxStrategy.cpp rename to src/Ai/Raid/Naxx/NaxxStrategy.cpp index 51f59f755..f99ba9b8f 100644 --- a/src/Ai/Raid/Naxxramas/Strategy/RaidNaxxStrategy.cpp +++ b/src/Ai/Raid/Naxx/NaxxStrategy.cpp @@ -1,6 +1,6 @@ -#include "RaidNaxxStrategy.h" +#include "NaxxStrategy.h" -#include "RaidNaxxMultipliers.h" +#include "NaxxMultipliers.h" void RaidNaxxStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/Naxxramas/Strategy/RaidNaxxStrategy.h b/src/Ai/Raid/Naxx/NaxxStrategy.h similarity index 100% rename from src/Ai/Raid/Naxxramas/Strategy/RaidNaxxStrategy.h rename to src/Ai/Raid/Naxx/NaxxStrategy.h diff --git a/src/Ai/Raid/Naxxramas/RaidNaxxTriggerContext.h b/src/Ai/Raid/Naxx/NaxxTriggerContext.h similarity index 99% rename from src/Ai/Raid/Naxxramas/RaidNaxxTriggerContext.h rename to src/Ai/Raid/Naxx/NaxxTriggerContext.h index 83afc273d..52d40cd64 100644 --- a/src/Ai/Raid/Naxxramas/RaidNaxxTriggerContext.h +++ b/src/Ai/Raid/Naxx/NaxxTriggerContext.h @@ -7,7 +7,7 @@ #define _PLAYERBOT_RAIDNAXXTRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidNaxxTriggers.h" +#include "NaxxTriggers.h" class RaidNaxxTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/Naxxramas/Trigger/RaidNaxxTriggers.cpp b/src/Ai/Raid/Naxx/NaxxTriggers.cpp similarity index 99% rename from src/Ai/Raid/Naxxramas/Trigger/RaidNaxxTriggers.cpp rename to src/Ai/Raid/Naxx/NaxxTriggers.cpp index 3f0fc98b3..62195adbb 100644 --- a/src/Ai/Raid/Naxxramas/Trigger/RaidNaxxTriggers.cpp +++ b/src/Ai/Raid/Naxx/NaxxTriggers.cpp @@ -1,7 +1,7 @@ -#include "RaidNaxxTriggers.h" +#include "NaxxTriggers.h" #include "Playerbots.h" -#include "RaidNaxxSpellIds.h" +#include "NaxxSpellIds.h" #include "Timer.h" #include "Trigger.h" diff --git a/src/Ai/Raid/Naxxramas/Trigger/RaidNaxxTriggers.h b/src/Ai/Raid/Naxx/NaxxTriggers.h similarity index 99% rename from src/Ai/Raid/Naxxramas/Trigger/RaidNaxxTriggers.h rename to src/Ai/Raid/Naxx/NaxxTriggers.h index c48cadd79..58b1640b3 100644 --- a/src/Ai/Raid/Naxxramas/Trigger/RaidNaxxTriggers.h +++ b/src/Ai/Raid/Naxx/NaxxTriggers.h @@ -5,7 +5,7 @@ #include "EventMap.h" #include "GenericTriggers.h" #include "PlayerbotAIConfig.h" -#include "RaidNaxxBossHelper.h" +#include "NaxxBossHelper.h" #include "Trigger.h" class MutatingInjectionTrigger : public HasAuraTrigger diff --git a/src/Ai/Raid/ObsidianSanctum/RaidOsActionContext.h b/src/Ai/Raid/OS/OSActionContext.h similarity index 98% rename from src/Ai/Raid/ObsidianSanctum/RaidOsActionContext.h rename to src/Ai/Raid/OS/OSActionContext.h index 55afe5260..1d3dc7aa9 100644 --- a/src/Ai/Raid/ObsidianSanctum/RaidOsActionContext.h +++ b/src/Ai/Raid/OS/OSActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidOsActions.h" +#include "OSActions.h" class RaidOsActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/ObsidianSanctum/Action/RaidOsActions.cpp b/src/Ai/Raid/OS/OSActions.cpp similarity index 99% rename from src/Ai/Raid/ObsidianSanctum/Action/RaidOsActions.cpp rename to src/Ai/Raid/OS/OSActions.cpp index c4f398d65..745da5ed4 100644 --- a/src/Ai/Raid/ObsidianSanctum/Action/RaidOsActions.cpp +++ b/src/Ai/Raid/OS/OSActions.cpp @@ -1,5 +1,5 @@ -#include "RaidOsActions.h" -#include "RaidOsTriggers.h" +#include "OSActions.h" +#include "OSTriggers.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/ObsidianSanctum/Action/RaidOsActions.h b/src/Ai/Raid/OS/OSActions.h similarity index 100% rename from src/Ai/Raid/ObsidianSanctum/Action/RaidOsActions.h rename to src/Ai/Raid/OS/OSActions.h diff --git a/src/Ai/Raid/ObsidianSanctum/Multiplier/RaidOsMultipliers.cpp b/src/Ai/Raid/OS/OSMultipliers.cpp similarity index 94% rename from src/Ai/Raid/ObsidianSanctum/Multiplier/RaidOsMultipliers.cpp rename to src/Ai/Raid/OS/OSMultipliers.cpp index bc63f967d..754c68d40 100644 --- a/src/Ai/Raid/ObsidianSanctum/Multiplier/RaidOsMultipliers.cpp +++ b/src/Ai/Raid/OS/OSMultipliers.cpp @@ -1,4 +1,4 @@ -#include "RaidOsMultipliers.h" +#include "OSMultipliers.h" #include "ChooseTargetActions.h" #include "DKActions.h" @@ -9,8 +9,8 @@ #include "GenericSpellActions.h" #include "MovementActions.h" #include "PaladinActions.h" -#include "RaidOsActions.h" -#include "RaidOsTriggers.h" +#include "OSActions.h" +#include "OSTriggers.h" #include "ReachTargetActions.h" #include "ScriptedCreature.h" #include "WarriorActions.h" diff --git a/src/Ai/Raid/ObsidianSanctum/Multiplier/RaidOsMultipliers.h b/src/Ai/Raid/OS/OSMultipliers.h similarity index 100% rename from src/Ai/Raid/ObsidianSanctum/Multiplier/RaidOsMultipliers.h rename to src/Ai/Raid/OS/OSMultipliers.h diff --git a/src/Ai/Raid/ObsidianSanctum/Strategy/RaidOsStrategy.cpp b/src/Ai/Raid/OS/OSStrategy.cpp similarity index 95% rename from src/Ai/Raid/ObsidianSanctum/Strategy/RaidOsStrategy.cpp rename to src/Ai/Raid/OS/OSStrategy.cpp index 4468de991..71128148e 100644 --- a/src/Ai/Raid/ObsidianSanctum/Strategy/RaidOsStrategy.cpp +++ b/src/Ai/Raid/OS/OSStrategy.cpp @@ -1,5 +1,5 @@ -#include "RaidOsStrategy.h" -#include "RaidOsMultipliers.h" +#include "OSStrategy.h" +#include "OSMultipliers.h" #include "Strategy.h" void RaidOsStrategy::InitTriggers(std::vector& triggers) diff --git a/src/Ai/Raid/ObsidianSanctum/Strategy/RaidOsStrategy.h b/src/Ai/Raid/OS/OSStrategy.h similarity index 100% rename from src/Ai/Raid/ObsidianSanctum/Strategy/RaidOsStrategy.h rename to src/Ai/Raid/OS/OSStrategy.h diff --git a/src/Ai/Raid/ObsidianSanctum/RaidOsTriggerContext.h b/src/Ai/Raid/OS/OSTriggerContext.h similarity index 98% rename from src/Ai/Raid/ObsidianSanctum/RaidOsTriggerContext.h rename to src/Ai/Raid/OS/OSTriggerContext.h index 3c1d40692..e9195bcc2 100644 --- a/src/Ai/Raid/ObsidianSanctum/RaidOsTriggerContext.h +++ b/src/Ai/Raid/OS/OSTriggerContext.h @@ -2,7 +2,7 @@ #define _PLAYERBOT_RAIDOSTRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidOsTriggers.h" +#include "OSTriggers.h" class RaidOsTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/ObsidianSanctum/Trigger/RaidOsTriggers.cpp b/src/Ai/Raid/OS/OSTriggers.cpp similarity index 99% rename from src/Ai/Raid/ObsidianSanctum/Trigger/RaidOsTriggers.cpp rename to src/Ai/Raid/OS/OSTriggers.cpp index 710e3cac1..d47fdcd06 100644 --- a/src/Ai/Raid/ObsidianSanctum/Trigger/RaidOsTriggers.cpp +++ b/src/Ai/Raid/OS/OSTriggers.cpp @@ -1,4 +1,4 @@ -#include "RaidOsTriggers.h" +#include "OSTriggers.h" #include "SharedDefines.h" diff --git a/src/Ai/Raid/ObsidianSanctum/Trigger/RaidOsTriggers.h b/src/Ai/Raid/OS/OSTriggers.h similarity index 100% rename from src/Ai/Raid/ObsidianSanctum/Trigger/RaidOsTriggers.h rename to src/Ai/Raid/OS/OSTriggers.h diff --git a/src/Ai/Raid/Onyxia/RaidOnyxiaActionContext.h b/src/Ai/Raid/Ony/OnyActionContext.h similarity index 97% rename from src/Ai/Raid/Onyxia/RaidOnyxiaActionContext.h rename to src/Ai/Raid/Ony/OnyActionContext.h index b2923f969..923186f61 100644 --- a/src/Ai/Raid/Onyxia/RaidOnyxiaActionContext.h +++ b/src/Ai/Raid/Ony/OnyActionContext.h @@ -3,7 +3,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidOnyxiaActions.h" +#include "OnyActions.h" class RaidOnyxiaActionContext : public NamedObjectContext { diff --git a/src/Ai/Raid/Onyxia/Action/RaidOnyxiaActions.cpp b/src/Ai/Raid/Ony/OnyActions.cpp similarity index 99% rename from src/Ai/Raid/Onyxia/Action/RaidOnyxiaActions.cpp rename to src/Ai/Raid/Ony/OnyActions.cpp index 5b470ee5c..d0565c189 100644 --- a/src/Ai/Raid/Onyxia/Action/RaidOnyxiaActions.cpp +++ b/src/Ai/Raid/Ony/OnyActions.cpp @@ -1,4 +1,4 @@ -#include "RaidOnyxiaActions.h" +#include "OnyActions.h" #include "GenericSpellActions.h" #include "LastMovementValue.h" diff --git a/src/Ai/Raid/Onyxia/Action/RaidOnyxiaActions.h b/src/Ai/Raid/Ony/OnyActions.h similarity index 100% rename from src/Ai/Raid/Onyxia/Action/RaidOnyxiaActions.h rename to src/Ai/Raid/Ony/OnyActions.h diff --git a/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp b/src/Ai/Raid/Ony/OnyStrategy.cpp similarity index 96% rename from src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp rename to src/Ai/Raid/Ony/OnyStrategy.cpp index bb61bc004..07d763cfe 100644 --- a/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.cpp +++ b/src/Ai/Raid/Ony/OnyStrategy.cpp @@ -1,4 +1,4 @@ -#include "RaidOnyxiaStrategy.h" +#include "OnyStrategy.h" void RaidOnyxiaStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.h b/src/Ai/Raid/Ony/OnyStrategy.h similarity index 100% rename from src/Ai/Raid/Onyxia/Strategy/RaidOnyxiaStrategy.h rename to src/Ai/Raid/Ony/OnyStrategy.h diff --git a/src/Ai/Raid/Onyxia/RaidOnyxiaTriggerContext.h b/src/Ai/Raid/Ony/OnyTriggerContext.h similarity index 97% rename from src/Ai/Raid/Onyxia/RaidOnyxiaTriggerContext.h rename to src/Ai/Raid/Ony/OnyTriggerContext.h index daf624a0b..1c8425608 100644 --- a/src/Ai/Raid/Onyxia/RaidOnyxiaTriggerContext.h +++ b/src/Ai/Raid/Ony/OnyTriggerContext.h @@ -2,7 +2,7 @@ #define _PLAYERBOT_RAIDONYXIATRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidOnyxiaTriggers.h" +#include "OnyTriggers.h" class RaidOnyxiaTriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/Onyxia/Trigger/RaidOnyxiaTriggers.cpp b/src/Ai/Raid/Ony/OnyTriggers.cpp similarity index 99% rename from src/Ai/Raid/Onyxia/Trigger/RaidOnyxiaTriggers.cpp rename to src/Ai/Raid/Ony/OnyTriggers.cpp index 56486ebf9..fe59c199d 100644 --- a/src/Ai/Raid/Onyxia/Trigger/RaidOnyxiaTriggers.cpp +++ b/src/Ai/Raid/Ony/OnyTriggers.cpp @@ -1,4 +1,4 @@ -#include "RaidOnyxiaTriggers.h" +#include "OnyTriggers.h" #include "GenericTriggers.h" #include "ObjectAccessor.h" diff --git a/src/Ai/Raid/Onyxia/Trigger/RaidOnyxiaTriggers.h b/src/Ai/Raid/Ony/OnyTriggers.h similarity index 100% rename from src/Ai/Raid/Onyxia/Trigger/RaidOnyxiaTriggers.h rename to src/Ai/Raid/Ony/OnyTriggers.h diff --git a/src/Ai/Raid/RaidStrategyContext.h b/src/Ai/Raid/RaidStrategyContext.h index 732310b28..ddb288e33 100644 --- a/src/Ai/Raid/RaidStrategyContext.h +++ b/src/Ai/Raid/RaidStrategyContext.h @@ -2,23 +2,23 @@ #define _PLAYERBOT_RAIDSTRATEGYCONTEXT_H_ #include "Strategy.h" -#include "RaidAq20Strategy.h" -#include "RaidMcStrategy.h" -#include "RaidBwlStrategy.h" -#include "RaidKarazhanStrategy.h" -#include "RaidGruulsLairStrategy.h" -#include "RaidMagtheridonStrategy.h" -#include "RaidNaxxStrategy.h" -#include "RaidSSCStrategy.h" -#include "RaidTempestKeepStrategy.h" -#include "RaidHyjalSummitStrategy.h" -#include "RaidBlackTempleStrategy.h" -#include "RaidZulAmanStrategy.h" -#include "RaidOsStrategy.h" -#include "RaidEoEStrategy.h" -#include "RaidVoAStrategy.h" -#include "RaidUlduarStrategy.h" -#include "RaidOnyxiaStrategy.h" +#include "Aq20Strategy.h" +#include "MCStrategy.h" +#include "BWLStrategy.h" +#include "KaraStrategy.h" +#include "GruulStrategy.h" +#include "MagStrategy.h" +#include "NaxxStrategy.h" +#include "SSCStrategy.h" +#include "TKStrategy.h" +#include "HyjalStrategy.h" +#include "BTStrategy.h" +#include "ZAStrategy.h" +#include "OSStrategy.h" +#include "EoEStrategy.h" +#include "VoAStrategy.h" +#include "UldStrategy.h" +#include "OnyStrategy.h" #include "ICCStrategy.h" class RaidStrategyContext : public NamedObjectContext diff --git a/src/Ai/Raid/SerpentshrineCavern/RaidSSCActionContext.h b/src/Ai/Raid/SSC/SSCActionContext.h similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/RaidSSCActionContext.h rename to src/Ai/Raid/SSC/SSCActionContext.h index 1e2c44b49..4a14a747c 100644 --- a/src/Ai/Raid/SerpentshrineCavern/RaidSSCActionContext.h +++ b/src/Ai/Raid/SSC/SSCActionContext.h @@ -6,7 +6,7 @@ #ifndef _PLAYERBOT_RAIDSSCACTIONCONTEXT_H #define _PLAYERBOT_RAIDSSCACTIONCONTEXT_H -#include "RaidSSCActions.h" +#include "SSCActions.h" #include "NamedObjectContext.h" class RaidSSCActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp b/src/Ai/Raid/SSC/SSCActions.cpp similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp rename to src/Ai/Raid/SSC/SSCActions.cpp index 9ccd67d2b..68989f5a6 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.cpp +++ b/src/Ai/Raid/SSC/SSCActions.cpp @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidSSCActions.h" -#include "RaidSSCHelpers.h" +#include "SSCActions.h" +#include "SSCHelpers.h" #include "AiFactory.h" #include "Corpse.h" #include "LootAction.h" diff --git a/src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.h b/src/Ai/Raid/SSC/SSCActions.h similarity index 100% rename from src/Ai/Raid/SerpentshrineCavern/Action/RaidSSCActions.h rename to src/Ai/Raid/SSC/SSCActions.h diff --git a/src/Ai/Raid/SerpentshrineCavern/Util/RaidSSCHelpers.cpp b/src/Ai/Raid/SSC/SSCHelpers.cpp similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/Util/RaidSSCHelpers.cpp rename to src/Ai/Raid/SSC/SSCHelpers.cpp index 110481775..b3a4ca4a5 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Util/RaidSSCHelpers.cpp +++ b/src/Ai/Raid/SSC/SSCHelpers.cpp @@ -3,7 +3,7 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidSSCHelpers.h" +#include "SSCHelpers.h" #include "AiFactory.h" #include "Creature.h" #include "ObjectAccessor.h" diff --git a/src/Ai/Raid/SerpentshrineCavern/Util/RaidSSCHelpers.h b/src/Ai/Raid/SSC/SSCHelpers.h similarity index 100% rename from src/Ai/Raid/SerpentshrineCavern/Util/RaidSSCHelpers.h rename to src/Ai/Raid/SSC/SSCHelpers.h diff --git a/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp b/src/Ai/Raid/SSC/SSCMultipliers.cpp similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp rename to src/Ai/Raid/SSC/SSCMultipliers.cpp index 85d2c51a5..9e64e10c0 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.cpp +++ b/src/Ai/Raid/SSC/SSCMultipliers.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidSSCMultipliers.h" -#include "RaidSSCActions.h" -#include "RaidSSCHelpers.h" +#include "SSCMultipliers.h" +#include "SSCActions.h" +#include "SSCHelpers.h" #include "ChooseTargetActions.h" #include "DestroyItemAction.h" #include "DKActions.h" diff --git a/src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.h b/src/Ai/Raid/SSC/SSCMultipliers.h similarity index 100% rename from src/Ai/Raid/SerpentshrineCavern/Multiplier/RaidSSCMultipliers.h rename to src/Ai/Raid/SSC/SSCMultipliers.h diff --git a/src/Ai/Raid/SerpentshrineCavern/Strategy/RaidSSCStrategy.cpp b/src/Ai/Raid/SSC/SSCStrategy.cpp similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/Strategy/RaidSSCStrategy.cpp rename to src/Ai/Raid/SSC/SSCStrategy.cpp index 624049c81..49ca37e6a 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Strategy/RaidSSCStrategy.cpp +++ b/src/Ai/Raid/SSC/SSCStrategy.cpp @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidSSCStrategy.h" -#include "RaidSSCMultipliers.h" +#include "SSCStrategy.h" +#include "SSCMultipliers.h" void RaidSSCStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/SerpentshrineCavern/Strategy/RaidSSCStrategy.h b/src/Ai/Raid/SSC/SSCStrategy.h similarity index 100% rename from src/Ai/Raid/SerpentshrineCavern/Strategy/RaidSSCStrategy.h rename to src/Ai/Raid/SSC/SSCStrategy.h diff --git a/src/Ai/Raid/SerpentshrineCavern/RaidSSCTriggerContext.h b/src/Ai/Raid/SSC/SSCTriggerContext.h similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/RaidSSCTriggerContext.h rename to src/Ai/Raid/SSC/SSCTriggerContext.h index 5b0f8d5e3..ac1ce5876 100644 --- a/src/Ai/Raid/SerpentshrineCavern/RaidSSCTriggerContext.h +++ b/src/Ai/Raid/SSC/SSCTriggerContext.h @@ -6,7 +6,7 @@ #ifndef _PLAYERBOT_RAIDSSCTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDSSCTRIGGERCONTEXT_H -#include "RaidSSCTriggers.h" +#include "SSCTriggers.h" #include "NamedObjectContext.h" class RaidSSCTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/SerpentshrineCavern/Trigger/RaidSSCTriggers.cpp b/src/Ai/Raid/SSC/SSCTriggers.cpp similarity index 99% rename from src/Ai/Raid/SerpentshrineCavern/Trigger/RaidSSCTriggers.cpp rename to src/Ai/Raid/SSC/SSCTriggers.cpp index c3e753223..f54d40a91 100644 --- a/src/Ai/Raid/SerpentshrineCavern/Trigger/RaidSSCTriggers.cpp +++ b/src/Ai/Raid/SSC/SSCTriggers.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidSSCTriggers.h" -#include "RaidSSCHelpers.h" -#include "RaidSSCActions.h" +#include "SSCTriggers.h" +#include "SSCHelpers.h" +#include "SSCActions.h" #include "AiFactory.h" #include "Corpse.h" #include "LootObjectStack.h" diff --git a/src/Ai/Raid/SerpentshrineCavern/Trigger/RaidSSCTriggers.h b/src/Ai/Raid/SSC/SSCTriggers.h similarity index 100% rename from src/Ai/Raid/SerpentshrineCavern/Trigger/RaidSSCTriggers.h rename to src/Ai/Raid/SSC/SSCTriggers.h diff --git a/src/Ai/Raid/TempestKeep/RaidTempestKeepActionContext.h b/src/Ai/Raid/TK/TKActionContext.h similarity index 99% rename from src/Ai/Raid/TempestKeep/RaidTempestKeepActionContext.h rename to src/Ai/Raid/TK/TKActionContext.h index 125b27c0f..0c2c1cd71 100644 --- a/src/Ai/Raid/TempestKeep/RaidTempestKeepActionContext.h +++ b/src/Ai/Raid/TK/TKActionContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDTEMPESTKEEPACTIONCONTEXT_H #define _PLAYERBOT_RAIDTEMPESTKEEPACTIONCONTEXT_H -#include "RaidTempestKeepActions.h" +#include "TKActions.h" #include "NamedObjectContext.h" class RaidTempestKeepActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp b/src/Ai/Raid/TK/TKActions.cpp similarity index 99% rename from src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp rename to src/Ai/Raid/TK/TKActions.cpp index 0255e1928..659338617 100644 --- a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.cpp +++ b/src/Ai/Raid/TK/TKActions.cpp @@ -1,6 +1,6 @@ -#include "RaidTempestKeepActions.h" -#include "RaidTempestKeepHelpers.h" -#include "RaidTempestKeepKaelthasBossAI.h" +#include "TKActions.h" +#include "TKHelpers.h" +#include "TKKaelthasBossAI.h" #include "AiFactory.h" #include "EquipAction.h" #include "LootAction.h" diff --git a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h b/src/Ai/Raid/TK/TKActions.h similarity index 99% rename from src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h rename to src/Ai/Raid/TK/TKActions.h index 41b087e3c..0d751ac16 100644 --- a/src/Ai/Raid/TempestKeep/Action/RaidTempestKeepActions.h +++ b/src/Ai/Raid/TK/TKActions.h @@ -1,8 +1,8 @@ #ifndef _PLAYERBOT_RAIDTEMPESTKEEPACTIONS_H #define _PLAYERBOT_RAIDTEMPESTKEEPACTIONS_H -#include "RaidTempestKeepHelpers.h" -#include "RaidTempestKeepKaelthasBossAI.h" +#include "TKHelpers.h" +#include "TKKaelthasBossAI.h" #include "Action.h" #include "AttackAction.h" #include "MovementActions.h" diff --git a/src/Ai/Raid/TempestKeep/Multiplier/RaidTempestKeepMultipliers.cpp b/src/Ai/Raid/TK/TKMultipliers.cpp similarity index 98% rename from src/Ai/Raid/TempestKeep/Multiplier/RaidTempestKeepMultipliers.cpp rename to src/Ai/Raid/TK/TKMultipliers.cpp index 3bd65aecb..9a632a6c7 100644 --- a/src/Ai/Raid/TempestKeep/Multiplier/RaidTempestKeepMultipliers.cpp +++ b/src/Ai/Raid/TK/TKMultipliers.cpp @@ -1,7 +1,7 @@ -#include "RaidTempestKeepMultipliers.h" -#include "RaidTempestKeepActions.h" -#include "RaidTempestKeepHelpers.h" -#include "RaidTempestKeepKaelthasBossAI.h" +#include "TKMultipliers.h" +#include "TKActions.h" +#include "TKHelpers.h" +#include "TKKaelthasBossAI.h" #include "ChooseTargetActions.h" #include "DKActions.h" #include "DruidActions.h" diff --git a/src/Ai/Raid/TempestKeep/Multiplier/RaidTempestKeepMultipliers.h b/src/Ai/Raid/TK/TKMultipliers.h similarity index 100% rename from src/Ai/Raid/TempestKeep/Multiplier/RaidTempestKeepMultipliers.h rename to src/Ai/Raid/TK/TKMultipliers.h diff --git a/src/Ai/Raid/TempestKeep/Strategy/RaidTempestKeepStrategy.cpp b/src/Ai/Raid/TK/TKStrategy.cpp similarity index 99% rename from src/Ai/Raid/TempestKeep/Strategy/RaidTempestKeepStrategy.cpp rename to src/Ai/Raid/TK/TKStrategy.cpp index 627d3d7ab..3a5155ca9 100644 --- a/src/Ai/Raid/TempestKeep/Strategy/RaidTempestKeepStrategy.cpp +++ b/src/Ai/Raid/TK/TKStrategy.cpp @@ -1,5 +1,5 @@ -#include "RaidTempestKeepStrategy.h" -#include "RaidTempestKeepMultipliers.h" +#include "TKStrategy.h" +#include "TKMultipliers.h" void RaidTempestKeepStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/TempestKeep/Strategy/RaidTempestKeepStrategy.h b/src/Ai/Raid/TK/TKStrategy.h similarity index 100% rename from src/Ai/Raid/TempestKeep/Strategy/RaidTempestKeepStrategy.h rename to src/Ai/Raid/TK/TKStrategy.h diff --git a/src/Ai/Raid/TempestKeep/RaidTempestKeepTriggerContext.h b/src/Ai/Raid/TK/TKTriggerContext.h similarity index 99% rename from src/Ai/Raid/TempestKeep/RaidTempestKeepTriggerContext.h rename to src/Ai/Raid/TK/TKTriggerContext.h index 0bf1d0fdc..baa11694c 100644 --- a/src/Ai/Raid/TempestKeep/RaidTempestKeepTriggerContext.h +++ b/src/Ai/Raid/TK/TKTriggerContext.h @@ -1,7 +1,7 @@ #ifndef _PLAYERBOT_RAIDTEMPESTKEEPTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDTEMPESTKEEPTRIGGERCONTEXT_H -#include "RaidTempestKeepTriggers.h" +#include "TKTriggers.h" #include "NamedObjectContext.h" class RaidTempestKeepTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/TempestKeep/Trigger/RaidTempestKeepTriggers.cpp b/src/Ai/Raid/TK/TKTriggers.cpp similarity index 99% rename from src/Ai/Raid/TempestKeep/Trigger/RaidTempestKeepTriggers.cpp rename to src/Ai/Raid/TK/TKTriggers.cpp index b0b399b10..d477b6d8f 100644 --- a/src/Ai/Raid/TempestKeep/Trigger/RaidTempestKeepTriggers.cpp +++ b/src/Ai/Raid/TK/TKTriggers.cpp @@ -1,7 +1,7 @@ -#include "RaidTempestKeepTriggers.h" -#include "RaidTempestKeepHelpers.h" -#include "RaidTempestKeepActions.h" -#include "RaidTempestKeepKaelthasBossAI.h" +#include "TKTriggers.h" +#include "TKHelpers.h" +#include "TKActions.h" +#include "TKKaelthasBossAI.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/TempestKeep/Trigger/RaidTempestKeepTriggers.h b/src/Ai/Raid/TK/TKTriggers.h similarity index 100% rename from src/Ai/Raid/TempestKeep/Trigger/RaidTempestKeepTriggers.h rename to src/Ai/Raid/TK/TKTriggers.h diff --git a/src/Ai/Raid/TempestKeep/Util/RaidTempestKeepHelpers.cpp b/src/Ai/Raid/TK/Util/TKHelpers.cpp similarity index 99% rename from src/Ai/Raid/TempestKeep/Util/RaidTempestKeepHelpers.cpp rename to src/Ai/Raid/TK/Util/TKHelpers.cpp index 303277712..d4d8a44be 100644 --- a/src/Ai/Raid/TempestKeep/Util/RaidTempestKeepHelpers.cpp +++ b/src/Ai/Raid/TK/Util/TKHelpers.cpp @@ -1,5 +1,5 @@ -#include "RaidTempestKeepHelpers.h" -#include "RaidTempestKeepActions.h" +#include "TKHelpers.h" +#include "TKActions.h" #include "LootObjectStack.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/TempestKeep/Util/RaidTempestKeepHelpers.h b/src/Ai/Raid/TK/Util/TKHelpers.h similarity index 100% rename from src/Ai/Raid/TempestKeep/Util/RaidTempestKeepHelpers.h rename to src/Ai/Raid/TK/Util/TKHelpers.h diff --git a/src/Ai/Raid/TempestKeep/Util/RaidTempestKeepKaelthasBossAI.h b/src/Ai/Raid/TK/Util/TKKaelthasBossAI.h similarity index 100% rename from src/Ai/Raid/TempestKeep/Util/RaidTempestKeepKaelthasBossAI.h rename to src/Ai/Raid/TK/Util/TKKaelthasBossAI.h diff --git a/src/Ai/Raid/TempestKeep/Util/RaidTempestKeepScripts.cpp b/src/Ai/Raid/TK/Util/TKScripts.cpp similarity index 97% rename from src/Ai/Raid/TempestKeep/Util/RaidTempestKeepScripts.cpp rename to src/Ai/Raid/TK/Util/TKScripts.cpp index ff26d1500..85703b100 100644 --- a/src/Ai/Raid/TempestKeep/Util/RaidTempestKeepScripts.cpp +++ b/src/Ai/Raid/TK/Util/TKScripts.cpp @@ -1,4 +1,4 @@ -#include "RaidTempestKeepHelpers.h" +#include "TKHelpers.h" #include "ObjectAccessor.h" #include "Player.h" #include "ScriptMgr.h" diff --git a/src/Ai/Raid/Ulduar/RaidUlduarActionContext.h b/src/Ai/Raid/Uld/UldActionContext.h similarity index 99% rename from src/Ai/Raid/Ulduar/RaidUlduarActionContext.h rename to src/Ai/Raid/Uld/UldActionContext.h index 84c1bb850..aec2e68e7 100644 --- a/src/Ai/Raid/Ulduar/RaidUlduarActionContext.h +++ b/src/Ai/Raid/Uld/UldActionContext.h @@ -8,7 +8,7 @@ #include "Action.h" #include "NamedObjectContext.h" -#include "RaidUlduarActions.h" +#include "UldActions.h" #include "BossAuraActions.h" class RaidUlduarActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp b/src/Ai/Raid/Uld/UldActions.cpp similarity index 99% rename from src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp rename to src/Ai/Raid/Uld/UldActions.cpp index 217ab2c06..1ea211949 100644 --- a/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.cpp +++ b/src/Ai/Raid/Uld/UldActions.cpp @@ -1,5 +1,5 @@ -#include "RaidUlduarActions.h" +#include "UldActions.h" #include #include @@ -16,8 +16,8 @@ #include "PlayerbotAIConfig.h" #include "Playerbots.h" #include "Position.h" -#include "RaidUlduarBossHelper.h" -#include "RaidUlduarScripts.h" +#include "UldBossHelper.h" +#include "UldScripts.h" #include "RtiValue.h" #include "ScriptedCreature.h" #include "ServerFacade.h" diff --git a/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.h b/src/Ai/Raid/Uld/UldActions.h similarity index 99% rename from src/Ai/Raid/Ulduar/Action/RaidUlduarActions.h rename to src/Ai/Raid/Uld/UldActions.h index c3d5c0d63..152de3fcb 100644 --- a/src/Ai/Raid/Ulduar/Action/RaidUlduarActions.h +++ b/src/Ai/Raid/Uld/UldActions.h @@ -8,8 +8,8 @@ #include "MovementActions.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "RaidUlduarBossHelper.h" -#include "RaidUlduarTriggers.h" +#include "UldBossHelper.h" +#include "UldTriggers.h" #include "Vehicle.h" // diff --git a/src/Ai/Raid/Ulduar/Strategy/RaidUlduarStrategy.cpp b/src/Ai/Raid/Uld/UldStrategy.cpp similarity index 99% rename from src/Ai/Raid/Ulduar/Strategy/RaidUlduarStrategy.cpp rename to src/Ai/Raid/Uld/UldStrategy.cpp index 0a1b76a40..c2fa156bd 100644 --- a/src/Ai/Raid/Ulduar/Strategy/RaidUlduarStrategy.cpp +++ b/src/Ai/Raid/Uld/UldStrategy.cpp @@ -1,4 +1,4 @@ -#include "RaidUlduarStrategy.h" +#include "UldStrategy.h" void RaidUlduarStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/Ulduar/Strategy/RaidUlduarStrategy.h b/src/Ai/Raid/Uld/UldStrategy.h similarity index 100% rename from src/Ai/Raid/Ulduar/Strategy/RaidUlduarStrategy.h rename to src/Ai/Raid/Uld/UldStrategy.h diff --git a/src/Ai/Raid/Ulduar/RaidUlduarTriggerContext.h b/src/Ai/Raid/Uld/UldTriggerContext.h similarity index 99% rename from src/Ai/Raid/Ulduar/RaidUlduarTriggerContext.h rename to src/Ai/Raid/Uld/UldTriggerContext.h index e093f5797..c1bdb4476 100644 --- a/src/Ai/Raid/Ulduar/RaidUlduarTriggerContext.h +++ b/src/Ai/Raid/Uld/UldTriggerContext.h @@ -7,7 +7,7 @@ #define _PLAYERBOT_RAIDULDUARTRIGGERCONTEXT_H #include "NamedObjectContext.h" -#include "RaidUlduarTriggers.h" +#include "UldTriggers.h" #include "BossAuraTriggers.h" class RaidUlduarTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/Ulduar/Trigger/RaidUlduarTriggers.cpp b/src/Ai/Raid/Uld/UldTriggers.cpp similarity index 99% rename from src/Ai/Raid/Ulduar/Trigger/RaidUlduarTriggers.cpp rename to src/Ai/Raid/Uld/UldTriggers.cpp index 7b269ac68..7c84043ef 100644 --- a/src/Ai/Raid/Ulduar/Trigger/RaidUlduarTriggers.cpp +++ b/src/Ai/Raid/Uld/UldTriggers.cpp @@ -1,11 +1,11 @@ -#include "RaidUlduarTriggers.h" +#include "UldTriggers.h" #include "GameObject.h" #include "Object.h" #include "PlayerbotAI.h" #include "Playerbots.h" -#include "RaidUlduarBossHelper.h" -#include "RaidUlduarScripts.h" +#include "UldBossHelper.h" +#include "UldScripts.h" #include "ScriptedCreature.h" #include "SharedDefines.h" #include "Trigger.h" diff --git a/src/Ai/Raid/Ulduar/Trigger/RaidUlduarTriggers.h b/src/Ai/Raid/Uld/UldTriggers.h similarity index 99% rename from src/Ai/Raid/Ulduar/Trigger/RaidUlduarTriggers.h rename to src/Ai/Raid/Uld/UldTriggers.h index 7f8cb51a8..f827745fc 100644 --- a/src/Ai/Raid/Ulduar/Trigger/RaidUlduarTriggers.h +++ b/src/Ai/Raid/Uld/UldTriggers.h @@ -3,7 +3,7 @@ #include "EventMap.h" #include "GenericTriggers.h" -#include "RaidUlduarBossHelper.h" +#include "UldBossHelper.h" #include "Trigger.h" // diff --git a/src/Ai/Raid/Ulduar/Util/RaidUlduarBossHelper.cpp b/src/Ai/Raid/Uld/Util/UldBossHelper.cpp similarity index 99% rename from src/Ai/Raid/Ulduar/Util/RaidUlduarBossHelper.cpp rename to src/Ai/Raid/Uld/Util/UldBossHelper.cpp index fd6711cf0..b2cb5c48d 100644 --- a/src/Ai/Raid/Ulduar/Util/RaidUlduarBossHelper.cpp +++ b/src/Ai/Raid/Uld/Util/UldBossHelper.cpp @@ -1,4 +1,4 @@ -#include "RaidUlduarBossHelper.h" +#include "UldBossHelper.h" #include "ObjectAccessor.h" #include "GameObject.h" #include "Group.h" diff --git a/src/Ai/Raid/Ulduar/Util/RaidUlduarBossHelper.h b/src/Ai/Raid/Uld/Util/UldBossHelper.h similarity index 100% rename from src/Ai/Raid/Ulduar/Util/RaidUlduarBossHelper.h rename to src/Ai/Raid/Uld/Util/UldBossHelper.h diff --git a/src/Ai/Raid/Ulduar/Util/RaidUlduarScripts.h b/src/Ai/Raid/Uld/Util/UldScripts.h similarity index 100% rename from src/Ai/Raid/Ulduar/Util/RaidUlduarScripts.h rename to src/Ai/Raid/Uld/Util/UldScripts.h diff --git a/src/Ai/Raid/VaultOfArchavon/RaidVoAActionContext.h b/src/Ai/Raid/VoA/VoAActionContext.h similarity index 98% rename from src/Ai/Raid/VaultOfArchavon/RaidVoAActionContext.h rename to src/Ai/Raid/VoA/VoAActionContext.h index 263d03d9b..312f36a67 100644 --- a/src/Ai/Raid/VaultOfArchavon/RaidVoAActionContext.h +++ b/src/Ai/Raid/VoA/VoAActionContext.h @@ -9,7 +9,7 @@ #include "Action.h" #include "BossAuraActions.h" #include "NamedObjectContext.h" -#include "RaidVoAActions.h" +#include "VoAActions.h" #include "PlayerbotAI.h" class RaidVoAActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/VaultOfArchavon/Action/RaidVoAActions.cpp b/src/Ai/Raid/VoA/VoAActions.cpp similarity index 99% rename from src/Ai/Raid/VaultOfArchavon/Action/RaidVoAActions.cpp rename to src/Ai/Raid/VoA/VoAActions.cpp index 892ddf3eb..33d274461 100644 --- a/src/Ai/Raid/VaultOfArchavon/Action/RaidVoAActions.cpp +++ b/src/Ai/Raid/VoA/VoAActions.cpp @@ -1,5 +1,5 @@ -#include "RaidVoAActions.h" -#include "RaidVoATriggers.h" +#include "VoAActions.h" +#include "VoATriggers.h" #include "Define.h" #include "Event.h" #include "Group.h" diff --git a/src/Ai/Raid/VaultOfArchavon/Action/RaidVoAActions.h b/src/Ai/Raid/VoA/VoAActions.h similarity index 100% rename from src/Ai/Raid/VaultOfArchavon/Action/RaidVoAActions.h rename to src/Ai/Raid/VoA/VoAActions.h diff --git a/src/Ai/Raid/VaultOfArchavon/Strategy/RaidVoAStrategy.cpp b/src/Ai/Raid/VoA/VoAStrategy.cpp similarity index 97% rename from src/Ai/Raid/VaultOfArchavon/Strategy/RaidVoAStrategy.cpp rename to src/Ai/Raid/VoA/VoAStrategy.cpp index db81477a8..7a87492ff 100644 --- a/src/Ai/Raid/VaultOfArchavon/Strategy/RaidVoAStrategy.cpp +++ b/src/Ai/Raid/VoA/VoAStrategy.cpp @@ -1,4 +1,4 @@ -#include "RaidVoAStrategy.h" +#include "VoAStrategy.h" #include "Action.h" #include "Strategy.h" #include "Trigger.h" diff --git a/src/Ai/Raid/VaultOfArchavon/Strategy/RaidVoAStrategy.h b/src/Ai/Raid/VoA/VoAStrategy.h similarity index 100% rename from src/Ai/Raid/VaultOfArchavon/Strategy/RaidVoAStrategy.h rename to src/Ai/Raid/VoA/VoAStrategy.h diff --git a/src/Ai/Raid/VaultOfArchavon/RaidVoATriggerContext.h b/src/Ai/Raid/VoA/VoATriggerContext.h similarity index 98% rename from src/Ai/Raid/VaultOfArchavon/RaidVoATriggerContext.h rename to src/Ai/Raid/VoA/VoATriggerContext.h index 6cb5e0f38..54f38ecb7 100644 --- a/src/Ai/Raid/VaultOfArchavon/RaidVoATriggerContext.h +++ b/src/Ai/Raid/VoA/VoATriggerContext.h @@ -8,7 +8,7 @@ #include "BossAuraTriggers.h" #include "NamedObjectContext.h" -#include "RaidVoATriggers.h" +#include "VoATriggers.h" class RaidVoATriggerContext : public NamedObjectContext { diff --git a/src/Ai/Raid/VaultOfArchavon/Trigger/RaidVoATriggers.cpp b/src/Ai/Raid/VoA/VoATriggers.cpp similarity index 99% rename from src/Ai/Raid/VaultOfArchavon/Trigger/RaidVoATriggers.cpp rename to src/Ai/Raid/VoA/VoATriggers.cpp index 03a8b9b35..82038aaa8 100644 --- a/src/Ai/Raid/VaultOfArchavon/Trigger/RaidVoATriggers.cpp +++ b/src/Ai/Raid/VoA/VoATriggers.cpp @@ -1,4 +1,4 @@ -#include "RaidVoATriggers.h" +#include "VoATriggers.h" #include "EventMap.h" #include "Object.h" diff --git a/src/Ai/Raid/VaultOfArchavon/Trigger/RaidVoATriggers.h b/src/Ai/Raid/VoA/VoATriggers.h similarity index 100% rename from src/Ai/Raid/VaultOfArchavon/Trigger/RaidVoATriggers.h rename to src/Ai/Raid/VoA/VoATriggers.h diff --git a/src/Ai/Raid/ZulAman/RaidZulAmanActionContext.h b/src/Ai/Raid/ZA/ZAActionContext.h similarity index 99% rename from src/Ai/Raid/ZulAman/RaidZulAmanActionContext.h rename to src/Ai/Raid/ZA/ZAActionContext.h index 852a180b3..fd83a4073 100644 --- a/src/Ai/Raid/ZulAman/RaidZulAmanActionContext.h +++ b/src/Ai/Raid/ZA/ZAActionContext.h @@ -6,7 +6,7 @@ #ifndef _PLAYERBOT_RAIDZULAMANACTIONCONTEXT_H #define _PLAYERBOT_RAIDZULAMANACTIONCONTEXT_H -#include "RaidZulAmanActions.h" +#include "ZAActions.h" #include "NamedObjectContext.h" class RaidZulAmanActionContext : public NamedObjectContext diff --git a/src/Ai/Raid/ZulAman/Action/RaidZulAmanActions.cpp b/src/Ai/Raid/ZA/ZAActions.cpp similarity index 99% rename from src/Ai/Raid/ZulAman/Action/RaidZulAmanActions.cpp rename to src/Ai/Raid/ZA/ZAActions.cpp index 7e6212104..77826da63 100644 --- a/src/Ai/Raid/ZulAman/Action/RaidZulAmanActions.cpp +++ b/src/Ai/Raid/ZA/ZAActions.cpp @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidZulAmanActions.h" -#include "RaidZulAmanHelpers.h" +#include "ZAActions.h" +#include "ZAHelpers.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/ZulAman/Action/RaidZulAmanActions.h b/src/Ai/Raid/ZA/ZAActions.h similarity index 100% rename from src/Ai/Raid/ZulAman/Action/RaidZulAmanActions.h rename to src/Ai/Raid/ZA/ZAActions.h diff --git a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp b/src/Ai/Raid/ZA/ZAHelpers.cpp similarity index 99% rename from src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp rename to src/Ai/Raid/ZA/ZAHelpers.cpp index eeff879a4..befee71b7 100644 --- a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.cpp +++ b/src/Ai/Raid/ZA/ZAHelpers.cpp @@ -3,7 +3,7 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidZulAmanHelpers.h" +#include "ZAHelpers.h" #include "Group.h" #include "Playerbots.h" diff --git a/src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.h b/src/Ai/Raid/ZA/ZAHelpers.h similarity index 100% rename from src/Ai/Raid/ZulAman/Util/RaidZulAmanHelpers.h rename to src/Ai/Raid/ZA/ZAHelpers.h diff --git a/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp b/src/Ai/Raid/ZA/ZAMultipliers.cpp similarity index 99% rename from src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp rename to src/Ai/Raid/ZA/ZAMultipliers.cpp index 8a064fead..a637ed62f 100644 --- a/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.cpp +++ b/src/Ai/Raid/ZA/ZAMultipliers.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidZulAmanMultipliers.h" -#include "RaidZulAmanActions.h" -#include "RaidZulAmanHelpers.h" +#include "ZAMultipliers.h" +#include "ZAActions.h" +#include "ZAHelpers.h" #include "ChooseTargetActions.h" #include "DKActions.h" #include "DruidBearActions.h" diff --git a/src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.h b/src/Ai/Raid/ZA/ZAMultipliers.h similarity index 100% rename from src/Ai/Raid/ZulAman/Multiplier/RaidZulAmanMultipliers.h rename to src/Ai/Raid/ZA/ZAMultipliers.h diff --git a/src/Ai/Raid/ZulAman/Strategy/RaidZulAmanStrategy.cpp b/src/Ai/Raid/ZA/ZAStrategy.cpp similarity index 98% rename from src/Ai/Raid/ZulAman/Strategy/RaidZulAmanStrategy.cpp rename to src/Ai/Raid/ZA/ZAStrategy.cpp index 4ba01a2a1..d9de00b21 100644 --- a/src/Ai/Raid/ZulAman/Strategy/RaidZulAmanStrategy.cpp +++ b/src/Ai/Raid/ZA/ZAStrategy.cpp @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidZulAmanStrategy.h" -#include "RaidZulAmanMultipliers.h" +#include "ZAStrategy.h" +#include "ZAMultipliers.h" void RaidZulAmanStrategy::InitTriggers(std::vector& triggers) { diff --git a/src/Ai/Raid/ZulAman/Strategy/RaidZulAmanStrategy.h b/src/Ai/Raid/ZA/ZAStrategy.h similarity index 100% rename from src/Ai/Raid/ZulAman/Strategy/RaidZulAmanStrategy.h rename to src/Ai/Raid/ZA/ZAStrategy.h diff --git a/src/Ai/Raid/ZulAman/RaidZulAmanTriggerContext.h b/src/Ai/Raid/ZA/ZATriggerContext.h similarity index 99% rename from src/Ai/Raid/ZulAman/RaidZulAmanTriggerContext.h rename to src/Ai/Raid/ZA/ZATriggerContext.h index cb8bac864..15fd30b20 100644 --- a/src/Ai/Raid/ZulAman/RaidZulAmanTriggerContext.h +++ b/src/Ai/Raid/ZA/ZATriggerContext.h @@ -6,7 +6,7 @@ #ifndef _PLAYERBOT_RAIDZULAMANTRIGGERCONTEXT_H #define _PLAYERBOT_RAIDZULAMANTRIGGERCONTEXT_H -#include "RaidZulAmanTriggers.h" +#include "ZATriggers.h" #include "NamedObjectContext.h" class RaidZulAmanTriggerContext : public NamedObjectContext diff --git a/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp b/src/Ai/Raid/ZA/ZATriggers.cpp similarity index 98% rename from src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp rename to src/Ai/Raid/ZA/ZATriggers.cpp index 22b072702..60ce03303 100644 --- a/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.cpp +++ b/src/Ai/Raid/ZA/ZATriggers.cpp @@ -3,9 +3,9 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#include "RaidZulAmanTriggers.h" -#include "RaidZulAmanHelpers.h" -#include "RaidZulAmanActions.h" +#include "ZATriggers.h" +#include "ZAHelpers.h" +#include "ZAActions.h" #include "Playerbots.h" #include "RaidBossHelpers.h" diff --git a/src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.h b/src/Ai/Raid/ZA/ZATriggers.h similarity index 100% rename from src/Ai/Raid/ZulAman/Trigger/RaidZulAmanTriggers.h rename to src/Ai/Raid/ZA/ZATriggers.h diff --git a/src/Bot/Engine/BuildSharedActionContexts.cpp b/src/Bot/Engine/BuildSharedActionContexts.cpp index c2972a68f..901a7f12b 100644 --- a/src/Bot/Engine/BuildSharedActionContexts.cpp +++ b/src/Bot/Engine/BuildSharedActionContexts.cpp @@ -2,24 +2,24 @@ #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/HyjalSummit/RaidHyjalSummitActionContext.h" -#include "Ai/Raid/BlackTemple/RaidBlackTempleActionContext.h" -#include "Ai/Raid/ZulAman/RaidZulAmanActionContext.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/ICC/ICCActionContext.h" +#include "Aq20ActionContext.h" +#include "MCActionContext.h" +#include "BWLActionContext.h" +#include "KaraActionContext.h" +#include "GruulActionContext.h" +#include "NaxxActionContext.h" +#include "MagActionContext.h" +#include "SSCActionContext.h" +#include "TKActionContext.h" +#include "HyjalActionContext.h" +#include "BTActionContext.h" +#include "ZAActionContext.h" +#include "OSActionContext.h" +#include "EoEActionContext.h" +#include "VoAActionContext.h" +#include "UldActionContext.h" +#include "OnyActionContext.h" +#include "ICCActionContext.h" #include "Ai/Dungeon/TbcDungeonActionContext.h" #include "Ai/Dungeon/WotlkDungeonActionContext.h" diff --git a/src/Bot/Engine/BuildSharedTriggerContexts.cpp b/src/Bot/Engine/BuildSharedTriggerContexts.cpp index 43b59542c..704890524 100644 --- a/src/Bot/Engine/BuildSharedTriggerContexts.cpp +++ b/src/Bot/Engine/BuildSharedTriggerContexts.cpp @@ -2,24 +2,24 @@ #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/HyjalSummit/RaidHyjalSummitTriggerContext.h" -#include "Ai/Raid/BlackTemple/RaidBlackTempleTriggerContext.h" -#include "Ai/Raid/ZulAman/RaidZulAmanTriggerContext.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/ICC/ICCTriggerContext.h" +#include "Aq20TriggerContext.h" +#include "MCTriggerContext.h" +#include "BWLTriggerContext.h" +#include "KaraTriggerContext.h" +#include "GruulTriggerContext.h" +#include "MagTriggerContext.h" +#include "NaxxTriggerContext.h" +#include "SSCTriggerContext.h" +#include "TKTriggerContext.h" +#include "HyjalTriggerContext.h" +#include "BTTriggerContext.h" +#include "ZATriggerContext.h" +#include "OSTriggerContext.h" +#include "EoETriggerContext.h" +#include "VoATriggerContext.h" +#include "UldTriggerContext.h" +#include "OnyTriggerContext.h" +#include "ICCTriggerContext.h" #include "Ai/Dungeon/TbcDungeonTriggerContext.h" #include "Ai/Dungeon/WotlkDungeonTriggerContext.h" diff --git a/src/Bot/Factory/AiFactory.cpp b/src/Bot/Factory/AiFactory.cpp index f1fd2491f..b3abbd8ad 100644 --- a/src/Bot/Factory/AiFactory.cpp +++ b/src/Bot/Factory/AiFactory.cpp @@ -500,21 +500,21 @@ void AiFactory::AddDefaultNonCombatStrategies(Player* player, PlayerbotAI* const switch (player->getClass()) { case CLASS_PRIEST: - nonCombatEngine->addStrategiesNoInit("dps assist", "cure", nullptr); + nonCombatEngine->addStrategiesNoInit("dps assist", "cure", "rshadow", nullptr); break; case CLASS_PALADIN: if (tab == PALADIN_TAB_PROTECTION) { nonCombatEngine->addStrategiesNoInit("bthreat", "tank assist", "pull", "barmor", nullptr); if (player->GetLevel() >= 20) - nonCombatEngine->addStrategy("bhealth", false); + nonCombatEngine->addStrategy("bsanc", false); else - nonCombatEngine->addStrategy("bdps", false); + nonCombatEngine->addStrategy("bmight", false); } else if (tab == PALADIN_TAB_HOLY) - nonCombatEngine->addStrategiesNoInit("dps assist", "bmana", "bcast", nullptr); + nonCombatEngine->addStrategiesNoInit("dps assist", "bwisdom", "bcast", nullptr); else - nonCombatEngine->addStrategiesNoInit("dps assist", "bdps", "baoe", nullptr); + nonCombatEngine->addStrategiesNoInit("dps assist", "bmight", "baoe", nullptr); nonCombatEngine->addStrategiesNoInit("cure", nullptr); break; diff --git a/src/Bot/Factory/PlayerbotFactory.cpp b/src/Bot/Factory/PlayerbotFactory.cpp index 161410c3f..06e3e8405 100644 --- a/src/Bot/Factory/PlayerbotFactory.cpp +++ b/src/Bot/Factory/PlayerbotFactory.cpp @@ -552,9 +552,8 @@ void PlayerbotFactory::Prepare() void PlayerbotFactory::Randomize(bool incremental) { // if (sPlayerbotAIConfig.disableRandomLevels) - // { // return; - // } + LOG_DEBUG("playerbots", "{} randomizing {} (level {} class = {})...", (incremental ? "Incremental" : "Full"), bot->GetName().c_str(), level, bot->getClass()); // LOG_DEBUG("playerbots", "Preparing to {} randomize...", (incremental ? "incremental" : "full")); @@ -562,16 +561,22 @@ void PlayerbotFactory::Randomize(bool incremental) LOG_DEBUG("playerbots", "Resetting player..."); PerfMonitorOperation* pmo = sPerfMonitor.start(PERF_MON_RNDBOT, "PlayerbotFactory_Reset"); - if (!PlayerbotAIConfig::instance().equipmentPersistence || level < PlayerbotAIConfig::instance().equipmentPersistenceLevel) + if (!sPlayerbotAIConfig.equipAndSpecPersistence || + level < sPlayerbotAIConfig.equipAndSpecPersistenceLevel) + { bot->resetTalents(true); + } if (!incremental) { ClearSkills(); ClearSpells(); ResetQuests(); - if (!PlayerbotAIConfig::instance().equipmentPersistence || level < PlayerbotAIConfig::instance().equipmentPersistenceLevel) + if (!sPlayerbotAIConfig.equipAndSpecPersistence || + level < sPlayerbotAIConfig.equipAndSpecPersistenceLevel) + { ClearAllItems(); + } } ClearInventory(); bot->RemoveAllSpellCooldown(); @@ -622,8 +627,8 @@ void PlayerbotFactory::Randomize(bool incremental) pmo = sPerfMonitor.start(PERF_MON_RNDBOT, "PlayerbotFactory_Talents"); LOG_DEBUG("playerbots", "Initializing talents..."); - if (!incremental || !sPlayerbotAIConfig.equipmentPersistence || - bot->GetLevel() < sPlayerbotAIConfig.equipmentPersistenceLevel) + if (!incremental || !sPlayerbotAIConfig.equipAndSpecPersistence || + bot->GetLevel() < sPlayerbotAIConfig.equipAndSpecPersistenceLevel) { uint32 specIndex = InitTalentsTree(); sRandomPlayerbotMgr.SetValue(bot->GetGUID().GetCounter(), "specNo", specIndex + 1); @@ -670,11 +675,10 @@ void PlayerbotFactory::Randomize(bool incremental) pmo = sPerfMonitor.start(PERF_MON_RNDBOT, "PlayerbotFactory_Equip"); LOG_DEBUG("playerbots", "Initializing equipmemt..."); - if (!incremental || !sPlayerbotAIConfig.equipmentPersistence || - bot->GetLevel() < sPlayerbotAIConfig.equipmentPersistenceLevel) + if (!incremental || !sPlayerbotAIConfig.equipAndSpecPersistence || + bot->GetLevel() < sPlayerbotAIConfig.equipAndSpecPersistenceLevel) { - if (sPlayerbotAIConfig.incrementalGearInit || !incremental) - InitEquipment(incremental, incremental ? false : sPlayerbotAIConfig.twoRoundsGearInit); + InitEquipment(incremental, incremental ? false : sPlayerbotAIConfig.twoRoundsGearInit); } // bot->SaveToDB(false, false); if (pmo) @@ -811,7 +815,8 @@ void PlayerbotFactory::Randomize(bool incremental) void PlayerbotFactory::Refresh() { // Prepare(); - // if (!sPlayerbotAIConfig.equipmentPersistence || bot->GetLevel() < sPlayerbotAIConfig.equipmentPersistenceLevel) + // if (!sPlayerbotAIConfig.equipAndSpecPersistence || + // bot->GetLevel() < sPlayerbotAIConfig.equipAndSpecPersistenceLevel) // { // InitEquipment(true); // } @@ -831,14 +836,13 @@ void PlayerbotFactory::Refresh() InitSpecialSpells(); InitMounts(); InitKeyring(); - if (!sPlayerbotAIConfig.equipmentPersistence || bot->GetLevel() < sPlayerbotAIConfig.equipmentPersistenceLevel) + if (!sPlayerbotAIConfig.equipAndSpecPersistence || + bot->GetLevel() < sPlayerbotAIConfig.equipAndSpecPersistenceLevel) { InitTalentsTree(true, true, true); } if (bot->GetLevel() >= sPlayerbotAIConfig.minEnchantingBotLevel) - { ApplyEnchantAndGemsNew(); - } bot->DurabilityRepairAll(false, 1.0f, false); if (bot->isDead()) bot->ResurrectPlayer(1.0f, false); @@ -2037,9 +2041,6 @@ void Shuffle(std::vector& items) void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) { - if (incremental && !sPlayerbotAIConfig.incrementalGearInit) - return; - if (level < 5) { // original items @@ -2081,7 +2082,7 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) return; } - std::unordered_map> items; + std::unordered_map>> items; // int tab = AiFactory::GetPlayerSpecTab(bot); uint32 blevel = bot->GetLevel(); @@ -2228,13 +2229,17 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) if (slot == EQUIPMENT_SLOT_OFFHAND && bot->getClass() == CLASS_ROGUE && proto->Class != ITEM_CLASS_WEAPON) continue; - items[slot].push_back(itemId); + + int32 bestRandomProp = 0; + if (proto->RandomProperty || proto->RandomSuffix) + bestRandomProp = calculator.PickBestRandomPropertyId(itemId); + items[slot].push_back({itemId, bestRandomProp}); } } } } while (items[slot].size() < 25 && desiredQuality-- > ITEM_QUALITY_POOR); - std::vector& ids = items[slot]; + std::vector>& ids = items[slot]; if (ids.empty()) { continue; @@ -2242,13 +2247,15 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) float bestScoreForSlot = -1; uint32 bestItemForSlot = 0; + int32 bestRandomPropForSlot = 0; for (int index = 0; index < ids.size(); index++) { - uint32 newItemId = ids[index]; + uint32 newItemId = ids[index].first; + int32 newItemProp = ids[index].second; ItemTemplate const* proto = sObjectMgr->GetItemTemplate(newItemId); - float cur_score = calculator.CalculateItem(newItemId, 0, slot); + float cur_score = calculator.CalculateItem(newItemId, newItemProp, slot); if (cur_score > 0.0f && proto && proto->Class == ITEM_CLASS_ARMOR && sPlayerbotAIConfig.preferClassArmorType) { @@ -2267,6 +2274,7 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) continue; bestScoreForSlot = cur_score; bestItemForSlot = newItemId; + bestRandomPropForSlot = newItemProp; } } @@ -2304,7 +2312,16 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) if (oldItem) continue; - bot->EquipNewItem(dest, bestItemForSlot, true); + if (Item* equipped = bot->EquipNewItem(dest, bestItemForSlot, true)) + { + if (bestRandomPropForSlot != 0) + { + uint8 equipSlot = equipped->GetSlot(); + bot->_ApplyItemMods(equipped, equipSlot, false); + equipped->SetItemRandomProperties(bestRandomPropForSlot); + bot->_ApplyItemMods(equipped, equipSlot, true); + } + } bot->AutoUnequipOffhandIfNeed(); // if (newItem) // { @@ -2345,19 +2362,21 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) if (Item* oldItem = bot->GetItemByPos(INVENTORY_SLOT_BAG_0, slot)) bot->DestroyItem(INVENTORY_SLOT_BAG_0, slot, true); - std::vector& ids = items[slot]; + std::vector>& ids = items[slot]; if (ids.empty()) continue; float bestScoreForSlot = -1; uint32 bestItemForSlot = 0; + int32 bestRandomPropForSlot = 0; for (int index = 0; index < ids.size(); index++) { - uint32 newItemId = ids[index]; + uint32 newItemId = ids[index].first; + int32 newItemProp = ids[index].second; ItemTemplate const* proto = sObjectMgr->GetItemTemplate(newItemId); - float cur_score = calculator.CalculateItem(newItemId, 0, slot); + float cur_score = calculator.CalculateItem(newItemId, newItemProp, slot); if (cur_score > 0.0f && proto && proto->Class == ITEM_CLASS_ARMOR && sPlayerbotAIConfig.preferClassArmorType) { @@ -2376,6 +2395,7 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) continue; bestScoreForSlot = cur_score; bestItemForSlot = newItemId; + bestRandomPropForSlot = newItemProp; } } @@ -2386,7 +2406,16 @@ void PlayerbotFactory::InitEquipment(bool incremental, bool second_chance) if (!CanEquipUnseenItem(slot, dest, bestItemForSlot)) continue; - bot->EquipNewItem(dest, bestItemForSlot, true); + if (Item* equipped = bot->EquipNewItem(dest, bestItemForSlot, true)) + { + if (bestRandomPropForSlot != 0) + { + uint8 equipSlot = equipped->GetSlot(); + bot->_ApplyItemMods(equipped, equipSlot, false); + equipped->SetItemRandomProperties(bestRandomPropForSlot); + bot->_ApplyItemMods(equipped, equipSlot, true); + } + } bot->AutoUnequipOffhandIfNeed(); } } diff --git a/src/Bot/PlayerbotAI.cpp b/src/Bot/PlayerbotAI.cpp index e1096b0cc..8bd1f2c2f 100644 --- a/src/Bot/PlayerbotAI.cpp +++ b/src/Bot/PlayerbotAI.cpp @@ -5971,29 +5971,6 @@ void PlayerbotAI::EnchantItemT(uint32 spellid, uint8 slot) LOG_INFO("playerbots", "{}: items was enchanted successfully!", bot->GetName().c_str()); } -uint32 PlayerbotAI::GetBuffedCount(Player* player, std::string const spellname) -{ - uint32 bcount = 0; - - if (Group* group = bot->GetGroup()) - { - for (GroupReference* gref = group->GetFirstMember(); gref; gref = gref->next()) - { - Player* member = gref->GetSource(); - if (!member || !member->IsInWorld()) - continue; - - if (!member->IsInSameRaidWith(player)) - continue; - - if (HasAura(spellname, member, true)) - bcount++; - } - } - - return bcount; -} - int32 PlayerbotAI::GetNearGroupMemberCount(float dis) { int count = 1; // yourself diff --git a/src/Bot/PlayerbotAI.h b/src/Bot/PlayerbotAI.h index 01924c46f..2e31c9a9e 100644 --- a/src/Bot/PlayerbotAI.h +++ b/src/Bot/PlayerbotAI.h @@ -493,7 +493,6 @@ public: void ImbueItem(Item* item, Unit* target); void ImbueItem(Item* item); void EnchantItemT(uint32 spellid, uint8 slot); - uint32 GetBuffedCount(Player* player, std::string const spellname); int32 GetNearGroupMemberCount(float dis = sPlayerbotAIConfig.sightDistance); virtual bool CanCastSpell(std::string const name, Unit* target, Item* itemTarget = nullptr); diff --git a/src/Bot/PlayerbotMgr.cpp b/src/Bot/PlayerbotMgr.cpp index 0634bbf78..9d9f5688f 100644 --- a/src/Bot/PlayerbotMgr.cpp +++ b/src/Bot/PlayerbotMgr.cpp @@ -22,6 +22,7 @@ #include "GuildMgr.h" #include "ObjectAccessor.h" #include "ObjectGuid.h" +#include "ObjectMgr.h" #include "PlayerbotAIConfig.h" #include "PlayerbotRepository.h" #include "PlayerbotFactory.h" @@ -481,12 +482,6 @@ void PlayerbotHolder::OnBotLogin(Player* const bot) } Player* master = botAI->GetMaster(); - if (master) - { - ObjectGuid masterGuid = master->GetGUID(); - if (master->GetGroup() && !master->GetGroup()->IsLeader(masterGuid)) - master->GetGroup()->ChangeLeader(masterGuid); - } Group* group = bot->GetGroup(); if (group) @@ -737,7 +732,10 @@ std::string const PlayerbotHolder::ProcessBotCommand(std::string const cmd, Obje bool addClassBot = sRandomPlayerbotMgr.IsAddclassBot(guid.GetCounter()); if (!addClassBot) - return "ERROR: You can not use this command on non-addclass bot."; + { + if (!(cmd == "refresh=raid" && sPlayerbotAIConfig.resetInstanceIdForAltBots)) + return "ERROR: You can only use this command on addclass bots."; + } if (!admin) { @@ -1246,7 +1244,7 @@ std::vector PlayerbotHolder::HandlePlayerbotCommand(char const* arg std::vector chars = split(charnameStr, ','); for (std::vector::iterator i = chars.begin(); i != chars.end(); i++) { - std::string const s = *i; + std::string s = *i; if (!strcmp(cmd, "addaccount")) { @@ -1255,7 +1253,13 @@ std::vector PlayerbotHolder::HandlePlayerbotCommand(char const* arg if (!accountId) { // If not found, try to get account ID from character name - ObjectGuid charGuid = sCharacterCache->GetCharacterGuidByName(s); + std::string charName = s; + if (!normalizePlayerName(charName)) + { + messages.push_back("Neither account nor character '" + s + "' found"); + continue; + } + ObjectGuid charGuid = sCharacterCache->GetCharacterGuidByName(charName); if (!charGuid) { messages.push_back("Neither account nor character '" + s + "' found"); @@ -1283,6 +1287,11 @@ std::vector PlayerbotHolder::HandlePlayerbotCommand(char const* arg else { // For regular add command, only add the specific character + if (!normalizePlayerName(s)) + { + messages.push_back("Character '" + *i + "' not found"); + continue; + } ObjectGuid charGuid = sCharacterCache->GetCharacterGuidByName(s); if (!charGuid) { diff --git a/src/Mgr/Item/RandomItemMgr.cpp b/src/Mgr/Item/RandomItemMgr.cpp index e08f2c385..c57080644 100644 --- a/src/Mgr/Item/RandomItemMgr.cpp +++ b/src/Mgr/Item/RandomItemMgr.cpp @@ -160,6 +160,7 @@ void RandomItemMgr::Init() BuildPotionCache(); BuildFoodCache(); BuildTradeCache(); + LoadEnchantmentPool(); } void RandomItemMgr::InitAfterAhBot() @@ -452,6 +453,39 @@ std::vector RandomItemMgr::GetCachedEquipments(uint32 requiredLevel, uin return equipCacheNew[requiredLevel][inventoryType]; } +void RandomItemMgr::LoadEnchantmentPool() +{ + enchPoolCache.clear(); + + QueryResult result = WorldDatabase.Query("SELECT entry, ench FROM item_enchantment_template"); + if (!result) + { + LOG_WARN("playerbots", "item_enchantment_template empty; bot autogear cannot evaluate random suffixes"); + return; + } + + uint32 count = 0; + do + { + Field* fields = result->Fetch(); + uint32 entry = fields[0].Get(); + uint32 ench = fields[1].Get(); + enchPoolCache[entry].push_back(ench); + ++count; + } while (result->NextRow()); + + LOG_INFO("playerbots", "Loaded {} item enchantment pool rows for bot autogear", count); +} + +std::vector const& RandomItemMgr::GetEnchantmentPool(uint32 entry) const +{ + static std::vector const empty; + auto it = enchPoolCache.find(entry); + if (it == enchPoolCache.end()) + return empty; + return it->second; +} + bool RandomItemMgr::ShouldEquipArmorForSpec(uint8 playerclass, uint8 spec, ItemTemplate const* proto) { if (proto->InventoryType == INVTYPE_TABARD) diff --git a/src/Mgr/Item/RandomItemMgr.h b/src/Mgr/Item/RandomItemMgr.h index 54e2e6351..bc19d75da 100644 --- a/src/Mgr/Item/RandomItemMgr.h +++ b/src/Mgr/Item/RandomItemMgr.h @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -172,9 +173,11 @@ public: static bool IsUsedBySkill(ItemTemplate const* proto, uint32 skillId); bool IsTestItem(uint32 itemId) { return itemForTest.find(itemId) != itemForTest.end(); } std::vector GetCachedEquipments(uint32 requiredLevel, uint32 inventoryType); + std::vector const& GetEnchantmentPool(uint32 entry) const; private: void BuildRandomItemCache(); + void LoadEnchantmentPool(); void BuildEquipCache(); void BuildEquipCacheNew(); void BuildItemInfoCache(); @@ -217,6 +220,8 @@ private: static std::set itemCache; // equipCacheNew[RequiredLevel][InventoryType] std::map>> equipCacheNew; + // enchPoolCache[item_enchantment_template.entry] -> list of enchantment ids + std::unordered_map> enchPoolCache; }; #define sRandomItemMgr RandomItemMgr::instance() diff --git a/src/Mgr/Item/StatsWeightCalculator.cpp b/src/Mgr/Item/StatsWeightCalculator.cpp index b232b1e6b..2e11f0a38 100644 --- a/src/Mgr/Item/StatsWeightCalculator.cpp +++ b/src/Mgr/Item/StatsWeightCalculator.cpp @@ -14,6 +14,7 @@ #include "ObjectMgr.h" #include "PlayerbotAI.h" #include "PlayerbotFactory.h" +#include "RandomItemMgr.h" #include "SharedDefines.h" #include "SpellAuraDefines.h" #include "SpellMgr.h" @@ -190,6 +191,53 @@ void StatsWeightCalculator::CalculateRandomProperty(int32 randomPropertyId, uint } } +int32 StatsWeightCalculator::PickBestRandomPropertyId(uint32 itemId) +{ + ItemTemplate const* proto = sObjectMgr->GetItemTemplate(itemId); + if (!proto) + return 0; + + bool isSuffix = false; + uint32 poolEntry = proto->RandomProperty; + if (!poolEntry) + { + poolEntry = proto->RandomSuffix; + isSuffix = true; + } + if (!poolEntry) + return 0; + + std::vector const& pool = sRandomItemMgr.GetEnchantmentPool(poolEntry); + if (pool.empty()) + return 0; + + Reset(); + GenerateWeights(player_); + + int32 bestId = 0; + float bestScore = 0.0f; + for (uint32 enchId : pool) + { + int32 candidate = isSuffix ? -static_cast(enchId) : static_cast(enchId); + + collector_->Reset(); + CalculateRandomProperty(candidate, itemId); + + float score = 0.0f; + for (uint32 i = 0; i < STATS_TYPE_MAX; ++i) + score += stats_weights_[i] * collector_->stats[i]; + + if (bestId == 0 || score > bestScore) + { + bestId = candidate; + bestScore = score; + } + } + + collector_->Reset(); + return bestId; +} + void StatsWeightCalculator::GenerateWeights(Player* player) { GenerateBasicWeights(player); diff --git a/src/Mgr/Item/StatsWeightCalculator.h b/src/Mgr/Item/StatsWeightCalculator.h index d97dafbb3..1049adcb4 100644 --- a/src/Mgr/Item/StatsWeightCalculator.h +++ b/src/Mgr/Item/StatsWeightCalculator.h @@ -30,6 +30,7 @@ public: void Reset(); float CalculateItem(uint32 itemId, int32 randomPropertyId = 0, int32 slot = -1); float CalculateEnchant(uint32 enchantId); + int32 PickBestRandomPropertyId(uint32 itemId); void SetOverflowPenalty(bool apply) { enable_overflow_penalty_ = apply; } void SetItemSetBonus(bool apply) { enable_item_set_bonus_ = apply; } diff --git a/src/PlayerbotAIConfig.cpp b/src/PlayerbotAIConfig.cpp index af08edf64..b67c1e7e3 100644 --- a/src/PlayerbotAIConfig.cpp +++ b/src/PlayerbotAIConfig.cpp @@ -84,8 +84,6 @@ bool PlayerbotAIConfig::Initialize() sitDelay = sConfigMgr->GetOption("AiPlayerbot.SitDelay", 20000); returnDelay = sConfigMgr->GetOption("AiPlayerbot.ReturnDelay", 2000); lootDelay = sConfigMgr->GetOption("AiPlayerbot.LootDelay", 1000); - minBotsForGreaterBuff = sConfigMgr->GetOption("AiPlayerbot.MinBotsForGreaterBuff", 3); - rpWarningCooldown = sConfigMgr->GetOption("AiPlayerbot.RPWarningCooldown", 30); disabledWithoutRealPlayerLoginDelay = sConfigMgr->GetOption("AiPlayerbot.DisabledWithoutRealPlayerLoginDelay", 30); disabledWithoutRealPlayerLogoutDelay = sConfigMgr->GetOption("AiPlayerbot.DisabledWithoutRealPlayerLogoutDelay", 300); @@ -116,6 +114,32 @@ bool PlayerbotAIConfig::Initialize() highMana = sConfigMgr->GetOption("AiPlayerbot.HighMana", 65); autoSaveMana = sConfigMgr->GetOption("AiPlayerbot.AutoSaveMana", true); saveManaThreshold = sConfigMgr->GetOption("AiPlayerbot.SaveManaThreshold", 60); + switch (sConfigMgr->GetOption("AiPlayerbot.AutoGreaterBlessings", 1)) + { + case 0: + autoGreaterBlessings = AutoPartyBuffMode::DISABLED; + break; + case 2: + autoGreaterBlessings = AutoPartyBuffMode::GROUP_OR_RAID; + break; + case 1: + default: + autoGreaterBlessings = AutoPartyBuffMode::RAID_ONLY; + break; + } + switch (sConfigMgr->GetOption("AiPlayerbot.AutoPartyBuffs", 2)) + { + case 0: + autoPartyBuffs = AutoPartyBuffMode::DISABLED; + break; + case 1: + autoPartyBuffs = AutoPartyBuffMode::RAID_ONLY; + break; + case 2: + default: + autoPartyBuffs = AutoPartyBuffMode::GROUP_OR_RAID; + break; + } autoAvoidAoe = sConfigMgr->GetOption("AiPlayerbot.AutoAvoidAoe", true); maxAoeAvoidRadius = sConfigMgr->GetOption("AiPlayerbot.MaxAoeAvoidRadius", 15.0f); LoadSet>(sConfigMgr->GetOption("AiPlayerbot.AoeAvoidSpellWhitelist", "50759,57491,13810,29946"), @@ -123,7 +147,6 @@ bool PlayerbotAIConfig::Initialize() tellWhenAvoidAoe = sConfigMgr->GetOption("AiPlayerbot.TellWhenAvoidAoe", false); randomGearLoweringChance = sConfigMgr->GetOption("AiPlayerbot.RandomGearLoweringChance", 0.0f); - incrementalGearInit = sConfigMgr->GetOption("AiPlayerbot.IncrementalGearInit", true); randomGearQualityLimit = sConfigMgr->GetOption("AiPlayerbot.RandomGearQualityLimit", 3); randomGearScoreLimit = sConfigMgr->GetOption("AiPlayerbot.RandomGearScoreLimit", 0); preferClassArmorType = sConfigMgr->GetOption("AiPlayerbot.PreferClassArmorType", false); @@ -191,7 +214,7 @@ bool PlayerbotAIConfig::Initialize() attunementQuests); LoadSet>( - sConfigMgr->GetOption("AiPlayerbot.UnobtainableItems", "12468,46978"), + sConfigMgr->GetOption("AiPlayerbot.UnobtainableItems", "12468,44869,44870,46978"), unobtainableItems); botAutologin = sConfigMgr->GetOption("AiPlayerbot.BotAutologin", false); @@ -328,32 +351,27 @@ bool PlayerbotAIConfig::Initialize() // does not depend on global chance broadcastChanceGuildManagement = sConfigMgr->GetOption("AiPlayerbot.BroadcastChanceGuildManagement", 30000); - //////////////////////////// toxicLinksRepliesChance = sConfigMgr->GetOption("AiPlayerbot.ToxicLinksRepliesChance", 30); // 0-100 thunderfuryRepliesChance = sConfigMgr->GetOption("AiPlayerbot.ThunderfuryRepliesChance", 40); // 0-100 guildRepliesRate = sConfigMgr->GetOption("AiPlayerbot.GuildRepliesRate", 100); // 0-100 - suggestDungeonsInLowerCaseRandomly = - sConfigMgr->GetOption("AiPlayerbot.SuggestDungeonsInLowerCaseRandomly", false); - - ////////////////////////// !CHAT randomBotJoinBG = sConfigMgr->GetOption("AiPlayerbot.RandomBotJoinBG", true); randomBotAutoJoinBG = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBG", false); - randomBotAutoJoinArenaBracket = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinArenaBracket", 7); + randomBotAutoJoinArenaBracket = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinArenaBracket", 14); - randomBotAutoJoinICBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinICBrackets", "0,1"); - randomBotAutoJoinEYBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinEYBrackets", "0,1,2"); - randomBotAutoJoinAVBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinAVBrackets", "0,1,2,3"); - randomBotAutoJoinABBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinABBrackets", "0,1,2,3,4,5,6"); - randomBotAutoJoinWSBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinWSBrackets", "0,1,2,3,4,5,6,7"); + randomBotAutoJoinWSBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinWSBrackets", "7"); + randomBotAutoJoinABBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinABBrackets", "6"); + randomBotAutoJoinAVBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinAVBrackets", "3"); + randomBotAutoJoinEYBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinEYBrackets", "2"); + randomBotAutoJoinICBrackets = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinICBrackets", "1"); - randomBotAutoJoinBGICCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGICCount", 0); - randomBotAutoJoinBGEYCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGEYCount", 0); + randomBotAutoJoinBGWSCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGWSCount", 1); + randomBotAutoJoinBGABCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGABCount", 1); randomBotAutoJoinBGAVCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGAVCount", 0); - randomBotAutoJoinBGABCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGABCount", 0); - randomBotAutoJoinBGWSCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGWSCount", 0); + randomBotAutoJoinBGEYCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGEYCount", 1); + randomBotAutoJoinBGICCount = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGICCount", 0); randomBotAutoJoinBGRatedArena2v2Count = sConfigMgr->GetOption("AiPlayerbot.RandomBotAutoJoinBGRatedArena2v2Count", 0); @@ -369,7 +387,6 @@ bool PlayerbotAIConfig::Initialize() randomBotMaxLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotMaxLevel", 80); if (randomBotMaxLevel > sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL)) randomBotMaxLevel = sWorld->getIntConfig(CONFIG_MAX_PLAYER_LEVEL); - randomBotLoginAtStartup = sConfigMgr->GetOption("AiPlayerbot.RandomBotLoginAtStartup", true); randomBotTeleLowerLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotTeleLowerLevel", 1); randomBotTeleHigherLevel = sConfigMgr->GetOption("AiPlayerbot.RandomBotTeleHigherLevel", 3); openGoSpell = sConfigMgr->GetOption("AiPlayerbot.OpenGoSpell", 6477); @@ -535,6 +552,8 @@ bool PlayerbotAIConfig::Initialize() randomBotGuildSizeMax = sConfigMgr->GetOption("AiPlayerbot.RandomBotGuildSizeMax", 15); deleteRandomBotGuilds = sConfigMgr->GetOption("AiPlayerbot.DeleteRandomBotGuilds", false); + botSendMailEnabled = sConfigMgr->GetOption("AiPlayerbot.BotSendMailEnabled", true); + guildTaskEnabled = sConfigMgr->GetOption("AiPlayerbot.EnableGuildTasks", false); minGuildTaskChangeTime = sConfigMgr->GetOption("AiPlayerbot.MinGuildTaskChangeTime", 3 * 24 * 3600); maxGuildTaskChangeTime = sConfigMgr->GetOption("AiPlayerbot.MaxGuildTaskChangeTime", 4 * 24 * 3600); @@ -557,8 +576,8 @@ bool PlayerbotAIConfig::Initialize() disableRandomLevels = sConfigMgr->GetOption("AiPlayerbot.DisableRandomLevels", false); randomBotRandomPassword = sConfigMgr->GetOption("AiPlayerbot.RandomBotRandomPassword", true); downgradeMaxLevelBot = sConfigMgr->GetOption("AiPlayerbot.DowngradeMaxLevelBot", true); - equipmentPersistence = sConfigMgr->GetOption("AiPlayerbot.EquipmentPersistence", false); - equipmentPersistenceLevel = sConfigMgr->GetOption("AiPlayerbot.EquipmentPersistenceLevel", 80); + equipAndSpecPersistence = sConfigMgr->GetOption("AiPlayerbot.EquipAndSpecPersistence", true); + equipAndSpecPersistenceLevel = sConfigMgr->GetOption("AiPlayerbot.EquipAndSpecPersistenceLevel", 1); groupInvitationPermission = sConfigMgr->GetOption("AiPlayerbot.GroupInvitationPermission", 1); keepAltsInGroup = sConfigMgr->GetOption("AiPlayerbot.KeepAltsInGroup", false); allowSummonInCombat = sConfigMgr->GetOption("AiPlayerbot.AllowSummonInCombat", true); @@ -567,6 +586,7 @@ bool PlayerbotAIConfig::Initialize() reviveBotWhenSummoned = sConfigMgr->GetOption("AiPlayerbot.ReviveBotWhenSummoned", 1); botRepairWhenSummon = sConfigMgr->GetOption("AiPlayerbot.BotRepairWhenSummon", true); autoInitOnly = sConfigMgr->GetOption("AiPlayerbot.AutoInitOnly", false); + resetInstanceIdForAltBots = sConfigMgr->GetOption("AiPlayerbot.ResetInstanceIdForAltBots", false); autoInitEquipLevelLimitRatio = sConfigMgr->GetOption("AiPlayerbot.AutoInitEquipLevelLimitRatio", 1.0); maxAddedBots = sConfigMgr->GetOption("AiPlayerbot.MaxAddedBots", 40); @@ -645,7 +665,7 @@ bool PlayerbotAIConfig::Initialize() dropObsoleteQuests = sConfigMgr->GetOption("AiPlayerbot.DropObsoleteQuests", true); allowLearnTrainerSpells = sConfigMgr->GetOption("AiPlayerbot.AllowLearnTrainerSpells", true); autoPickTalents = sConfigMgr->GetOption("AiPlayerbot.AutoPickTalents", true); - autoUpgradeEquip = sConfigMgr->GetOption("AiPlayerbot.AutoUpgradeEquip", false); + autoUpgradeEquip = sConfigMgr->GetOption("AiPlayerbot.AutoUpgradeEquip", true); hunterWolfPet = sConfigMgr->GetOption("AiPlayerbot.HunterWolfPet", 0); defaultPetStance = sConfigMgr->GetOption("AiPlayerbot.DefaultPetStance", 1); petChatCommandDebug = sConfigMgr->GetOption("AiPlayerbot.PetChatCommandDebug", 0); diff --git a/src/PlayerbotAIConfig.h b/src/PlayerbotAIConfig.h index 715701231..2d9071ead 100644 --- a/src/PlayerbotAIConfig.h +++ b/src/PlayerbotAIConfig.h @@ -3,8 +3,8 @@ * and/or modify it under version 3 of the License, or (at your option), any later version. */ -#ifndef _PLAYERBOT_PLAYERbotAICONFIG_H -#define _PLAYERBOT_PLAYERbotAICONFIG_H +#ifndef _PLAYERBOT_PLAYERBOTAICONFIG_H +#define _PLAYERBOT_PLAYERBOTAICONFIG_H #include #include @@ -40,6 +40,13 @@ enum class HealingManaEfficiency : uint8 SUPERIOR = 32 }; +enum class AutoPartyBuffMode : uint8 +{ + DISABLED = 0, + RAID_ONLY = 1, + GROUP_OR_RAID = 2 +}; + enum NewRpgStatus : int { //Initial Status @@ -94,6 +101,8 @@ public: uint32 lowMana, mediumMana, highMana; bool autoSaveMana; uint32 saveManaThreshold; + AutoPartyBuffMode autoGreaterBlessings; + AutoPartyBuffMode autoPartyBuffs; bool autoAvoidAoe; float maxAoeAvoidRadius; std::set aoeAvoidSpellWhitelist; @@ -125,7 +134,6 @@ public: std::vector randomBotQuestIds; uint32 randomBotTeleportDistance; float randomGearLoweringChance; - bool incrementalGearInit; int32 randomGearQualityLimit; int32 randomGearScoreLimit; bool preferClassArmorType; @@ -146,12 +154,6 @@ public: uint32 disabledWithoutRealPlayerLoginDelay, disabledWithoutRealPlayerLogoutDelay; bool randomBotJoinLfg; - // Buff system - // Min group size to use Greater buffs (Paladin, Mage, Druid). Default: 3 - int32 minBotsForGreaterBuff; - // Cooldown (seconds) between reagent-missing RP warnings, per bot & per buff. Default: 30 - int32 rpWarningCooldown; - // Professions bool enableFishingWithMaster; uint32 classMatchingProfessionChance; @@ -224,10 +226,6 @@ public: uint32 guildRepliesRate; - bool suggestDungeonsInLowerCaseRandomly; - - // -- - bool randomBotJoinBG; bool randomBotAutoJoinBG; @@ -249,7 +247,6 @@ public: uint32 randomBotAutoJoinBGRatedArena3v3Count; uint32 randomBotAutoJoinBGRatedArena5v5Count; - bool randomBotLoginAtStartup; uint32 randomBotTeleLowerLevel, randomBotTeleHigherLevel; std::map> zoneBrackets; bool logInGroupOnly, logValuesPerTick; @@ -295,6 +292,7 @@ public: float periodicOnlineOfflineRatio; bool gearscorecheck; bool randomBotPreQuests; + bool botSendMailEnabled; bool guildTaskEnabled; uint32 minGuildTaskChangeTime, maxGuildTaskChangeTime; @@ -391,8 +389,8 @@ public: uint32 selfBotLevel; bool downgradeMaxLevelBot; - bool equipmentPersistence; - int32 equipmentPersistenceLevel; + bool equipAndSpecPersistence; + int32 equipAndSpecPersistenceLevel; int32 groupInvitationPermission; bool keepAltsInGroup = false; bool KeepAltsInGroup() const { return keepAltsInGroup; } @@ -402,6 +400,7 @@ public: int reviveBotWhenSummoned; bool botRepairWhenSummon; bool autoInitOnly; + bool resetInstanceIdForAltBots; float autoInitEquipLevelLimitRatio; int32 maxAddedBots; int32 addClassCommand; diff --git a/src/Script/WorldThr/PlayerbotOperations.h b/src/Script/WorldThr/PlayerbotOperations.h index ee6443cd8..cc62e7127 100644 --- a/src/Script/WorldThr/PlayerbotOperations.h +++ b/src/Script/WorldThr/PlayerbotOperations.h @@ -242,6 +242,7 @@ public: } group->ChangeLeader(newLeader->GetGUID()); + group->SendUpdate(); LOG_DEBUG("playerbots", "GroupSetLeaderOperation: Changed leader to {}", newLeader->GetName()); return true; }