diff --git a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.cpp b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.cpp index e0e8425f..0992bd3b 100644 --- a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.cpp +++ b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.cpp @@ -65,53 +65,23 @@ bool BronjahmGroupPositionAction::Execute(Event event) else { float maxMovement = 10.0f; - if (bot->getClass() == CLASS_HUNTER) + + if (bot->GetExactDist2d(boss) > maxMovement) { - return Move(bot->GetAngle(boss), fmin(bot->GetExactDist2d(boss) - 6.5f, maxMovement)); + if (bot->getClass() == CLASS_HUNTER) + { + return Move(bot->GetAngle(boss), fmin(bot->GetExactDist2d(boss) - 6.5f, maxMovement)); + } + else + { + return Move(bot->GetAngle(boss), fmin(bot->GetExactDist2d(boss) - 2.0f, maxMovement)); + } } else - { - return Move(bot->GetAngle(boss), fmin(bot->GetExactDist2d(boss) - 2.0f, maxMovement)); - } + return false; } } bool BronjahmGroupPositionAction::isUseful() { return true; } -bool BronjahmTankTargetAction::Execute(Event event) -{ - if (botAI->IsTank(bot)) - { - Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm"); - if (boss && AI_VALUE(Unit*, "current target") != boss) - return Attack(boss); - else - return false; - } - else - return false; -} -bool BronjahmDpsPositionAction::Execute(Event event) -{ - Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm"); - if (!boss) - return false; - - if (bot->getClass() == CLASS_HUNTER) - { - return Move(bot->GetAngle(boss), 8.0f); - } - else - { - return Move(bot->GetAngle(boss), 5.0f); - } -} - -bool BronjahmDpsPositionAction::isUseful() -{ - if (bot->GetExactDist2d(BRONJAHM_TANK_POSITION) <= 10.0f) - return false; - - return botAI->IsDps(bot) || botAI->IsHeal(bot); -} diff --git a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.h b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.h index f4a6521d..2388fe50 100644 --- a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.h +++ b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsActions.h @@ -7,7 +7,7 @@ #include "Playerbots.h" #include "ForgeOfSoulsTriggers.h" -const Position BRONJAHM_TANK_POSITION = Position(5297.9204f, 2506.698f, 686.06793f); +const Position BRONJAHM_TANK_POSITION = Position(5297.920f, 2506.698f, 686.068f); class MoveFromBronjahmAction : public MovementAction { @@ -33,21 +33,5 @@ public: bool isUseful() override; }; -class BronjahmDpsPositionAction : public MovementAction -{ -public: - BronjahmDpsPositionAction(PlayerbotAI* ai) : MovementAction(ai, "bronjahm dps position") {} - - bool Execute(Event event) override; - - bool isUseful() override; -}; - -class BronjahmTankTargetAction : public AttackAction -{ -public: - BronjahmTankTargetAction(PlayerbotAI* ai) : AttackAction(ai, "bronjahm tank target") {} - bool Execute(Event event) override; -}; #endif diff --git a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsMultipliers.cpp b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsMultipliers.cpp index 6eed3c81..36f67fb0 100644 --- a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsMultipliers.cpp +++ b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsMultipliers.cpp @@ -8,15 +8,14 @@ float BronjahmMultiplier::GetValue(Action* action) { - Unit* boss = nullptr; - boss = AI_VALUE2(Unit *, "find target", "bronjahm"); + Unit* boss = AI_VALUE2(Unit *, "find target", "bronjahm"); if (!boss) return 1.0f; - if (botAI->IsTank(bot)) - if (dynamic_cast(action)) - return 0.0f; - if (boss && boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) && + if (dynamic_cast(action)) + return 0.0f; + + if (boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) && bot->HasAura(SPELL_CORRUPT_SOUL)) { if (dynamic_cast(action) && !dynamic_cast(action)) diff --git a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.cpp b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.cpp index b2bf096b..13256d70 100644 --- a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.cpp +++ b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.cpp @@ -6,11 +6,10 @@ bool MoveFromBronjahmTrigger::IsActive() { Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm"); - if (boss && boss->HasUnitState(UNIT_STATE_CASTING)) - { - if (boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) && bot->HasAura(SPELL_CORRUPT_SOUL)) - return true; - } + + if (boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) && bot->HasAura(SPELL_CORRUPT_SOUL)) + return true; + return false; } @@ -36,9 +35,5 @@ bool SwitchToSoulFragment::IsActive() bool BronjahmPositionTrigger::IsActive() { - Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm"); - if (boss) - return true; - - return false; + return bool(AI_VALUE2(Unit*, "find target", "bronjahm")); } diff --git a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.h b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.h index d52c3f37..3ddf8f66 100644 --- a/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.h +++ b/src/strategy/dungeons/wotlk/forgeofsouls/ForgeOfSoulsTriggers.h @@ -6,7 +6,7 @@ #include "GenericTriggers.h" #include "DungeonStrategyUtils.h" -enum FosIDs +enum ForgeOfSoulsBronjahmIDs { // Boss1 NPC_CORRUPTED_SOUL_FRAGMENT = 36535,