miscs: movement, coredump fix, rndbot

This commit is contained in:
Yunfan Li
2023-08-02 16:16:56 +08:00
parent fca4d17c97
commit 46b94824e4
15 changed files with 108 additions and 53 deletions

View File

@@ -4,8 +4,14 @@
#include "HunterActions.h"
#include "Event.h"
#include "GenericSpellActions.h"
#include "Playerbots.h"
bool CastHuntersMarkAction::isUseful()
{
return CastDebuffSpellAction::isUseful();
}
bool CastViperStingAction::isUseful()
{
return AI_VALUE2(uint8, "mana", "self target") < 50 && AI_VALUE2(uint8, "mana", "current target") >= 30;

View File

@@ -11,9 +11,15 @@
class PlayerbotAI;
class Unit;
BEGIN_RANGED_SPELL_ACTION(CastHuntersMarkAction, "hunter's mark")
END_SPELL_ACTION()
// BEGIN_RANGED_SPELL_ACTION(CastHuntersMarkAction, "hunter's mark")
// END_SPELL_ACTION()
class CastHuntersMarkAction : public CastDebuffSpellAction
{
public:
CastHuntersMarkAction(PlayerbotAI* botAI) : CastDebuffSpellAction(botAI, "hunter's mark") { }
bool isUseful() override;
};
class CastAutoShotAction : public CastSpellAction
{
public:

View File

@@ -67,10 +67,10 @@ class BlackArrowTrigger : public DebuffTrigger
BlackArrowTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "black arrow", 1, true) { }
};
class HuntersMarkTrigger : public DebuffTrigger
class HuntersMarkTrigger : public DebuffOnBossTrigger
{
public:
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffTrigger(botAI, "hunter's mark") { }
HuntersMarkTrigger(PlayerbotAI* botAI) : DebuffOnBossTrigger(botAI, "hunter's mark") { }
};
class FreezingTrapTrigger : public HasCcTargetTrigger