mirror of
https://github.com/mod-playerbots/mod-playerbots
synced 2025-11-29 15:58:20 +08:00
sapphiron strategy fix
This commit is contained in:
@@ -150,14 +150,6 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
||||
!bot->IsFlying() && !bot->IsUnderWater();
|
||||
MotionMaster &mm = *bot->GetMotionMaster();
|
||||
mm.Clear();
|
||||
|
||||
// float botZ = bot->GetPositionZ();
|
||||
// if (!bot->InBattleground() && z - botZ > 0.5f && bot->GetDistance2d(x, y) <= 5.0f)
|
||||
// {
|
||||
// float speed = bot->GetSpeed(MOVE_RUN);
|
||||
// mm.MoveJump(x, y, botZ + 0.5f, speed, speed, 1);
|
||||
// }
|
||||
// else
|
||||
mm.MovePoint(mapId, x, y, z, generatePath);
|
||||
|
||||
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation());
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define _PLAYERBOT_HEALDRUIDSTRATEGY_H
|
||||
|
||||
#include "GenericDruidStrategy.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
@@ -16,7 +17,7 @@ class HealDruidStrategy : public GenericDruidStrategy
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "heal"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_HEAL; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_RANGED | STRATEGY_TYPE_HEAL; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define _PLAYERBOT_GENERICHUNTERSTRATEGY_H
|
||||
|
||||
#include "CombatStrategy.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
@@ -16,6 +17,7 @@ class GenericHunterStrategy : public CombatStrategy
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "hunter"; }
|
||||
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
|
||||
};
|
||||
|
||||
class HunterBoostStrategy : public Strategy
|
||||
|
||||
@@ -16,6 +16,7 @@ class GenericMageStrategy : public CombatStrategy
|
||||
|
||||
std::string const getName() override { return "mage"; }
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
|
||||
};
|
||||
|
||||
class MageCureStrategy : public Strategy
|
||||
|
||||
@@ -17,7 +17,7 @@ class ShadowPriestStrategy : public GenericPriestStrategy
|
||||
NextAction** getDefaultActions() override;
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "shadow"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_DPS|STRATEGY_TYPE_RANGED; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_DPS | STRATEGY_TYPE_RANGED; }
|
||||
};
|
||||
|
||||
class ShadowPriestAoeStrategy : public CombatStrategy
|
||||
|
||||
@@ -543,16 +543,14 @@ bool SapphironGroundPositionAction::Execute(Event event)
|
||||
float offset_angle = M_PI * 0.02 * index;
|
||||
float angle = start_angle + offset_angle;
|
||||
float distance;
|
||||
if (botAI->IsRangedDps(bot)) {
|
||||
distance = rand_norm() * 5 + 30.0f;
|
||||
if (botAI->IsRanged(bot)) {
|
||||
distance = 35.0f;
|
||||
} else if (botAI->IsHeal(bot)) {
|
||||
distance = rand_norm() * 5 + 20.0f;
|
||||
distance = 30.0f;
|
||||
} else {
|
||||
distance = rand_norm() * 10;
|
||||
}
|
||||
if (MoveTo(NAXX_MAP_ID, helper.center.first + cos(angle) * distance, helper.center.second + sin(angle) * distance, helper.GENERIC_HEIGHT)) {
|
||||
return true;
|
||||
distance = 5.0f;
|
||||
}
|
||||
return MoveTo(NAXX_MAP_ID, helper.center.first + cos(angle) * distance, helper.center.second + sin(angle) * distance, helper.GENERIC_HEIGHT);
|
||||
} else {
|
||||
std::vector<float> dest;
|
||||
if (helper.FindPosToAvoidChill(dest)) {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#define _PLAYERBOT_HEALSHAMANSTRATEGY_H
|
||||
|
||||
#include "GenericShamanStrategy.h"
|
||||
#include "Strategy.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
@@ -16,7 +17,7 @@ class HealShamanStrategy : public GenericShamanStrategy
|
||||
|
||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||
std::string const getName() override { return "heal"; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_HEAL; }
|
||||
uint32 GetType() const override { return STRATEGY_TYPE_RANGED | STRATEGY_TYPE_HEAL; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user