From a8d8f370194d9c75a6985d5245ff6176cc898ddd Mon Sep 17 00:00:00 2001 From: Noscopezz Date: Sun, 26 Jan 2025 21:04:48 +0100 Subject: [PATCH] ICC Festergut 10 man fix (#915) * ICC Festergut 10 Man fix There was a rare case in 10 Man when 2 tanks would get spores which made them both stack at melee spot. Now the code will check if any of the spored player is main tank, if it is, it will stay at melee and other spores will go at ranged spot since off tank doesn't really need to stand near main tank all the time. --- .../raids/icecrown/RaidIccActions.cpp | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/strategy/raids/icecrown/RaidIccActions.cpp b/src/strategy/raids/icecrown/RaidIccActions.cpp index f6b1aaf7..969a6a69 100644 --- a/src/strategy/raids/icecrown/RaidIccActions.cpp +++ b/src/strategy/raids/icecrown/RaidIccActions.cpp @@ -669,13 +669,28 @@ bool IccFestergutSporeAction::Execute(Event event) Position targetPos; if (hasSpore) { - // If bot is tank, always go melee - if (botAI->IsTank(bot)) + bool mainTankHasSpore = false; + GuidVector members = AI_VALUE(GuidVector, "group members"); + for (auto& member : members) + { + Unit* unit = botAI->GetUnit(member); + if (!unit) + continue; + + if (botAI->IsMainTank(unit->ToPlayer()) && unit->HasAura(69279)) + { + mainTankHasSpore = true; + break; + } + } + + // If bot is main tank, always go melee regardless of GUID + if (botAI->IsMainTank(bot)) { targetPos = ICC_FESTERGUT_MELEE_SPORE; } - // If this bot has the lowest GUID among spored players, it goes melee - else if (bot->GetGUID() == lowestGuid) + // If this bot has the lowest GUID among spored players AND is not a tank AND main tank is not spored + else if (bot->GetGUID() == lowestGuid && !botAI->IsTank(bot) && !mainTankHasSpore) { targetPos = ICC_FESTERGUT_MELEE_SPORE; }