mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
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:
@@ -669,13 +669,28 @@ bool IccFestergutSporeAction::Execute(Event event)
|
|||||||
Position targetPos;
|
Position targetPos;
|
||||||
if (hasSpore)
|
if (hasSpore)
|
||||||
{
|
{
|
||||||
// If bot is tank, always go melee
|
bool mainTankHasSpore = false;
|
||||||
if (botAI->IsTank(bot))
|
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;
|
targetPos = ICC_FESTERGUT_MELEE_SPORE;
|
||||||
}
|
}
|
||||||
// If this bot has the lowest GUID among spored players, it goes melee
|
// 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)
|
else if (bot->GetGUID() == lowestGuid && !botAI->IsTank(bot) && !mainTankHasSpore)
|
||||||
{
|
{
|
||||||
targetPos = ICC_FESTERGUT_MELEE_SPORE;
|
targetPos = ICC_FESTERGUT_MELEE_SPORE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user