mirror of
https://github.com/mod-playerbots/mod-playerbots.git
synced 2026-01-17 02:40:28 +00:00
* New rpg startup speed up and refactor * New rpg do quest * Fix invalid height in quest poi * Add quest accept and reward limitation * New rpg quest improvement * Organize quest log, reward quests and fix grind target * Quest dropped statistic and remove redundant code * Decrease grind relevance lower than loot * Fix new rpg drop quest * Go to reward quest instead of innkeeper when quest completed * Fix incorrect logic in do quest reward * Fix reset quests in factory * Fix crash on grind target value Co-authored-by: SaW <swerkhoven@outlook.com> * Fix a minor error in DoCompletedQuest * Let bots get rid of impossible quests faster * Increase loot fluency (especially for caster) * Remove seasonal quests from auto accept * Enhance quest accept condition check * Add questgiver check (limit acceptation of quest 7946) * Questgiver check and localization * Near npc fix * Fix quest item report * Add lowPriorityQuest set for quests can not be done * Improve gameobjects loot * Do complete quest * FIx move far to teleport check * Accept or reward quest from game objects * Fix possible crash in rpg game objects * Fix ChooseNpcOrGameObjectToInteract crash --------- Co-authored-by: SaW <swerkhoven@outlook.com>
77 lines
2.0 KiB
C++
77 lines
2.0 KiB
C++
/*
|
|
* 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_QUESTACTION_H
|
|
#define _PLAYERBOT_QUESTACTION_H
|
|
|
|
#include "Action.h"
|
|
#include "Object.h"
|
|
#include "QuestDef.h"
|
|
|
|
class ObjectGuid;
|
|
class Quest;
|
|
class Player;
|
|
class PlayerbotAI;
|
|
class WorldObject;
|
|
class Object;
|
|
|
|
class QuestAction : public Action
|
|
{
|
|
public:
|
|
QuestAction(PlayerbotAI* botAI, std::string const name) : Action(botAI, name) { }
|
|
bool Execute(Event event) override;
|
|
|
|
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 QuestUpdateCompleteAction : public Action
|
|
{
|
|
public:
|
|
QuestUpdateCompleteAction(PlayerbotAI* ai) : Action(ai, "quest update complete") {}
|
|
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;
|
|
};
|
|
|
|
class QuestItemPushResultAction : public Action
|
|
{
|
|
public:
|
|
QuestItemPushResultAction(PlayerbotAI* ai) : Action(ai, "quest item push result") {}
|
|
bool Execute(Event event) override;;
|
|
};
|
|
|
|
#endif
|