mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
2024-11-6
correct problems of forge of souls bronjahm strategy 2024-11-6
This commit is contained in:
@@ -43,25 +43,40 @@ bool AttackCorruptedSoulFragmentAction::Execute(Event event)
|
|||||||
|
|
||||||
bool BronjahmGroupPositionAction::Execute(Event event)
|
bool BronjahmGroupPositionAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
if (botAI->IsTank(bot))
|
|
||||||
if (bot->GetExactDist2d(BRONJAHM_TANK_POSITION) > 5.0f)
|
|
||||||
return MoveTo(bot->GetMapId(), BRONJAHM_TANK_POSITION.GetPositionX(), BRONJAHM_TANK_POSITION.GetPositionY(),
|
|
||||||
BRONJAHM_TANK_POSITION.GetPositionZ(), false, false, false, true,
|
|
||||||
MovementPriority::MOVEMENT_COMBAT);
|
|
||||||
else
|
|
||||||
return false;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
|
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
|
||||||
|
if (!boss)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (boss)
|
if (botAI->IsTank(bot))
|
||||||
{
|
{
|
||||||
|
bot->SetTarget(boss->GetGUID());
|
||||||
|
if (AI_VALUE2(bool, "has aggro", "current target"))
|
||||||
|
if (bot->GetExactDist2d(BRONJAHM_TANK_POSITION) > 5.0f)
|
||||||
|
return MoveTo(bot->GetMapId(), BRONJAHM_TANK_POSITION.GetPositionX(),
|
||||||
|
BRONJAHM_TANK_POSITION.GetPositionY(), BRONJAHM_TANK_POSITION.GetPositionZ(), false,
|
||||||
|
false, false, true, MovementPriority::MOVEMENT_NORMAL);
|
||||||
|
else
|
||||||
|
return Attack(boss);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Attack(boss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
float maxMovement = 10.0f;
|
||||||
|
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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BronjahmGroupPositionAction::isUseful() { return bot->GetExactDist2d(BRONJAHM_TANK_POSITION) > 5.0f; }
|
bool BronjahmGroupPositionAction::isUseful() { return true; }
|
||||||
|
|
||||||
bool BronjahmTankTargetAction::Execute(Event event)
|
bool BronjahmTankTargetAction::Execute(Event event)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -23,10 +23,10 @@ public:
|
|||||||
bool Execute(Event event) override;
|
bool Execute(Event event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BronjahmGroupPositionAction : public MovementAction
|
class BronjahmGroupPositionAction : public AttackAction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BronjahmGroupPositionAction(PlayerbotAI* ai) : MovementAction(ai, "bronjahm group position") {}
|
BronjahmGroupPositionAction(PlayerbotAI* ai) : AttackAction(ai, "bronjahm group position") {}
|
||||||
|
|
||||||
bool Execute(Event event) override;
|
bool Execute(Event event) override;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ float BronjahmMultiplier::GetValue(Action* action) {
|
|||||||
if (dynamic_cast<TankAssistAction*>(action))
|
if (dynamic_cast<TankAssistAction*>(action))
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
||||||
if (boss && boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL))
|
if (boss && boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) &&
|
||||||
|
bot->HasAura(SPELL_CORRUPT_SOUL))
|
||||||
{
|
{
|
||||||
if (dynamic_cast<MovementAction*>(action) && !dynamic_cast<MoveFromBronjahmAction*>(action))
|
if (dynamic_cast<MovementAction*>(action) && !dynamic_cast<MoveFromBronjahmAction*>(action))
|
||||||
{
|
{
|
||||||
@@ -28,8 +29,6 @@ float BronjahmMultiplier::GetValue(Action* action) {
|
|||||||
|
|
||||||
float AttackFragmentMultiplier::GetValue(Action* action)
|
float AttackFragmentMultiplier::GetValue(Action* action)
|
||||||
{
|
{
|
||||||
if (botAI->IsHeal(bot) && dynamic_cast<AttackCorruptedSoulFragmentAction*>(action))
|
|
||||||
return 0.0f;
|
|
||||||
|
|
||||||
Unit* fragment = nullptr;
|
Unit* fragment = nullptr;
|
||||||
|
|
||||||
@@ -45,10 +44,7 @@ float AttackFragmentMultiplier::GetValue(Action* action)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fragment && dynamic_cast<BronjahmDpsPositionAction*>(action))
|
if (fragment && botAI->IsDps(bot) && dynamic_cast<BronjahmGroupPositionAction*>(action))
|
||||||
return 0.0f;
|
|
||||||
|
|
||||||
if (fragment && dynamic_cast<DpsAssistAction*>(action))
|
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
|
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ void WotlkDungeonFoSStrategy::InitTriggers(std::vector<TriggerNode*>& triggers)
|
|||||||
triggers.push_back(new TriggerNode(
|
triggers.push_back(new TriggerNode(
|
||||||
"switch to soul fragment", NextAction::array(0, new NextAction("attack corrupted soul fragment", ACTION_RAID + 1), nullptr)));
|
"switch to soul fragment", NextAction::array(0, new NextAction("attack corrupted soul fragment", ACTION_RAID + 1), nullptr)));
|
||||||
triggers.push_back(new TriggerNode("bronjahm position",
|
triggers.push_back(new TriggerNode("bronjahm position",
|
||||||
NextAction::array(0, new NextAction("bronjahm position", ACTION_RAID + 1), nullptr)));
|
NextAction::array(0, new NextAction("bronjahm group position", ACTION_RAID + 1), nullptr)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void WotlkDungeonFoSStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)
|
void WotlkDungeonFoSStrategy::InitMultipliers(std::vector<Multiplier*>& multipliers)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#include "ForgeOfSoulsTriggers.h"
|
|
||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
|
#include "ForgeOfSoulsTriggers.h"
|
||||||
#include "AiObject.h"
|
#include "AiObject.h"
|
||||||
#include "AiObjectContext.h"
|
#include "AiObjectContext.h"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user