mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-22 04:56:22 +00:00
Big update.
This commit is contained in:
57
src/strategy/actions/ReachTargetActions.h
Normal file
57
src/strategy/actions/ReachTargetActions.h
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2016+ AzerothCore <www.azerothcore.org>, released under GNU GPL v2 license, you may redistribute it and/or modify it under version 2 of the License, or (at your option), any later version.
|
||||
*/
|
||||
|
||||
#ifndef _PLAYERBOT_REACHTARGETACTIONS_H
|
||||
#define _PLAYERBOT_REACHTARGETACTIONS_H
|
||||
|
||||
#include "MovementActions.h"
|
||||
#include "GenericSpellActions.h"
|
||||
|
||||
class PlayerbotAI;
|
||||
|
||||
class ReachTargetAction : public MovementAction
|
||||
{
|
||||
public:
|
||||
ReachTargetAction(PlayerbotAI* botAI, std::string const name, float distance) : MovementAction(botAI, name), distance(distance) { }
|
||||
|
||||
bool Execute(Event event) override;
|
||||
bool isUseful() override;
|
||||
std::string const GetTargetName() override;
|
||||
|
||||
protected:
|
||||
float distance;
|
||||
};
|
||||
|
||||
class CastReachTargetSpellAction : public CastSpellAction
|
||||
{
|
||||
public:
|
||||
CastReachTargetSpellAction(PlayerbotAI* botAI, std::string const spell, float distance) : CastSpellAction(botAI, spell), distance(distance) { }
|
||||
|
||||
bool isUseful() override;
|
||||
|
||||
protected:
|
||||
float distance;
|
||||
};
|
||||
|
||||
class ReachMeleeAction : public ReachTargetAction
|
||||
{
|
||||
public:
|
||||
ReachMeleeAction(PlayerbotAI* botAI) : ReachTargetAction(botAI, "reach melee", sPlayerbotAIConfig->meleeDistance) { }
|
||||
};
|
||||
|
||||
class ReachSpellAction : public ReachTargetAction
|
||||
{
|
||||
public:
|
||||
ReachSpellAction(PlayerbotAI* botAI);
|
||||
};
|
||||
|
||||
class ReachPartyMemberToHealAction : public ReachTargetAction
|
||||
{
|
||||
public:
|
||||
ReachPartyMemberToHealAction(PlayerbotAI* botAI);
|
||||
|
||||
std::string const GetTargetName() override;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user