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.
This commit is contained in:
Noscopezz
2025-01-26 21:04:48 +01:00
committed by GitHub
parent e571694a88
commit a8d8f37019

View File

@@ -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;
}