mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
2024-11-6 correct problems
This commit is contained in:
@@ -65,53 +65,23 @@ bool BronjahmGroupPositionAction::Execute(Event event)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
float maxMovement = 10.0f;
|
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
|
else
|
||||||
{
|
return false;
|
||||||
return Move(bot->GetAngle(boss), fmin(bot->GetExactDist2d(boss) - 2.0f, maxMovement));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BronjahmGroupPositionAction::isUseful() { return true; }
|
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);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
#include "Playerbots.h"
|
#include "Playerbots.h"
|
||||||
#include "ForgeOfSoulsTriggers.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
|
class MoveFromBronjahmAction : public MovementAction
|
||||||
{
|
{
|
||||||
@@ -33,21 +33,5 @@ public:
|
|||||||
bool isUseful() override;
|
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
|
#endif
|
||||||
|
|||||||
@@ -8,15 +8,14 @@
|
|||||||
|
|
||||||
|
|
||||||
float BronjahmMultiplier::GetValue(Action* action) {
|
float BronjahmMultiplier::GetValue(Action* action) {
|
||||||
Unit* boss = nullptr;
|
Unit* boss = AI_VALUE2(Unit *, "find target", "bronjahm");
|
||||||
boss = AI_VALUE2(Unit *, "find target", "bronjahm");
|
|
||||||
if (!boss)
|
if (!boss)
|
||||||
return 1.0f;
|
return 1.0f;
|
||||||
if (botAI->IsTank(bot))
|
|
||||||
if (dynamic_cast<TankAssistAction*>(action))
|
|
||||||
return 0.0f;
|
|
||||||
|
|
||||||
if (boss && boss->HasUnitState(UNIT_STATE_CASTING) && boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) &&
|
if (dynamic_cast<TankAssistAction*>(action))
|
||||||
|
return 0.0f;
|
||||||
|
|
||||||
|
if (boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) &&
|
||||||
bot->HasAura(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))
|
||||||
|
|||||||
@@ -6,11 +6,10 @@
|
|||||||
bool MoveFromBronjahmTrigger::IsActive()
|
bool MoveFromBronjahmTrigger::IsActive()
|
||||||
{
|
{
|
||||||
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
|
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))
|
||||||
if (boss->FindCurrentSpellBySpellId(SPELL_CORRUPT_SOUL) && bot->HasAura(SPELL_CORRUPT_SOUL))
|
return true;
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -36,9 +35,5 @@ bool SwitchToSoulFragment::IsActive()
|
|||||||
bool BronjahmPositionTrigger::IsActive()
|
bool BronjahmPositionTrigger::IsActive()
|
||||||
{
|
{
|
||||||
|
|
||||||
Unit* boss = AI_VALUE2(Unit*, "find target", "bronjahm");
|
return bool(AI_VALUE2(Unit*, "find target", "bronjahm"));
|
||||||
if (boss)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "GenericTriggers.h"
|
#include "GenericTriggers.h"
|
||||||
#include "DungeonStrategyUtils.h"
|
#include "DungeonStrategyUtils.h"
|
||||||
|
|
||||||
enum FosIDs
|
enum ForgeOfSoulsBronjahmIDs
|
||||||
{
|
{
|
||||||
// Boss1
|
// Boss1
|
||||||
NPC_CORRUPTED_SOUL_FRAGMENT = 36535,
|
NPC_CORRUPTED_SOUL_FRAGMENT = 36535,
|
||||||
|
|||||||
Reference in New Issue
Block a user