mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-29 00:13:47 +00:00
Codestyle fix (#1797)
Warning: Dont change this PR as draft to make it testable DONT REVIEW UNTIL Codestyle C++ workflow dont pass
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
#include "Playerbots.h"
|
||||
#include "RaidAq20Utils.h"
|
||||
|
||||
|
||||
bool Aq20UseCrystalAction::Execute(Event event)
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "ossirian the unscarred"))
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
#include "SharedDefines.h"
|
||||
#include "RaidAq20Utils.h"
|
||||
|
||||
|
||||
bool Aq20MoveToCrystalTrigger::IsActive()
|
||||
{
|
||||
if (Unit* boss = AI_VALUE2(Unit*, "find target", "ossirian the unscarred"))
|
||||
|
||||
@@ -6,57 +6,57 @@
|
||||
|
||||
namespace GruulsLairHelpers
|
||||
{
|
||||
enum GruulsLairSpells
|
||||
{
|
||||
// High King Maulgar
|
||||
SPELL_WHIRLWIND = 33238,
|
||||
enum GruulsLairSpells
|
||||
{
|
||||
// High King Maulgar
|
||||
SPELL_WHIRLWIND = 33238,
|
||||
|
||||
// Krosh Firehand
|
||||
SPELL_SPELL_SHIELD = 33054,
|
||||
// Krosh Firehand
|
||||
SPELL_SPELL_SHIELD = 33054,
|
||||
|
||||
// Hunter
|
||||
SPELL_MISDIRECTION = 34477,
|
||||
// Hunter
|
||||
SPELL_MISDIRECTION = 34477,
|
||||
|
||||
// Warlock
|
||||
SPELL_BANISH = 18647, // Rank 2
|
||||
// Warlock
|
||||
SPELL_BANISH = 18647, // Rank 2
|
||||
|
||||
// Gruul the Dragonkiller
|
||||
SPELL_GROUND_SLAM_1 = 33525,
|
||||
SPELL_GROUND_SLAM_2 = 39187,
|
||||
};
|
||||
// Gruul the Dragonkiller
|
||||
SPELL_GROUND_SLAM_1 = 33525,
|
||||
SPELL_GROUND_SLAM_2 = 39187,
|
||||
};
|
||||
|
||||
enum GruulsLairNPCs
|
||||
{
|
||||
NPC_WILD_FEL_STALKER = 18847,
|
||||
};
|
||||
enum GruulsLairNPCs
|
||||
{
|
||||
NPC_WILD_FEL_STALKER = 18847,
|
||||
};
|
||||
|
||||
bool IsAnyOgreBossAlive(PlayerbotAI* botAI);
|
||||
void MarkTargetWithIcon(Player* bot, Unit* target, uint8 iconId);
|
||||
void MarkTargetWithSquare(Player* bot, Unit* target);
|
||||
void MarkTargetWithStar(Player* bot, Unit* target);
|
||||
void MarkTargetWithCircle(Player* bot, Unit* target);
|
||||
void MarkTargetWithDiamond(Player* bot, Unit* target);
|
||||
void MarkTargetWithTriangle(Player* bot, Unit* target);
|
||||
void SetRtiTarget(PlayerbotAI* botAI, const std::string& rtiName, Unit* target);
|
||||
bool IsKroshMageTank(PlayerbotAI* botAI, Player* bot);
|
||||
bool IsKigglerMoonkinTank(PlayerbotAI* botAI, Player* bot);
|
||||
bool IsPositionSafe(PlayerbotAI* botAI, Player* bot, Position pos);
|
||||
bool TryGetNewSafePosition(PlayerbotAI* botAI, Player* bot, Position& outPos);
|
||||
bool IsAnyOgreBossAlive(PlayerbotAI* botAI);
|
||||
void MarkTargetWithIcon(Player* bot, Unit* target, uint8 iconId);
|
||||
void MarkTargetWithSquare(Player* bot, Unit* target);
|
||||
void MarkTargetWithStar(Player* bot, Unit* target);
|
||||
void MarkTargetWithCircle(Player* bot, Unit* target);
|
||||
void MarkTargetWithDiamond(Player* bot, Unit* target);
|
||||
void MarkTargetWithTriangle(Player* bot, Unit* target);
|
||||
void SetRtiTarget(PlayerbotAI* botAI, const std::string& rtiName, Unit* target);
|
||||
bool IsKroshMageTank(PlayerbotAI* botAI, Player* bot);
|
||||
bool IsKigglerMoonkinTank(PlayerbotAI* botAI, Player* bot);
|
||||
bool IsPositionSafe(PlayerbotAI* botAI, Player* bot, Position pos);
|
||||
bool TryGetNewSafePosition(PlayerbotAI* botAI, Player* bot, Position& outPos);
|
||||
|
||||
struct Location
|
||||
{
|
||||
float x, y, z;
|
||||
};
|
||||
struct Location
|
||||
{
|
||||
float x, y, z;
|
||||
};
|
||||
|
||||
namespace GruulsLairLocations
|
||||
{
|
||||
extern const Location MaulgarTankPosition;
|
||||
extern const Location OlmTankPosition;
|
||||
extern const Location BlindeyeTankPosition;
|
||||
extern const Location KroshTankPosition;
|
||||
extern const Location MaulgarRoomCenter;
|
||||
extern const Location GruulTankPosition;
|
||||
}
|
||||
namespace GruulsLairLocations
|
||||
{
|
||||
extern const Location MaulgarTankPosition;
|
||||
extern const Location OlmTankPosition;
|
||||
extern const Location BlindeyeTankPosition;
|
||||
extern const Location KroshTankPosition;
|
||||
extern const Location MaulgarRoomCenter;
|
||||
extern const Location GruulTankPosition;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -116,7 +116,7 @@ bool IccSpikeAction::HandleSpikeTargeting(Unit* boss)
|
||||
// First check for alive spikes
|
||||
for (const auto entry : spikeEntries)
|
||||
{
|
||||
for (const auto& guid : spikes)
|
||||
for (auto const& guid : spikes)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
@@ -238,7 +238,7 @@ bool IccRangedPositionLadyDeathwhisperAction::MaintainRangedSpacing()
|
||||
float totalY = 0.0f;
|
||||
int nearbyCount = 0;
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -340,7 +340,7 @@ bool IccAddsLadyDeathwhisperAction::Execute(Event event)
|
||||
bool IccAddsLadyDeathwhisperAction::IsTargetedByShade(uint32 shadeEntry)
|
||||
{
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npcGuid);
|
||||
if (unit && unit->GetEntry() == shadeEntry && unit->GetVictim() == bot)
|
||||
@@ -376,9 +376,9 @@ bool IccAddsLadyDeathwhisperAction::HandleAddTargeting(Unit* boss)
|
||||
bool hasValidAdds = false;
|
||||
|
||||
// First check for alive adds
|
||||
for (const auto& entry : addEntriesLady)
|
||||
for (auto const& entry : addEntriesLady)
|
||||
{
|
||||
for (const auto& guid : targets)
|
||||
for (auto const& guid : targets)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(guid);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == entry)
|
||||
@@ -427,7 +427,7 @@ bool IccShadeLadyDeathwhisperAction::Execute(Event event)
|
||||
// Get the nearest hostile NPCs
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* shade = botAI->GetUnit(npcGuid);
|
||||
|
||||
@@ -506,7 +506,7 @@ bool IccRottingFrostGiantTankPositionAction::Execute(Event event)
|
||||
std::map<ObjectGuid, int> targetCounts;
|
||||
|
||||
// First, identify all infected bots and their current targets (approximate)
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -520,7 +520,7 @@ bool IccRottingFrostGiantTankPositionAction::Execute(Event event)
|
||||
float minDist = 5.0f; // Only count if they're close enough to likely be targeting
|
||||
Unit* likelyTarget = nullptr;
|
||||
|
||||
for (const auto& targetGuid : members)
|
||||
for (auto const& targetGuid : members)
|
||||
{
|
||||
Unit* potentialTarget = botAI->GetUnit(targetGuid);
|
||||
if (!potentialTarget || !potentialTarget->IsAlive() || potentialTarget == member)
|
||||
@@ -551,7 +551,7 @@ bool IccRottingFrostGiantTankPositionAction::Execute(Event event)
|
||||
std::vector<std::pair<Unit*, float>> viableTargets;
|
||||
|
||||
// First try to find ranged, non-infected, non-cured bots
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -630,7 +630,7 @@ bool IccRottingFrostGiantTankPositionAction::Execute(Event event)
|
||||
float totalY = 0.0f;
|
||||
int nearbyCount = 0;
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -726,7 +726,7 @@ Unit* IccCannonFireAction::FindValidCannonTarget()
|
||||
{
|
||||
const GuidVector attackers = AI_VALUE(GuidVector, "possible targets no los");
|
||||
|
||||
for (const auto& attackerGuid : attackers)
|
||||
for (auto const& attackerGuid : attackers)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(attackerGuid);
|
||||
if (!unit)
|
||||
@@ -774,7 +774,7 @@ Unit* IccGunshipEnterCannonAction::FindBestAvailableCannon()
|
||||
Unit* bestVehicle = nullptr;
|
||||
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest vehicles");
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* vehicleBase = botAI->GetUnit(npcGuid);
|
||||
if (!IsValidCannon(vehicleBase, validCannonEntries))
|
||||
@@ -1006,8 +1006,6 @@ bool IccDbsTankPositionAction::Execute(Event event)
|
||||
ICC_DBS_TANK_POSITION.GetPositionZ(), false, false, false, true,
|
||||
MovementPriority::MOVEMENT_NORMAL);
|
||||
|
||||
|
||||
|
||||
// Early return if this tank has Rune of Blood
|
||||
if (botAI->GetAura("Rune of Blood", bot))
|
||||
return true;
|
||||
@@ -1041,7 +1039,7 @@ bool IccDbsTankPositionAction::CrowdControlBloodBeasts()
|
||||
|
||||
bool appliedCC = false;
|
||||
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || !unit->IsAlive())
|
||||
@@ -1143,7 +1141,7 @@ bool IccDbsTankPositionAction::EvadeBloodBeasts()
|
||||
// Get the nearest hostile NPCs
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit)
|
||||
@@ -1326,7 +1324,7 @@ bool IccFestergutGroupPositionAction::HasSporesInGroup()
|
||||
{
|
||||
const GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(memberGuid);
|
||||
if (unit && unit->HasAura(SPELL_GAS_SPORE))
|
||||
@@ -1564,7 +1562,7 @@ IccFestergutSporeAction::SporeInfo IccFestergutSporeAction::FindSporedPlayers()
|
||||
SporeInfo info;
|
||||
const GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(memberGuid);
|
||||
if (!unit)
|
||||
@@ -1612,7 +1610,7 @@ bool IccFestergutSporeAction::CheckMainTankSpore()
|
||||
{
|
||||
const GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(memberGuid);
|
||||
if (!unit)
|
||||
@@ -1702,14 +1700,13 @@ bool IccRotfaceTankPositionAction::HandleAssistTankPositioning(Unit* boss)
|
||||
return HandleBigOozePositioning(boss);
|
||||
}
|
||||
|
||||
|
||||
bool IccRotfaceTankPositionAction::HandleBigOozePositioning(Unit* boss)
|
||||
{
|
||||
// Find all big oozes
|
||||
GuidVector bigOozes = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
std::vector<Unit*> activeBigOozes;
|
||||
|
||||
for (const auto& guid : bigOozes)
|
||||
for (auto const& guid : bigOozes)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(guid);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == NPC_BIG_OOZE && unit->IsVisible())
|
||||
@@ -1799,7 +1796,7 @@ bool IccRotfaceTankPositionAction::HandleBigOozePositioning(Unit* boss)
|
||||
GuidVector puddles = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
bool isSafeFromPuddles = true;
|
||||
|
||||
for (const auto& puddleGuid : puddles)
|
||||
for (auto const& puddleGuid : puddles)
|
||||
{
|
||||
Unit* puddle = botAI->GetUnit(puddleGuid);
|
||||
if (puddle && botAI->GetAura("Ooze Flood", puddle))
|
||||
@@ -1827,7 +1824,6 @@ bool IccRotfaceTankPositionAction::HandleBigOozePositioning(Unit* boss)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool IccRotfaceGroupPositionAction::Execute(Event event)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "rotface");
|
||||
@@ -1837,7 +1833,7 @@ bool IccRotfaceGroupPositionAction::Execute(Event event)
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
bool floodPresent = false;
|
||||
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || !botAI->HasAura("Ooze Flood", unit))
|
||||
@@ -1876,7 +1872,7 @@ bool IccRotfaceGroupPositionAction::HandlePuddleAvoidance(Unit* boss)
|
||||
{
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || !botAI->HasAura("Ooze Flood", unit))
|
||||
@@ -2062,7 +2058,7 @@ bool IccRotfaceGroupPositionAction::FindAndMoveFromClosestMember(Unit* boss, Uni
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
Unit* puddle = nullptr;
|
||||
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || !botAI->HasAura("Ooze Flood", unit))
|
||||
@@ -2087,11 +2083,11 @@ bool IccRotfaceGroupPositionAction::FindAndMoveFromClosestMember(Unit* boss, Uni
|
||||
float totalY = 0.0f;
|
||||
int nearbyCount = 0;
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot || (smallOoze && smallOoze->GetVictim() == member) ||
|
||||
(member->GetTypeId() == TYPEID_PLAYER && botAI->IsAssistTank(static_cast<Player*>(member))))
|
||||
(member->IsPlayer() && botAI->IsAssistTank(static_cast<Player*>(member))))
|
||||
continue;
|
||||
|
||||
const float distance = bot->GetExactDist2d(member);
|
||||
@@ -2202,7 +2198,7 @@ bool IccRotfaceMoveAwayFromExplosionAction::MoveToRandomSafeLocation()
|
||||
|
||||
// Ensure the position is at least 30 yards away from any puddle
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* puddle = botAI->GetUnit(npc);
|
||||
if (!puddle || !botAI->HasAura("Ooze Flood", puddle))
|
||||
@@ -2287,7 +2283,7 @@ Unit* IccPutricideGrowingOozePuddleAction::FindClosestThreateningPuddle()
|
||||
float closestDistance = FLT_MAX;
|
||||
float closestSafeDistance = BASE_RADIUS;
|
||||
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || unit->GetEntry() != NPC_GROWING_OOZE_PUDDLE)
|
||||
@@ -2402,7 +2398,7 @@ bool IccPutricideGrowingOozePuddleAction::IsPositionTooCloseToOtherPuddles(float
|
||||
static const float STACK_MULTIPLIER = 0.6f;
|
||||
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || unit == ignorePuddle || unit->GetEntry() != NPC_GROWING_OOZE_PUDDLE)
|
||||
@@ -2445,7 +2441,7 @@ bool IccPutricideVolatileOozeAction::Execute(Event event)
|
||||
// Find all alive oozes
|
||||
std::vector<Unit*> aliveOozes;
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& guid : npcs)
|
||||
for (auto const& guid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(guid);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == ooze->GetEntry())
|
||||
@@ -2533,7 +2529,6 @@ Unit* IccPutricideVolatileOozeAction::FindAuraTarget()
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
bool IccPutricideGasCloudAction::Execute(Event event)
|
||||
{
|
||||
Unit* gasCloud = AI_VALUE2(Unit*, "find target", "gas cloud");
|
||||
@@ -2560,7 +2555,7 @@ bool IccPutricideGasCloudAction::Execute(Event event)
|
||||
// Find all alive gasCloud
|
||||
std::vector<Unit*> aliveGasCloud;
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& guid : npcs)
|
||||
for (auto const& guid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(guid);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == gasCloud->GetEntry())
|
||||
@@ -2613,7 +2608,7 @@ bool IccPutricideGasCloudAction::HandleGaseousBloatMovement(Unit* gasCloud)
|
||||
// Gather all choking gas bombs
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
std::vector<Unit*> gasBombs;
|
||||
for (const auto& guid : npcs)
|
||||
for (auto const& guid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(guid);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == NPC_CHOKING_GAS_BOMB)
|
||||
@@ -3048,7 +3043,6 @@ bool IccPutricideAvoidMalleableGooAction::HandleUnboundPlague(Unit* boss)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool IccPutricideAvoidMalleableGooAction::HandleBossPositioning(Unit* boss)
|
||||
{
|
||||
if (botAI->IsTank(bot))
|
||||
@@ -3128,7 +3122,7 @@ Position IccPutricideAvoidMalleableGooAction::CalculateBossPosition(Unit* boss,
|
||||
bool IccPutricideAvoidMalleableGooAction::HasObstacleBetween(const Position& from, const Position& to)
|
||||
{
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npc);
|
||||
if (!unit || !unit->IsAlive())
|
||||
@@ -3261,7 +3255,7 @@ bool IccBpcKelesethTankAction::Execute(Event event)
|
||||
if (boss->GetVictim() == bot)
|
||||
{
|
||||
GuidVector targets = AI_VALUE(GuidVector, "possible targets");
|
||||
for (const auto& targetGuid : targets)
|
||||
for (auto const& targetGuid : targets)
|
||||
{
|
||||
Unit* nucleus = botAI->GetUnit(targetGuid);
|
||||
if (nucleus && nucleus->IsAlive() && nucleus->GetEntry() == NPC_DARK_NUCLEUS)
|
||||
@@ -3392,7 +3386,7 @@ void IccBpcMainTankAction::MarkEmpoweredPrince()
|
||||
Unit* empoweredPrince = nullptr;
|
||||
const GuidVector& targets = AI_VALUE(GuidVector, "possible targets");
|
||||
|
||||
for (const auto& targetGuid : targets)
|
||||
for (auto const& targetGuid : targets)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(targetGuid);
|
||||
if (!unit || !unit->IsAlive())
|
||||
@@ -3478,7 +3472,7 @@ bool IccBpcEmpoweredVortexAction::MaintainRangedSpacing()
|
||||
float totalY = 0.0f;
|
||||
int nearbyCount = 0;
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -3557,7 +3551,7 @@ bool IccBpcEmpoweredVortexAction::HandleEmpoweredVortexSpread()
|
||||
float totalY = 0.0f;
|
||||
int nearbyCount = 0;
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -3676,7 +3670,7 @@ Unit* IccBpcKineticBombAction::FindOptimalKineticBomb()
|
||||
|
||||
// Gather all valid kinetic bombs
|
||||
std::vector<Unit*> kineticBombs;
|
||||
for (const auto& guid : targets)
|
||||
for (auto const& guid : targets)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(guid);
|
||||
if (!unit || !unit->IsAlive())
|
||||
@@ -3764,7 +3758,6 @@ bool IccBpcKineticBombAction::IsBombAlreadyHandled(Unit* bomb, Group* group)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool IccBpcBallOfFlameAction::Execute(Event event)
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "prince taldaram");
|
||||
@@ -3814,7 +3807,7 @@ bool IccBpcBallOfFlameAction::Execute(Event event)
|
||||
{
|
||||
const float SAFE_DIST = 15.0f;
|
||||
GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || member == bot)
|
||||
@@ -4341,7 +4334,7 @@ bool IccBqlGroupPositionAction::HandleGroupPosition(Unit* boss, Aura* frenzyAura
|
||||
// Gather all ranged and healers, sort by GUID for deterministic assignment
|
||||
std::vector<Player*> rangedBots;
|
||||
std::vector<Player*> healers;
|
||||
for (const auto& guid : members)
|
||||
for (auto const& guid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(guid);
|
||||
if (!member || !member->IsAlive())
|
||||
@@ -4457,7 +4450,7 @@ bool IccBqlGroupPositionAction::HandleGroupPosition(Unit* boss, Aura* frenzyAura
|
||||
}
|
||||
// Also spread from swarming shadows
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npcGuid);
|
||||
if (unit && unit->IsAlive() && unit->GetEntry() == NPC_SWARMING_SHADOWS)
|
||||
@@ -4605,7 +4598,6 @@ bool IccBqlGroupPositionAction::HandleGroupPosition(Unit* boss, Aura* frenzyAura
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -4798,7 +4790,7 @@ Player* IccBqlVampiricBiteAction::FindBestBiteTarget(Group* group)
|
||||
}
|
||||
|
||||
// Sort by distance
|
||||
auto sortByDistance = [](const auto& a, const auto& b) { return a.second < b.second; };
|
||||
auto sortByDistance = [](auto const& a, auto const& b) { return a.second < b.second; };
|
||||
std::sort(dpsTargets.begin(), dpsTargets.end(), sortByDistance);
|
||||
std::sort(healTargets.begin(), healTargets.end(), sortByDistance);
|
||||
|
||||
@@ -4955,7 +4947,7 @@ bool IccValithriaGroupAction::Execute(Event event)
|
||||
// Tank behavior
|
||||
if (botAI->IsTank(bot))
|
||||
{
|
||||
for (const auto& targetGuid : AI_VALUE(GuidVector, "possible targets"))
|
||||
for (auto const& targetGuid : AI_VALUE(GuidVector, "possible targets"))
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(targetGuid))
|
||||
{
|
||||
@@ -4965,7 +4957,7 @@ bool IccValithriaGroupAction::Execute(Event event)
|
||||
// Skip if unit is already attacking any tank
|
||||
if (Unit* victim = unit->GetVictim())
|
||||
{
|
||||
if (victim->GetTypeId() == TYPEID_PLAYER && botAI->IsTank(static_cast<Player*>(victim)))
|
||||
if (victim->IsPlayer() && botAI->IsTank(static_cast<Player*>(victim)))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -5133,7 +5125,7 @@ bool IccValithriaGroupAction::Handle25ManGroupLogic()
|
||||
}
|
||||
|
||||
// Sort by GUID for consistent ordering
|
||||
std::sort(nonHeals.begin(), nonHeals.end(), [](const auto& a, const auto& b) { return a.first < b.first; });
|
||||
std::sort(nonHeals.begin(), nonHeals.end(), [](auto const& a, auto const& b) { return a.first < b.first; });
|
||||
|
||||
// Assign to groups
|
||||
std::vector<Player*> group1, group2;
|
||||
@@ -5168,7 +5160,6 @@ bool IccValithriaGroupAction::Handle25ManGroupLogic()
|
||||
if (botAI->IsTank(bot) || botAI->IsDps(bot))
|
||||
HandleMarkingLogic(inGroup1, inGroup2, group1Pos, group2Pos);
|
||||
|
||||
|
||||
// Movement logic for non-healers
|
||||
if (!botAI->IsHeal(bot))
|
||||
{
|
||||
@@ -5230,7 +5221,7 @@ bool IccValithriaGroupAction::HandleMarkingLogic(bool inGroup1, bool inGroup2, c
|
||||
|
||||
for (uint32 entry : addPriority)
|
||||
{
|
||||
for (const auto& guid : adds)
|
||||
for (auto const& guid : adds)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
@@ -5291,7 +5282,7 @@ bool IccValithriaGroupAction::Handle10ManGroupLogic()
|
||||
|
||||
for (uint32 entry : addPriority)
|
||||
{
|
||||
for (const auto& guid : adds)
|
||||
for (auto const& guid : adds)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
@@ -5337,7 +5328,7 @@ bool IccValithriaPortalAction::Execute(Event event)
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest npcs");
|
||||
std::vector<Creature*> preEffectPortals;
|
||||
std::vector<Creature*> realPortals;
|
||||
for (const auto& guid : npcs)
|
||||
for (auto const& guid : npcs)
|
||||
{
|
||||
Creature* c = dynamic_cast<Creature*>(botAI->GetUnit(guid));
|
||||
if (!c)
|
||||
@@ -5564,7 +5555,7 @@ bool IccValithriaDreamCloudAction::Execute(Event event)
|
||||
// Gather all group members with dream state
|
||||
const GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
std::vector<Unit*> dreamBots;
|
||||
for (const auto& guid : members)
|
||||
for (auto const& guid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(guid);
|
||||
if (member && member->IsAlive() && member->HasAura(SPELL_DREAM_STATE))
|
||||
@@ -5615,7 +5606,6 @@ bool IccValithriaDreamCloudAction::Execute(Event event)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All stacked: leader (lowest guid) moves to next cloud, others follow and stack at leader's new position
|
||||
// Find all dream and nightmare clouds
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
@@ -5997,7 +5987,7 @@ bool IccSindragosaGroupPositionAction::HandleNonTankPositioning()
|
||||
|
||||
for (const auto entry : tombEntries)
|
||||
{
|
||||
for (const auto& guid : tombGuids)
|
||||
for (auto const& guid : tombGuids)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
@@ -6160,7 +6150,7 @@ void IccSindragosaFrostBeaconAction::HandleSupportActions()
|
||||
if (botAI->IsHeal(bot) && !bot->HasAura(FROST_BEACON_AURA_ID))
|
||||
{
|
||||
const auto members = AI_VALUE(GuidVector, "group members");
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
if (!member || !member->IsAlive() || !member->HasAura(FROST_BEACON_AURA_ID))
|
||||
@@ -6266,7 +6256,7 @@ bool IccSindragosaFrostBeaconAction::HandleNonBeaconedPlayer(const Unit* boss)
|
||||
// Collect beaconed players
|
||||
std::vector<Unit*> beaconedPlayers;
|
||||
const auto members = AI_VALUE(GuidVector, "group members");
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* player = botAI->GetUnit(memberGuid);
|
||||
if (player && player->GetGUID() != bot->GetGUID() && player->HasAura(FROST_BEACON_AURA_ID))
|
||||
@@ -6474,7 +6464,7 @@ bool IccSindragosaMysticBuffetAction::Execute(Event event)
|
||||
|
||||
for (const auto entry : tombEntries)
|
||||
{
|
||||
for (const auto& guid : tombGuids)
|
||||
for (auto const& guid : tombGuids)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
@@ -6518,7 +6508,6 @@ bool IccSindragosaMysticBuffetAction::Execute(Event event)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
botAI->Reset();
|
||||
// Move to LOS2 position
|
||||
return MoveTo(bot->GetMapId(), ICC_SINDRAGOSA_LOS2_POSITION.GetPositionX(),
|
||||
@@ -8062,7 +8051,7 @@ bool IccLichKingAddsAction::HandleSpiritBombAvoidance(Difficulty diff, Unit* ter
|
||||
float minDistAtPos = std::numeric_limits<float>::max();
|
||||
int bombCountInVicinity = 0;
|
||||
|
||||
for (const auto& bombPair : spiritBombs)
|
||||
for (auto const& bombPair : spiritBombs)
|
||||
{
|
||||
Unit* bomb = bombPair.second;
|
||||
if (!bomb || !bomb->IsAlive())
|
||||
@@ -8166,7 +8155,7 @@ void IccLichKingAddsAction::HandleSpiritMarkingAndTargeting(Difficulty diff, Uni
|
||||
if (currentMarkedTarget && currentMarkedTarget->IsAlive())
|
||||
{
|
||||
Unit* spiritTarget = currentMarkedTarget->GetVictim();
|
||||
if (spiritTarget && spiritTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
if (spiritTarget && spiritTarget->IsPlayer())
|
||||
{
|
||||
if (Group* spiritTargetGroup = spiritTarget->ToPlayer()->GetGroup())
|
||||
{
|
||||
@@ -8206,7 +8195,7 @@ void IccLichKingAddsAction::HandleSpiritMarkingAndTargeting(Difficulty diff, Uni
|
||||
// Check if this spirit is targeting a group member
|
||||
bool targetingGroupMember = false;
|
||||
Unit* spiritTarget = unit->GetVictim();
|
||||
if (spiritTarget && spiritTarget->GetTypeId() == TYPEID_PLAYER)
|
||||
if (spiritTarget && spiritTarget->IsPlayer())
|
||||
{
|
||||
if (Group* spiritTargetGroup = spiritTarget->ToPlayer()->GetGroup())
|
||||
{
|
||||
@@ -9347,4 +9336,3 @@ void IccLichKingAddsAction::HandleVileSpiritMechanics()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -311,8 +311,6 @@ public:
|
||||
Unit* FindClosestThreateningPuddle();
|
||||
Position CalculateSafeMovePosition(Unit* closestPuddle);
|
||||
bool IsPositionTooCloseToOtherPuddles(float x, float y, Unit* ignorePuddle);
|
||||
|
||||
|
||||
};
|
||||
|
||||
class IccPutricideVolatileOozeAction : public AttackAction
|
||||
@@ -599,7 +597,6 @@ class IccSindragosaTankSwapPositionAction : public AttackAction
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
|
||||
//LK
|
||||
class IccLichKingShadowTrapAction : public MovementAction
|
||||
{
|
||||
@@ -633,7 +630,6 @@ class IccLichKingWinterAction : public AttackAction
|
||||
void HandleMainTankAddManagement(Unit* boss, const Position* tankPos);
|
||||
void HandleAssistTankAddManagement(Unit* boss, const Position* tankPos);
|
||||
|
||||
|
||||
private:
|
||||
const Position* GetMainTankPosition();
|
||||
const Position* GetMainTankRangedPosition();
|
||||
@@ -670,6 +666,4 @@ class IccLichKingAddsAction : public AttackAction
|
||||
void HandleVileSpiritMechanics();
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -51,7 +51,7 @@ float IccLadyDeathwhisperMultiplier::GetValue(Action* action)
|
||||
if (dynamic_cast<IccShadeLadyDeathwhisperAction*>(action))
|
||||
return 1.0f;
|
||||
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* shade = botAI->GetUnit(npcGuid);
|
||||
|
||||
@@ -156,7 +156,6 @@ float IccFestergutMultiplier::GetValue(Action* action)
|
||||
if (bot->HasAura(SPELL_GAS_SPORE))
|
||||
return 0.0f;
|
||||
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
@@ -375,7 +374,7 @@ float IccBpcAssistMultiplier::GetValue(Action* action)
|
||||
|
||||
for (const auto entry : bombEntries)
|
||||
{
|
||||
for (const auto& guid : bombs)
|
||||
for (auto const& guid : bombs)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
@@ -491,7 +490,6 @@ float IccValithriaDreamCloudMultiplier::GetValue(Action* action)
|
||||
Aura* twistedNightmares = botAI->GetAura("Twisted Nightmares", bot);
|
||||
Aura* emeraldVigor = botAI->GetAura("Emerald Vigor", bot);
|
||||
|
||||
|
||||
if (!boss && !bot->HasAura(SPELL_DREAM_STATE))
|
||||
return 1.0f;
|
||||
|
||||
|
||||
@@ -99,5 +99,4 @@ public:
|
||||
virtual float GetValue(Action* action);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
@@ -115,7 +115,6 @@ void RaidIccStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
||||
triggers.push_back(new TriggerNode("icc sister svalna",
|
||||
NextAction::array(0, new NextAction("icc sister svalna", ACTION_RAID + 5), nullptr)));
|
||||
|
||||
|
||||
//VDW
|
||||
triggers.push_back(new TriggerNode("icc valithria group",
|
||||
NextAction::array(0, new NextAction("icc valithria group", ACTION_RAID + 1), nullptr)));
|
||||
|
||||
@@ -299,7 +299,7 @@ bool IccPutricideGrowingOozePuddleTrigger::IsActive()
|
||||
}
|
||||
|
||||
const GuidVector& npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (const auto& npc : npcs)
|
||||
for (auto const& npc : npcs)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(npc))
|
||||
{
|
||||
@@ -477,7 +477,7 @@ bool IccBpcKineticBombTrigger::IsActive()
|
||||
|
||||
for (const auto entry : bombEntries)
|
||||
{
|
||||
for (const auto& guid : bombs)
|
||||
for (auto const& guid : bombs)
|
||||
{
|
||||
if (Unit* unit = botAI->GetUnit(guid))
|
||||
{
|
||||
|
||||
@@ -336,7 +336,6 @@ public:
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
|
||||
class IccRotfaceMoveAwayFromExplosionTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
@@ -359,7 +358,6 @@ public:
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
|
||||
class IccPutricideGrowingOozePuddleTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
@@ -454,7 +452,6 @@ public:
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
|
||||
// Valithria Dreamwalker
|
||||
|
||||
class IccValithriaGroupTrigger : public Trigger
|
||||
@@ -485,7 +482,6 @@ public:
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
|
||||
//SINDRAGOSA
|
||||
class IccSindragosaGroupPositionTrigger : public Trigger
|
||||
{
|
||||
@@ -550,7 +546,6 @@ public:
|
||||
bool IsActive() override;
|
||||
};
|
||||
|
||||
|
||||
//LICH KING
|
||||
class IccLichKingShadowTrapTrigger : public Trigger
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "Playerbots.h"
|
||||
#include "Position.h"
|
||||
|
||||
namespace
|
||||
namespace
|
||||
{
|
||||
// Big Bad Wolf
|
||||
static int currentIndex = 0;
|
||||
@@ -131,7 +131,7 @@ bool KarazhanMaidenOfVirtuePositionRangedAction::Execute(Event event)
|
||||
|
||||
const GuidVector members = AI_VALUE(GuidVector, "group members");
|
||||
|
||||
for (const auto& memberGuid : members)
|
||||
for (auto const& memberGuid : members)
|
||||
{
|
||||
Unit* member = botAI->GetUnit(memberGuid);
|
||||
|
||||
@@ -205,7 +205,7 @@ bool KarazhanBigBadWolfPositionBossAction::isUseful()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "the big bad wolf");
|
||||
|
||||
return boss && botAI->IsTank(bot) && botAI->HasAggro(boss) && boss->GetVictim() == bot &&
|
||||
return boss && botAI->IsTank(bot) && botAI->HasAggro(boss) && boss->GetVictim() == bot &&
|
||||
!bot->HasAura(SPELL_LITTLE_RED_RIDING_HOOD);
|
||||
}
|
||||
|
||||
@@ -369,16 +369,16 @@ bool KarazhanTerestianIllhoofMarkTargetAction::Execute(Event event)
|
||||
|
||||
RaidKarazhanHelpers karazhanHelper(botAI);
|
||||
Unit* target = karazhanHelper.GetFirstAliveUnitByEntry(NPC_DEMON_CHAINS);
|
||||
if (!target || !target->IsAlive())
|
||||
if (!target || !target->IsAlive())
|
||||
{
|
||||
target = karazhanHelper.GetFirstAliveUnitByEntry(NPC_KILREK);
|
||||
if (!target || !target->IsAlive())
|
||||
if (!target || !target->IsAlive())
|
||||
{
|
||||
target = boss;
|
||||
}
|
||||
}
|
||||
karazhanHelper.MarkTargetWithSkull(target);
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ bool KarazhanShadeOfAranFlameWreathStopMovementAction::Execute(Event event)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -430,7 +430,7 @@ bool KarazhanShadeOfAranMarkConjuredElementalAction::Execute(Event event)
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "shade of aran");
|
||||
Unit* target = karazhanHelper.GetFirstAliveUnitByEntry(NPC_CONJURED_ELEMENTAL);
|
||||
|
||||
if (!boss || !boss->IsAlive() ||
|
||||
if (!boss || !boss->IsAlive() ||
|
||||
!target || !target->IsAlive() || target->HasAura(SPELL_WARLOCK_BANISH))
|
||||
{
|
||||
return false;
|
||||
@@ -522,12 +522,12 @@ bool KarazhanNetherspiteBlockRedBeamAction::Execute(Event event)
|
||||
lastBeamMoveSideways[botGuid] = !lastBeamMoveSideways[botGuid];
|
||||
beamMoveTimes[botGuid] = time(nullptr);
|
||||
}
|
||||
if (!lastBeamMoveSideways[botGuid])
|
||||
if (!lastBeamMoveSideways[botGuid])
|
||||
{
|
||||
return MoveTo(bot->GetMapId(), beamPos.GetPositionX(), beamPos.GetPositionY(), beamPos.GetPositionZ(),
|
||||
return MoveTo(bot->GetMapId(), beamPos.GetPositionX(), beamPos.GetPositionY(), beamPos.GetPositionZ(),
|
||||
false, false, false, true, MovementPriority::MOVEMENT_FORCED);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
float bx = boss->GetPositionX();
|
||||
float by = boss->GetPositionY();
|
||||
@@ -549,7 +549,7 @@ bool KarazhanNetherspiteBlockRedBeamAction::Execute(Event event)
|
||||
float sideY = beamPos.GetPositionY() + perpDy * 3.0f;
|
||||
float sideZ = beamPos.GetPositionZ();
|
||||
|
||||
return MoveTo(bot->GetMapId(), sideX, sideY, sideZ, false, false, false, true,
|
||||
return MoveTo(bot->GetMapId(), sideX, sideY, sideZ, false, false, false, true,
|
||||
MovementPriority::MOVEMENT_FORCED);
|
||||
}
|
||||
}
|
||||
@@ -602,7 +602,7 @@ bool KarazhanNetherspiteBlockBlueBeamAction::Execute(Event event)
|
||||
"netherspite_beam_leaving_blue", "%player is leaving the blue beam--next blocker up!", ph);
|
||||
bot->Yell(text, LANG_UNIVERSAL);
|
||||
wasBlockingBlueBeam[botGuid] = false;
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -637,17 +637,17 @@ bool KarazhanNetherspiteBlockBlueBeamAction::Execute(Event event)
|
||||
float bestDist = 150.0f;
|
||||
Position bestPos;
|
||||
bool found = false;
|
||||
for (float dist = 18.0f; dist <= 30.0f; dist += 0.5f)
|
||||
for (float dist = 18.0f; dist <= 30.0f; dist += 0.5f)
|
||||
{
|
||||
float candidateX = bx + dx * dist;
|
||||
float candidateY = by + dy * dist;
|
||||
float candidateZ = bz;
|
||||
bool outsideAllVoidZones = true;
|
||||
for (Unit* voidZone : voidZones)
|
||||
for (Unit* voidZone : voidZones)
|
||||
{
|
||||
float voidZoneDist = sqrt(pow(candidateX - voidZone->GetPositionX(), 2) +
|
||||
float voidZoneDist = sqrt(pow(candidateX - voidZone->GetPositionX(), 2) +
|
||||
pow(candidateY - voidZone->GetPositionY(), 2));
|
||||
if (voidZoneDist < 4.0f)
|
||||
if (voidZoneDist < 4.0f)
|
||||
{
|
||||
outsideAllVoidZones = false;
|
||||
break;
|
||||
@@ -658,14 +658,14 @@ bool KarazhanNetherspiteBlockBlueBeamAction::Execute(Event event)
|
||||
continue;
|
||||
}
|
||||
float distToIdeal = fabs(dist - 18.0f);
|
||||
if (!found || distToIdeal < bestDist)
|
||||
if (!found || distToIdeal < bestDist)
|
||||
{
|
||||
bestDist = distToIdeal;
|
||||
bestPos = Position(candidateX, candidateY, candidateZ);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
if (found)
|
||||
{
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
@@ -747,17 +747,17 @@ bool KarazhanNetherspiteBlockGreenBeamAction::Execute(Event event)
|
||||
float bestDist = 150.0f;
|
||||
Position bestPos;
|
||||
bool found = false;
|
||||
for (float dist = 18.0f; dist <= 30.0f; dist += 0.5f)
|
||||
for (float dist = 18.0f; dist <= 30.0f; dist += 0.5f)
|
||||
{
|
||||
float candidateX = bx + dx * dist;
|
||||
float candidateY = by + dy * dist;
|
||||
float candidateZ = bz;
|
||||
bool outsideAllVoidZones = true;
|
||||
for (Unit* voidZone : voidZones)
|
||||
for (Unit* voidZone : voidZones)
|
||||
{
|
||||
float voidZoneDist = sqrt(pow(candidateX - voidZone->GetPositionX(), 2) +
|
||||
float voidZoneDist = sqrt(pow(candidateX - voidZone->GetPositionX(), 2) +
|
||||
pow(candidateY - voidZone->GetPositionY(), 2));
|
||||
if (voidZoneDist < 4.0f)
|
||||
if (voidZoneDist < 4.0f)
|
||||
{
|
||||
outsideAllVoidZones = false;
|
||||
break;
|
||||
@@ -768,19 +768,19 @@ bool KarazhanNetherspiteBlockGreenBeamAction::Execute(Event event)
|
||||
continue;
|
||||
}
|
||||
float distToIdeal = fabs(dist - 18.0f);
|
||||
if (!found || distToIdeal < bestDist)
|
||||
if (!found || distToIdeal < bestDist)
|
||||
{
|
||||
bestDist = distToIdeal;
|
||||
bestPos = Position(candidateX, candidateY, candidateZ);
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
if (found)
|
||||
if (found)
|
||||
{
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
|
||||
return MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(),
|
||||
return MoveTo(bot->GetMapId(), bestPos.GetPositionX(), bestPos.GetPositionY(), bestPos.GetPositionZ(),
|
||||
false, false, false, true, MovementPriority::MOVEMENT_FORCED);
|
||||
}
|
||||
|
||||
@@ -820,7 +820,7 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
Unit* redPortal = bot->FindNearestCreature(NPC_RED_PORTAL, 150.0f);
|
||||
Unit* bluePortal = bot->FindNearestCreature(NPC_BLUE_PORTAL, 150.0f);
|
||||
Unit* greenPortal = bot->FindNearestCreature(NPC_GREEN_PORTAL, 150.0f);
|
||||
if (redPortal)
|
||||
if (redPortal)
|
||||
{
|
||||
float bx = boss->GetPositionX(), by = boss->GetPositionY();
|
||||
float px = redPortal->GetPositionX(), py = redPortal->GetPositionY();
|
||||
@@ -828,7 +828,7 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
float length = sqrt(dx*dx + dy*dy);
|
||||
beams.push_back({redPortal, 0.0f, length});
|
||||
}
|
||||
if (bluePortal)
|
||||
if (bluePortal)
|
||||
{
|
||||
float bx = boss->GetPositionX(), by = boss->GetPositionY();
|
||||
float px = bluePortal->GetPositionX(), py = bluePortal->GetPositionY();
|
||||
@@ -836,7 +836,7 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
float length = sqrt(dx*dx + dy*dy);
|
||||
beams.push_back({bluePortal, 0.0f, length});
|
||||
}
|
||||
if (greenPortal)
|
||||
if (greenPortal)
|
||||
{
|
||||
float bx = boss->GetPositionX(), by = boss->GetPositionY();
|
||||
float px = greenPortal->GetPositionX(), py = greenPortal->GetPositionY();
|
||||
@@ -845,7 +845,7 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
beams.push_back({greenPortal, 0.0f, length});
|
||||
}
|
||||
bool nearBeam = false;
|
||||
for (const auto& beam : beams)
|
||||
for (auto const& beam : beams)
|
||||
{
|
||||
float bx = boss->GetPositionX(), by = boss->GetPositionY();
|
||||
float px = beam.portal->GetPositionX(), py = beam.portal->GetPositionY();
|
||||
@@ -888,13 +888,13 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
continue;
|
||||
}
|
||||
bool tooCloseToBeam = false;
|
||||
for (const auto& beam : beams)
|
||||
for (auto const& beam : beams)
|
||||
{
|
||||
float bx = boss->GetPositionX(), by = boss->GetPositionY();
|
||||
float px = beam.portal->GetPositionX(), py = beam.portal->GetPositionY();
|
||||
float dx = px - bx, dy = py - by;
|
||||
float length = sqrt(dx*dx + dy*dy);
|
||||
if (length == 0.0f)
|
||||
if (length == 0.0f)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -918,7 +918,7 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (!found || moveDist < bestDist)
|
||||
if (!found || moveDist < bestDist)
|
||||
{
|
||||
bestCandidate = Position(cx, cy, cz);
|
||||
bestDist = moveDist;
|
||||
@@ -926,17 +926,17 @@ bool KarazhanNetherspiteAvoidBeamAndVoidZoneAction::Execute(Event event)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found && karazhanHelper.IsSafePosition(bestCandidate.GetPositionX(),
|
||||
bestCandidate.GetPositionY(), bestCandidate.GetPositionZ(),
|
||||
if (found && karazhanHelper.IsSafePosition(bestCandidate.GetPositionX(),
|
||||
bestCandidate.GetPositionY(), bestCandidate.GetPositionZ(),
|
||||
voidZones, 4.0f))
|
||||
{
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
|
||||
return MoveTo(bot->GetMapId(), bestCandidate.GetPositionX(), bestCandidate.GetPositionY(),
|
||||
return MoveTo(bot->GetMapId(), bestCandidate.GetPositionX(), bestCandidate.GetPositionY(),
|
||||
bestCandidate.GetPositionZ(), false, false, false, true, MovementPriority::MOVEMENT_COMBAT);
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -984,7 +984,7 @@ bool KarazhanNetherspiteBanishPhaseAvoidVoidZoneAction::isUseful()
|
||||
|
||||
RaidKarazhanHelpers karazhanHelper(botAI);
|
||||
std::vector<Unit*> voidZones = karazhanHelper.GetAllVoidZones();
|
||||
for (Unit* vz : voidZones)
|
||||
for (Unit* vz : voidZones)
|
||||
{
|
||||
if (bot->GetExactDist2d(vz) < 4.0f)
|
||||
{
|
||||
@@ -1056,7 +1056,7 @@ bool KarazhanPrinceMalchezaarNonTankAvoidHazardAction::Execute(Event event)
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
|
||||
return MoveTo(bot->GetMapId(), bestDestX, bestDestY, bestDestZ, false, false, false, true,
|
||||
return MoveTo(bot->GetMapId(), bestDestX, bestDestY, bestDestZ, false, false, false, true,
|
||||
MovementPriority::MOVEMENT_FORCED);
|
||||
}
|
||||
|
||||
@@ -1123,7 +1123,7 @@ bool KarazhanPrinceMalchezaarNonTankAvoidHazardAction::Execute(Event event)
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
|
||||
return MoveTo(bot->GetMapId(), bestDestX, bestDestY, bestDestZ, false, false, false, true,
|
||||
return MoveTo(bot->GetMapId(), bestDestX, bestDestY, bestDestZ, false, false, false, true,
|
||||
MovementPriority::MOVEMENT_COMBAT);
|
||||
}
|
||||
}
|
||||
@@ -1135,7 +1135,7 @@ bool KarazhanPrinceMalchezaarNonTankAvoidHazardAction::Execute(Event event)
|
||||
bool KarazhanPrinceMalchezaarNonTankAvoidHazardAction::isUseful()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "prince malchezaar");
|
||||
|
||||
|
||||
return boss && !(botAI->IsTank(bot) && botAI->HasAggro(boss) && boss->GetVictim() == bot);
|
||||
}
|
||||
|
||||
@@ -1198,7 +1198,7 @@ bool KarazhanPrinceMalchezaarTankAvoidHazardAction::Execute(Event event)
|
||||
if (!destSafe)
|
||||
continue;
|
||||
|
||||
bool pathSafe = karazhanHelper.IsStraightPathSafe(Position(bx, by, bz), Position(destX, destY, destZ),
|
||||
bool pathSafe = karazhanHelper.IsStraightPathSafe(Position(bx, by, bz), Position(destX, destY, destZ),
|
||||
infernals, safeInfernalDistance, stepSize);
|
||||
float moveDist = sqrt(pow(destX - bx, 2) + pow(destY - by, 2));
|
||||
if (pathSafe && moveDist < bestMoveDist)
|
||||
@@ -1255,7 +1255,7 @@ bool KarazhanPrinceMalchezaarTankAvoidHazardAction::Execute(Event event)
|
||||
bot->AttackStop();
|
||||
bot->InterruptNonMeleeSpells(false);
|
||||
|
||||
return MoveTo(bot->GetMapId(), bestDestX, bestDestY, bestDestZ, false, false, false, true,
|
||||
return MoveTo(bot->GetMapId(), bestDestX, bestDestY, bestDestZ, false, false, false, true,
|
||||
MovementPriority::MOVEMENT_COMBAT);
|
||||
}
|
||||
}
|
||||
@@ -1266,6 +1266,6 @@ bool KarazhanPrinceMalchezaarTankAvoidHazardAction::Execute(Event event)
|
||||
bool KarazhanPrinceMalchezaarTankAvoidHazardAction::isUseful()
|
||||
{
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "prince malchezaar");
|
||||
|
||||
|
||||
return boss && botAI->IsTank(bot) && botAI->HasAggro(boss) && boss->GetVictim() == bot;
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ const Position KARAZHAN_MAIDEN_OF_VIRTUE_RANGED_POSITION[8] =
|
||||
};
|
||||
|
||||
const Position KARAZHAN_BIG_BAD_WOLF_BOSS_POSITION = Position(-10913.391f, -1773.508f, 90.477f);
|
||||
const Position KARAZHAN_BIG_BAD_WOLF_RUN_POSITION[4] =
|
||||
const Position KARAZHAN_BIG_BAD_WOLF_RUN_POSITION[4] =
|
||||
{
|
||||
{ -10875.456f, -1779.036f, 90.477f },
|
||||
{ -10872.281f, -1751.638f, 90.477f },
|
||||
{ -10910.492f, -1747.401f, 90.477f },
|
||||
{ -10910.492f, -1747.401f, 90.477f },
|
||||
{ -10913.391f, -1773.508f, 90.477f },
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ Unit* RaidKarazhanHelpers::GetFirstAliveUnitByEntry(uint32 entry)
|
||||
{
|
||||
const GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npcGuid);
|
||||
|
||||
@@ -253,7 +253,7 @@ std::tuple<Player*, Player*, Player*> RaidKarazhanHelpers::GetCurrentBeamBlocker
|
||||
std::vector<Player*> redBlockers = GetRedBlockers();
|
||||
if (!redBlockers.empty())
|
||||
{
|
||||
auto it = std::find_if(redBlockers.begin(), redBlockers.end(), [](Player* p)
|
||||
auto it = std::find_if(redBlockers.begin(), redBlockers.end(), [](Player* p)
|
||||
{
|
||||
return p && p->GetGUID() == currentRedBlocker;
|
||||
});
|
||||
@@ -276,7 +276,7 @@ std::tuple<Player*, Player*, Player*> RaidKarazhanHelpers::GetCurrentBeamBlocker
|
||||
std::vector<Player*> greenBlockers = GetGreenBlockers();
|
||||
if (!greenBlockers.empty())
|
||||
{
|
||||
auto it = std::find_if(greenBlockers.begin(), greenBlockers.end(), [](Player* p)
|
||||
auto it = std::find_if(greenBlockers.begin(), greenBlockers.end(), [](Player* p)
|
||||
{
|
||||
return p && p->GetGUID() == currentGreenBlocker;
|
||||
});
|
||||
@@ -299,7 +299,7 @@ std::tuple<Player*, Player*, Player*> RaidKarazhanHelpers::GetCurrentBeamBlocker
|
||||
std::vector<Player*> blueBlockers = GetBlueBlockers();
|
||||
if (!blueBlockers.empty())
|
||||
{
|
||||
auto it = std::find_if(blueBlockers.begin(), blueBlockers.end(), [](Player* p)
|
||||
auto it = std::find_if(blueBlockers.begin(), blueBlockers.end(), [](Player* p)
|
||||
{
|
||||
return p && p->GetGUID() == currentBlueBlocker;
|
||||
});
|
||||
@@ -327,7 +327,7 @@ std::vector<Unit*> RaidKarazhanHelpers::GetAllVoidZones()
|
||||
std::vector<Unit*> voidZones;
|
||||
const float radius = 30.0f;
|
||||
const GuidVector npcs = botAI->GetAiObjectContext()->GetValue<GuidVector>("nearest npcs")->Get();
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npcGuid);
|
||||
if (!unit || unit->GetEntry() != NPC_VOID_ZONE)
|
||||
@@ -363,7 +363,7 @@ std::vector<Unit*> RaidKarazhanHelpers::GetSpawnedInfernals() const
|
||||
{
|
||||
std::vector<Unit*> infernals;
|
||||
const GuidVector npcs = botAI->GetAiObjectContext()->GetValue<GuidVector>("nearest npcs")->Get();
|
||||
for (const auto& npcGuid : npcs)
|
||||
for (auto const& npcGuid : npcs)
|
||||
{
|
||||
Unit* unit = botAI->GetUnit(npcGuid);
|
||||
if (unit && unit->GetEntry() == NPC_NETHERSPITE_INFERNAL)
|
||||
@@ -388,7 +388,7 @@ bool RaidKarazhanHelpers::IsStraightPathSafe(const Position& start, const Positi
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
for (float checkDist = 0.0f; checkDist <= totalDist; checkDist += stepSize)
|
||||
{
|
||||
float t = checkDist / totalDist;
|
||||
@@ -404,6 +404,6 @@ bool RaidKarazhanHelpers::IsStraightPathSafe(const Position& start, const Positi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public:
|
||||
bool IsSafePosition (float x, float y, float z,
|
||||
const std::vector<Unit*>& hazards, float hazardRadius);
|
||||
std::vector<Unit*> GetSpawnedInfernals() const;
|
||||
bool IsStraightPathSafe(const Position& start, const Position& target,
|
||||
bool IsStraightPathSafe(const Position& start, const Position& target,
|
||||
const std::vector<Unit*>& hazards, float hazardRadius, float stepSize);
|
||||
};
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ float KarazhanBigBadWolfMultiplier::GetValue(Action* action)
|
||||
|
||||
if (bot->HasAura(SPELL_LITTLE_RED_RIDING_HOOD))
|
||||
{
|
||||
if ((dynamic_cast<MovementAction*>(action) && !dynamic_cast<KarazhanBigBadWolfRunAwayAction*>(action)) ||
|
||||
if ((dynamic_cast<MovementAction*>(action) && !dynamic_cast<KarazhanBigBadWolfRunAwayAction*>(action)) ||
|
||||
(dynamic_cast<AttackAction*>(action)))
|
||||
{
|
||||
return 0.0f;
|
||||
@@ -58,7 +58,7 @@ float KarazhanShadeOfAranMultiplier::GetValue(Action* action)
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
if (boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_ARCANE_EXPLOSION))
|
||||
if (boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_ARCANE_EXPLOSION))
|
||||
{
|
||||
if (IsChargeAction(action))
|
||||
{
|
||||
@@ -120,7 +120,7 @@ float KarazhanNetherspiteBlueAndGreenBeamMultiplier::GetValue(Action* action)
|
||||
Unit* bluePortal = bot->FindNearestCreature(NPC_BLUE_PORTAL, 150.0f);
|
||||
Unit* greenPortal = bot->FindNearestCreature(NPC_GREEN_PORTAL, 150.0f);
|
||||
bool inBeam = false;
|
||||
for (Unit* portal : {bluePortal, greenPortal})
|
||||
for (Unit* portal : {bluePortal, greenPortal})
|
||||
{
|
||||
if (!portal)
|
||||
{
|
||||
@@ -139,7 +139,7 @@ float KarazhanNetherspiteBlueAndGreenBeamMultiplier::GetValue(Action* action)
|
||||
float t = (botdx * dx + botdy * dy);
|
||||
float beamX = bx + dx * t, beamY = by + dy * t;
|
||||
float distToBeam = sqrt(pow(bot->GetPositionX() - beamX, 2) + pow(bot->GetPositionY() - beamY, 2));
|
||||
if (distToBeam < 0.3f && t > 0.0f && t < length)
|
||||
if (distToBeam < 0.3f && t > 0.0f && t < length)
|
||||
{
|
||||
inBeam = true;
|
||||
break;
|
||||
@@ -149,7 +149,7 @@ float KarazhanNetherspiteBlueAndGreenBeamMultiplier::GetValue(Action* action)
|
||||
{
|
||||
std::vector<Unit*> voidZones = karazhanHelper.GetAllVoidZones();
|
||||
bool inVoidZone = false;
|
||||
for (Unit* vz : voidZones)
|
||||
for (Unit* vz : voidZones)
|
||||
{
|
||||
if (bot->GetExactDist2d(vz) < 4.0f)
|
||||
{
|
||||
@@ -232,7 +232,7 @@ float KarazhanNetherspiteRedBeamMultiplier::GetValue(Action* action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return 1.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -140,15 +140,18 @@ float ThaddiusGenericMultiplier::GetValue(Action* action)
|
||||
}
|
||||
// magnetic pull
|
||||
// uint32 curr_timer = eventMap->GetTimer();
|
||||
// // if (curr_phase == 2 && bot->GetPositionZ() > 312.5f && dynamic_cast<MovementAction*>(action)) {
|
||||
// // if (curr_phase == 2 && bot->GetPositionZ() > 312.5f && dynamic_cast<MovementAction*>(action))
|
||||
// {
|
||||
// if (curr_phase == 2 && (curr_timer % 20000 >= 18000 || curr_timer % 20000 <= 2000) &&
|
||||
// dynamic_cast<MovementAction*>(action)) {
|
||||
// dynamic_cast<MovementAction*>(action))
|
||||
// {
|
||||
// // MotionMaster *mm = bot->GetMotionMaster();
|
||||
// // mm->Clear();
|
||||
// return 0.0f;
|
||||
// }
|
||||
// thaddius phase
|
||||
// if (curr_phase == 8 && dynamic_cast<FleeAction*>(action)) {
|
||||
// if (curr_phase == 8 && dynamic_cast<FleeAction*>(action))
|
||||
// {
|
||||
// return 0.0f;
|
||||
// }
|
||||
return 1.0f;
|
||||
@@ -263,18 +266,22 @@ float FourhorsemanGenericMultiplier::GetValue(Action* action)
|
||||
// float GothikGenericMultiplier::GetValue(Action* action)
|
||||
// {
|
||||
// Unit* boss = AI_VALUE2(Unit*, "find target", "gothik the harvester");
|
||||
// if (!boss) {
|
||||
// if (!boss)
|
||||
// {
|
||||
// return 1.0f;
|
||||
// }
|
||||
// BossAI* boss_ai = dynamic_cast<BossAI*>(boss->GetAI());
|
||||
// EventMap* eventMap = boss_botAI->GetEvents();
|
||||
// uint32 curr_phase = eventMap->GetPhaseMask();
|
||||
// if (curr_phase == 1 && (dynamic_cast<FollowAction*>(action))) {
|
||||
// if (curr_phase == 1 && (dynamic_cast<FollowAction*>(action)))
|
||||
// {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// if (curr_phase == 1 && (dynamic_cast<AttackAction*>(action))) {
|
||||
// if (curr_phase == 1 && (dynamic_cast<AttackAction*>(action)))
|
||||
// {
|
||||
// Unit* target = action->GetTarget();
|
||||
// if (target == boss) {
|
||||
// if (target == boss)
|
||||
// {
|
||||
// return 0.0f;
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -178,7 +178,6 @@ private:
|
||||
SapphironBossHelper helper;
|
||||
};
|
||||
|
||||
|
||||
class SapphironFlightTrigger : public Trigger
|
||||
{
|
||||
public:
|
||||
@@ -221,4 +220,4 @@ private:
|
||||
LoathebBossHelper helper;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -17,7 +17,6 @@ bool FlameTsunamiTrigger::IsActive()
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "sartharion");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (auto& npc : npcs)
|
||||
{
|
||||
@@ -39,7 +38,6 @@ bool TwilightFissureTrigger::IsActive()
|
||||
Unit* boss = AI_VALUE2(Unit*, "find target", "sartharion");
|
||||
if (!boss) { return false; }
|
||||
|
||||
|
||||
GuidVector npcs = AI_VALUE(GuidVector, "nearest hostile npcs");
|
||||
for (auto& npc : npcs)
|
||||
{
|
||||
@@ -98,7 +96,6 @@ bool TwilightPortalEnterTrigger::IsActive()
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// Don't enter portal until drakes are dead
|
||||
if (bot->HasAura(SPELL_POWER_OF_SHADRON) ||
|
||||
bot->HasAura(SPELL_POWER_OF_TENEBRON) ||
|
||||
@@ -125,4 +122,4 @@ bool TwilightPortalEnterTrigger::IsActive()
|
||||
bool TwilightPortalExitTrigger::IsActive()
|
||||
{
|
||||
return bot->HasAura(SPELL_TWILIGHT_SHIFT) && !AI_VALUE2(Unit*, "find target", "acolyte of shadron");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1001,7 +1001,7 @@ bool RazorscaleHarpoonAction::Execute(Event event)
|
||||
float minDistance = std::numeric_limits<float>::max();
|
||||
|
||||
// Find the nearest harpoon that hasn't been fired and is not on cooldown
|
||||
for (const auto& harpoon : harpoonData)
|
||||
for (auto const& harpoon : harpoonData)
|
||||
{
|
||||
if (razorscaleHelper.IsHarpoonFired(harpoon.chainSpellId))
|
||||
continue;
|
||||
@@ -1087,7 +1087,7 @@ bool RazorscaleHarpoonAction::isUseful()
|
||||
|
||||
const std::vector<RazorscaleBossHelper::HarpoonData>& harpoonData = razorscaleHelper.GetHarpoonData();
|
||||
|
||||
for (const auto& harpoon : harpoonData)
|
||||
for (auto const& harpoon : harpoonData)
|
||||
{
|
||||
if (razorscaleHelper.IsHarpoonFired(harpoon.chainSpellId))
|
||||
continue;
|
||||
|
||||
@@ -84,7 +84,7 @@ GameObject* RazorscaleBossHelper::FindNearestHarpoon(float x, float y, float z)
|
||||
GameObject* nearestHarpoon = nullptr;
|
||||
float minDistanceSq = std::numeric_limits<float>::max();
|
||||
|
||||
for (const auto& harpoon : GetHarpoonData())
|
||||
for (auto const& harpoon : GetHarpoonData())
|
||||
{
|
||||
if (GameObject* harpoonGO = bot->FindNearestGameObject(harpoon.gameObjectEntry, 200.0f))
|
||||
{
|
||||
@@ -158,7 +158,6 @@ bool RazorscaleBossHelper::CanSwapRoles() const
|
||||
return (currentTime - lastSwapTime) >= _roleSwapCooldown;
|
||||
}
|
||||
|
||||
|
||||
void RazorscaleBossHelper::AssignRolesBasedOnHealth()
|
||||
{
|
||||
// Check if enough time has passed since last swap
|
||||
|
||||
@@ -211,7 +211,7 @@ bool RazorscaleHarpoonAvailableTrigger::IsActive()
|
||||
}
|
||||
|
||||
// Check each harpoon entry
|
||||
for (const auto& harpoon : harpoonData)
|
||||
for (auto const& harpoon : harpoonData)
|
||||
{
|
||||
// Skip harpoons whose chain spell is already active on the boss
|
||||
if (razorscaleHelper.IsHarpoonFired(harpoon.chainSpellId))
|
||||
@@ -808,7 +808,6 @@ bool ThorimMarkDpsTargetTrigger::IsActive()
|
||||
if (!boss || !boss->IsAlive() || !boss->IsHostileTo(bot))
|
||||
return false;
|
||||
|
||||
|
||||
if (boss->GetPositionZ() < ULDUAR_THORIM_AXIS_Z_FLOOR_THRESHOLD && (!currentSkullUnit || !currentSkullUnit->IsAlive()))
|
||||
{
|
||||
group->SetTargetIcon(RtiTargetValue::skullIndex, bot->GetGUID(), boss->GetGUID());
|
||||
|
||||
Reference in New Issue
Block a user