mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
ICC minor update (#950)
GS Bots will mark mage with skull rti Rotface Fixed bots glitching thru walls and floors (added check if position is valid before moving) PP Bots will mark volatile ooze with skull rti now which will help them focus it and kill asap (usefull for heroic when both volatile ooze and gas cloud are present at the same time) VDW Added default group position in the middle of the room so that bots don't spread out too much, which will force them to focus supressers more Fixed Boss healers not keeping themself alive when low on HP
This commit is contained in:
@@ -420,6 +420,10 @@ bool IccGunshipTeleportAllyAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Group* group = bot->GetGroup())
|
||||
if (group->GetTargetIcon(7) != boss->GetGUID())
|
||||
group->SetTargetIcon(7, bot->GetGUID(), boss->GetGUID());
|
||||
|
||||
bot->SetTarget(boss->GetGUID());
|
||||
// Check if the bot is targeting a valid boss before teleporting
|
||||
if (bot->GetTarget() != boss->GetGUID())
|
||||
@@ -448,6 +452,10 @@ bool IccGunshipTeleportHordeAction::Execute(Event event)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Group* group = bot->GetGroup())
|
||||
if (group->GetTargetIcon(7) != boss->GetGUID())
|
||||
group->SetTargetIcon(7, bot->GetGUID(), boss->GetGUID());
|
||||
|
||||
bot->SetTarget(boss->GetGUID());
|
||||
// Check if the bot is targeting a valid boss before teleporting
|
||||
if (bot->GetTarget() != boss->GetGUID())
|
||||
@@ -928,6 +936,10 @@ bool IccRotfaceGroupPositionAction::Execute(Event event)
|
||||
float moveX = boss->GetPositionX() + (moveDistance * cos(angle));
|
||||
float moveY = boss->GetPositionY() + (moveDistance * sin(angle));
|
||||
|
||||
// Check if position is in LoS before moving
|
||||
if (!bot->IsWithinLOS(moveX, moveY, boss->GetPositionZ()))
|
||||
return false;
|
||||
|
||||
return MoveTo(boss->GetMapId(), moveX, moveY, boss->GetPositionZ(),
|
||||
false, false, false, false, MovementPriority::MOVEMENT_COMBAT);
|
||||
}
|
||||
@@ -943,6 +955,12 @@ bool IccRotfaceGroupPositionAction::Execute(Event event)
|
||||
{
|
||||
if (bot->GetExactDist2d(ICC_ROTFACE_BIG_OOZE_POSITION) > 3.0f)
|
||||
{
|
||||
// Check if position is in LoS before moving
|
||||
if (!bot->IsWithinLOS(ICC_ROTFACE_BIG_OOZE_POSITION.GetPositionX(),
|
||||
ICC_ROTFACE_BIG_OOZE_POSITION.GetPositionY(),
|
||||
ICC_ROTFACE_BIG_OOZE_POSITION.GetPositionZ()))
|
||||
return false;
|
||||
|
||||
return MoveTo(bot->GetMapId(), ICC_ROTFACE_BIG_OOZE_POSITION.GetPositionX(),
|
||||
ICC_ROTFACE_BIG_OOZE_POSITION.GetPositionY(), ICC_ROTFACE_BIG_OOZE_POSITION.GetPositionZ(),
|
||||
false, false, false, true, MovementPriority::MOVEMENT_COMBAT);
|
||||
@@ -982,7 +1000,7 @@ bool IccRotfaceGroupPositionAction::Execute(Event event)
|
||||
float distToCenter = bot->GetExactDist2d(ICC_ROTFACE_TANK_POSITION);
|
||||
float moveDistance = (distToCenter > 25.0f) ? 2.0f : 3.0f;
|
||||
// return MoveAway(closestMember, moveDistance);
|
||||
return FleePosition(closestMember->GetPosition(), moveDistance);
|
||||
return FleePosition(closestMember->GetPosition(), moveDistance, 250U);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -1009,6 +1027,10 @@ bool IccRotfaceMoveAwayFromExplosionAction::Execute(Event event)
|
||||
float moveY = bot->GetPositionY() + 20.0f * sin(angle);
|
||||
float moveZ = bot->GetPositionZ();
|
||||
|
||||
// Check if position is in LoS before moving
|
||||
if (!bot->IsWithinLOS(moveX, moveY, moveZ))
|
||||
return false;
|
||||
|
||||
// Move to the position
|
||||
return MoveTo(bot->GetMapId(), moveX, moveY, moveZ,
|
||||
false, false, false, false, MovementPriority::MOVEMENT_FORCED);
|
||||
@@ -1146,6 +1168,25 @@ bool IccPutricideVolatileOozeAction::Execute(Event event)
|
||||
if (botHasAura2 || botHasAura3)
|
||||
return false;
|
||||
|
||||
// Mark Volatile Ooze with skull if not already marked
|
||||
if (Group* group = bot->GetGroup())
|
||||
{
|
||||
ObjectGuid skullGuid = group->GetTargetIcon(7); // 7 = skull
|
||||
Unit* markedUnit = botAI->GetUnit(skullGuid);
|
||||
|
||||
// Clear mark if current marked target is dead
|
||||
if (markedUnit && !markedUnit->IsAlive())
|
||||
{
|
||||
group->SetTargetIcon(7, bot->GetGUID(), ObjectGuid::Empty);
|
||||
}
|
||||
|
||||
// Mark new ooze if it exists and nothing is marked
|
||||
if (ooze && ooze->IsAlive() && (!skullGuid || !markedUnit))
|
||||
{
|
||||
group->SetTargetIcon(7, bot->GetGUID(), ooze->GetGUID());
|
||||
}
|
||||
}
|
||||
|
||||
// Check for aura on any group member
|
||||
Group* group = bot->GetGroup();
|
||||
if (!group)
|
||||
@@ -1261,8 +1302,9 @@ bool IccPutricideGasCloudAction::Execute(Event event)
|
||||
if (!gasCloud)
|
||||
return false;
|
||||
|
||||
bool botHasAura = botAI->HasAura("Gaseous Bloat", bot);
|
||||
Unit* volatileOoze = AI_VALUE2(Unit*, "find target", "volatile ooze");
|
||||
|
||||
bool botHasAura = botAI->HasAura("Gaseous Bloat", bot);
|
||||
|
||||
if(!botHasAura && volatileOoze)
|
||||
return false;
|
||||
@@ -2208,7 +2250,13 @@ bool IccSisterSvalnaAction::Execute(Event event)
|
||||
|
||||
bool IccValithriaPortalAction::Execute(Event event)
|
||||
{
|
||||
if (!botAI->IsHeal(bot) || bot->getClass() == CLASS_DRUID || bot->HasAura(70766))
|
||||
//Added movement for non healers, didnt want to make another action just for this
|
||||
if (!botAI->IsHeal(bot))
|
||||
return MoveTo(bot->GetMapId(), ICC_VDW_GROUP_POSITION.GetPositionX(), ICC_VDW_GROUP_POSITION.GetPositionY(), ICC_VDW_GROUP_POSITION.GetPositionZ(),
|
||||
false, false, false, true, MovementPriority::MOVEMENT_COMBAT);
|
||||
|
||||
//Portal action
|
||||
if (!botAI->IsHeal(bot) || bot->HasAura(70766))
|
||||
return false;
|
||||
|
||||
// Find the nearest portal
|
||||
@@ -2250,6 +2298,9 @@ bool IccValithriaHealAction::Execute(Event event)
|
||||
if (!botAI->IsHeal(bot))
|
||||
return false;
|
||||
|
||||
if (bot->GetHealthPct() < 50.0f)
|
||||
return false;
|
||||
|
||||
if (!bot->HasAura(70766)) //dream state
|
||||
{
|
||||
bot->SetSpeed(MOVE_RUN, 1.0f, true);
|
||||
@@ -2731,7 +2782,7 @@ bool IccSindragosaBlisteringColdAction::Execute(Event event)
|
||||
float moveY = bot->GetPositionY() + dirY * STEP_SIZE;
|
||||
|
||||
return MoveTo(bot->GetMapId(), moveX, moveY, bot->GetPositionZ(),
|
||||
false, false, false, false, MovementPriority::MOVEMENT_COMBAT);
|
||||
false, false, false, true, MovementPriority::MOVEMENT_FORCED, true, false);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -2886,14 +2937,14 @@ bool IccSindragosaFrostBombAction::Execute(Event event)
|
||||
if (bot->GetDistance2d(posX, posY) > 2.0f)
|
||||
{
|
||||
return MoveTo(bot->GetMapId(), posX, posY, posZ,
|
||||
false, false, false, false, MovementPriority::MOVEMENT_FORCED);
|
||||
false, false, false, true, MovementPriority::MOVEMENT_FORCED);
|
||||
}
|
||||
|
||||
// Check if we have LOS to marker from our position
|
||||
if (!marker->IsWithinLOS(bot->GetPositionX(), bot->GetPositionY(), bot->GetPositionZ()))
|
||||
return true; // Stay in position using tomb for LOS
|
||||
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool IccLichKingShadowTrapAction::Execute(Event event)
|
||||
|
||||
@@ -39,6 +39,7 @@ const Position ICC_BPC_OT_POSITION = Position(4649.2236f, 2796.0972f, 361.1815f)
|
||||
const Position ICC_BPC_MT_POSITION = Position(4648.5674f, 2744.847f, 361.18222f);
|
||||
const Position ICC_BQL_CENTER_POSITION = Position(4595.0f, 2769.0f, 400.0f);
|
||||
const Position ICC_BQL_TANK_POSITION = Position(4616.102f, 2768.9167f, 400.13797f);
|
||||
const Position ICC_VDW_GROUP_POSITION = Position(4204.839f, 2484.9338f, 364.87f);
|
||||
const Position ICC_SINDRAGOSA_TANK_POSITION = Position(4408.016f, 2508.0647f, 203.37955f);
|
||||
const Position ICC_SINDRAGOSA_RANGED_POSITION = Position(4373.7686f, 2498.0042f, 203.38176f);
|
||||
const Position ICC_SINDRAGOSA_MELEE_POSITION = Position(4389.22f, 2499.5237f, 203.38033f);
|
||||
|
||||
@@ -492,6 +492,11 @@ bool IccBpcKineticBombTrigger::IsActive()
|
||||
{
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
|
||||
Aura* aura = botAI->GetAura("Shadow Prison", bot, false, true);
|
||||
if (aura)
|
||||
if (aura->GetStackAmount() > 12)
|
||||
return false;
|
||||
|
||||
// Check for hunters first
|
||||
bool hasHunter = false;
|
||||
Group* group = bot->GetGroup();
|
||||
@@ -584,6 +589,15 @@ bool IccSisterSvalnaTrigger::IsActive()
|
||||
|
||||
bool IccValithriaPortalTrigger::IsActive()
|
||||
{
|
||||
|
||||
Unit* boss = bot->FindNearestCreature(36789, 100.0f);
|
||||
if (!boss)
|
||||
return false;
|
||||
|
||||
//for gruop position for non healers
|
||||
if(!botAI->IsHeal(bot) && (bot->GetDistance(ICC_VDW_GROUP_POSITION) > 35.0f))
|
||||
return true;
|
||||
|
||||
// Only healers should use portals
|
||||
if (!botAI->IsHeal(bot) || bot->HasAura(70766))
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user