Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Ai/Base/ActionContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "EmoteAction.h"
#include "FishingAction.h"
#include "FollowActions.h"
#include "GenericActions.h"
#include "GenericSpellActions.h"
#include "GiveItemAction.h"
#include "GreetAction.h"
Expand All @@ -48,6 +47,7 @@
#include "NewRpgOutdoorPvP.h"
#include "NonCombatActions.h"
#include "OutfitAction.h"
#include "PetsAction.h"
#include "PositionAction.h"
#include "PullActions.h"
#include "RandomBotUpdateAction.h"
Expand Down
12 changes: 12 additions & 0 deletions src/Ai/Base/Actions/AttackAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,3 +220,15 @@ bool AttackAction::Attack(Unit* target, bool /*with_pet*/ /*true*/)
bool AttackDuelOpponentAction::isUseful() { return AI_VALUE(Unit*, "duel target"); }

bool AttackDuelOpponentAction::Execute(Event /*event*/) { return Attack(AI_VALUE(Unit*, "duel target")); }

bool MeleeAction::isUseful()
{
// do not allow if can't attack from vehicle
if (botAI->IsInVehicle() && !botAI->IsInVehicle(false, false, true))
return false;

// Do not start autoattack while prowled — let opener spells break stealth intentionally.
// Future rogue stealth implementation should use this instead:
// return !(botAI->HasAura("stealth", bot) || botAI->HasAura("prowl", bot));
return !botAI->HasAura("prowl", bot);
}
9 changes: 9 additions & 0 deletions src/Ai/Base/Actions/AttackAction.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,13 @@ class AttackDuelOpponentAction : public AttackAction
bool isUseful() override;
};

class MeleeAction : public AttackAction
{
public:
MeleeAction(PlayerbotAI* botAI) : AttackAction(botAI, "melee") {}

std::string const GetTargetName() override { return "current target"; }
bool isUseful() override;
};

#endif
232 changes: 0 additions & 232 deletions src/Ai/Base/Actions/GenericActions.cpp

This file was deleted.

47 changes: 0 additions & 47 deletions src/Ai/Base/Actions/GenericActions.h

This file was deleted.

Loading
Loading