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,15 +150,7 @@ bool MovementAction::MoveTo(uint32 mapId, float x, float y, float z, bool idle,
|
|||||||
!bot->IsFlying() && !bot->IsUnderWater();
|
!bot->IsFlying() && !bot->IsUnderWater();
|
||||||
MotionMaster &mm = *bot->GetMotionMaster();
|
MotionMaster &mm = *bot->GetMotionMaster();
|
||||||
mm.Clear();
|
mm.Clear();
|
||||||
|
mm.MovePoint(mapId, x, y, z, generatePath);
|
||||||
// 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());
|
AI_VALUE(LastMovement&, "last movement").Set(mapId, x, y, z, bot->GetOrientation());
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#define _PLAYERBOT_HEALDRUIDSTRATEGY_H
|
#define _PLAYERBOT_HEALDRUIDSTRATEGY_H
|
||||||
|
|
||||||
#include "GenericDruidStrategy.h"
|
#include "GenericDruidStrategy.h"
|
||||||
|
#include "Strategy.h"
|
||||||
|
|
||||||
class PlayerbotAI;
|
class PlayerbotAI;
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ class HealDruidStrategy : public GenericDruidStrategy
|
|||||||
|
|
||||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||||
std::string const getName() override { return "heal"; }
|
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
|
#endif
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#define _PLAYERBOT_GENERICHUNTERSTRATEGY_H
|
#define _PLAYERBOT_GENERICHUNTERSTRATEGY_H
|
||||||
|
|
||||||
#include "CombatStrategy.h"
|
#include "CombatStrategy.h"
|
||||||
|
#include "Strategy.h"
|
||||||
|
|
||||||
class PlayerbotAI;
|
class PlayerbotAI;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ class GenericHunterStrategy : public CombatStrategy
|
|||||||
|
|
||||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||||
std::string const getName() override { return "hunter"; }
|
std::string const getName() override { return "hunter"; }
|
||||||
|
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class HunterBoostStrategy : public Strategy
|
class HunterBoostStrategy : public Strategy
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ class GenericMageStrategy : public CombatStrategy
|
|||||||
|
|
||||||
std::string const getName() override { return "mage"; }
|
std::string const getName() override { return "mage"; }
|
||||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||||
|
uint32 GetType() const override { return CombatStrategy::GetType() | STRATEGY_TYPE_RANGED | STRATEGY_TYPE_DPS; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MageCureStrategy : public Strategy
|
class MageCureStrategy : public Strategy
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ShadowPriestStrategy : public GenericPriestStrategy
|
|||||||
NextAction** getDefaultActions() override;
|
NextAction** getDefaultActions() override;
|
||||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||||
std::string const getName() override { return "shadow"; }
|
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
|
class ShadowPriestAoeStrategy : public CombatStrategy
|
||||||
|
|||||||
@@ -543,16 +543,14 @@ bool SapphironGroundPositionAction::Execute(Event event)
|
|||||||
float offset_angle = M_PI * 0.02 * index;
|
float offset_angle = M_PI * 0.02 * index;
|
||||||
float angle = start_angle + offset_angle;
|
float angle = start_angle + offset_angle;
|
||||||
float distance;
|
float distance;
|
||||||
if (botAI->IsRangedDps(bot)) {
|
if (botAI->IsRanged(bot)) {
|
||||||
distance = rand_norm() * 5 + 30.0f;
|
distance = 35.0f;
|
||||||
} else if (botAI->IsHeal(bot)) {
|
} else if (botAI->IsHeal(bot)) {
|
||||||
distance = rand_norm() * 5 + 20.0f;
|
distance = 30.0f;
|
||||||
} else {
|
} else {
|
||||||
distance = rand_norm() * 10;
|
distance = 5.0f;
|
||||||
}
|
|
||||||
if (MoveTo(NAXX_MAP_ID, helper.center.first + cos(angle) * distance, helper.center.second + sin(angle) * distance, helper.GENERIC_HEIGHT)) {
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
return MoveTo(NAXX_MAP_ID, helper.center.first + cos(angle) * distance, helper.center.second + sin(angle) * distance, helper.GENERIC_HEIGHT);
|
||||||
} else {
|
} else {
|
||||||
std::vector<float> dest;
|
std::vector<float> dest;
|
||||||
if (helper.FindPosToAvoidChill(dest)) {
|
if (helper.FindPosToAvoidChill(dest)) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#define _PLAYERBOT_HEALSHAMANSTRATEGY_H
|
#define _PLAYERBOT_HEALSHAMANSTRATEGY_H
|
||||||
|
|
||||||
#include "GenericShamanStrategy.h"
|
#include "GenericShamanStrategy.h"
|
||||||
|
#include "Strategy.h"
|
||||||
|
|
||||||
class PlayerbotAI;
|
class PlayerbotAI;
|
||||||
|
|
||||||
@@ -16,7 +17,7 @@ class HealShamanStrategy : public GenericShamanStrategy
|
|||||||
|
|
||||||
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
void InitTriggers(std::vector<TriggerNode*>& triggers) override;
|
||||||
std::string const getName() override { return "heal"; }
|
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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user