mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-30 17:03:48 +00:00
Bot should be more consistent at doing quest +several fixes
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include "Action.h"
|
||||
#include "Object.h"
|
||||
#include "QuestDef.h"
|
||||
|
||||
class ObjectGuid;
|
||||
class Quest;
|
||||
@@ -17,25 +18,52 @@ class Object;
|
||||
|
||||
class QuestAction : public Action
|
||||
{
|
||||
public:
|
||||
QuestAction(PlayerbotAI* botAI, std::string const name) : Action(botAI, name) { }
|
||||
public:
|
||||
QuestAction(PlayerbotAI* botAI, std::string const name) : Action(botAI, name) { }
|
||||
|
||||
bool Execute(Event event) override;
|
||||
bool Execute(Event event) override;
|
||||
|
||||
protected:
|
||||
bool CompleteQuest(Player* player, uint32 entry);
|
||||
virtual void ProcessQuest(Quest const* quest, Object* questGiver) = 0;
|
||||
bool AcceptQuest(Quest const* quest, ObjectGuid questGiver);
|
||||
bool ProcessQuests(ObjectGuid questGiver);
|
||||
bool ProcessQuests(WorldObject* questGiver);
|
||||
protected:
|
||||
bool CompleteQuest(Player* player, uint32 entry);
|
||||
virtual bool ProcessQuest(Quest const* quest, Object* questGiver) = 0;
|
||||
bool AcceptQuest(Quest const* quest, ObjectGuid questGiver);
|
||||
bool ProcessQuests(ObjectGuid questGiver);
|
||||
bool ProcessQuests(WorldObject* questGiver);
|
||||
};
|
||||
|
||||
class QuestObjectiveCompletedAction : public Action
|
||||
class QuestUpdateCompleteAction : public Action
|
||||
{
|
||||
public:
|
||||
QuestObjectiveCompletedAction(PlayerbotAI* botAI) : Action(botAI, "quest objective completed") { }
|
||||
public:
|
||||
QuestUpdateCompleteAction(PlayerbotAI* ai) : Action(ai, "quest update complete") {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
bool Execute(Event event) override;
|
||||
class QuestUpdateAddKillAction : public Action
|
||||
{
|
||||
public:
|
||||
QuestUpdateAddKillAction(PlayerbotAI* ai) : Action(ai, "quest update add kill") {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class QuestUpdateAddItemAction : public Action
|
||||
{
|
||||
public:
|
||||
QuestUpdateAddItemAction(PlayerbotAI* ai) : Action(ai, "quest update add item") {}
|
||||
bool Execute(Event event) override;;
|
||||
};
|
||||
|
||||
class QuestUpdateFailedAction : public Action
|
||||
{
|
||||
public:
|
||||
QuestUpdateFailedAction(PlayerbotAI* ai) : Action(ai, "quest update failed") {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
class QuestUpdateFailedTimerAction : public Action
|
||||
{
|
||||
public:
|
||||
QuestUpdateFailedTimerAction(PlayerbotAI* ai) : Action(ai, "quest update failed timer") {}
|
||||
bool Execute(Event event) override;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user