mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 02:20:00 +01:00
106 lines
2.9 KiB
C++
106 lines
2.9 KiB
C++
#ifndef _PLAYERBOT_NEWRPGACTION_H
|
|
#define _PLAYERBOT_NEWRPGACTION_H
|
|
|
|
#include "Duration.h"
|
|
#include "MovementActions.h"
|
|
#include "NewRpgBaseAction.h"
|
|
#include "NewRpgInfo.h"
|
|
#include "NewRpgStrategy.h"
|
|
#include "Object.h"
|
|
#include "ObjectDefines.h"
|
|
#include "ObjectGuid.h"
|
|
#include "PlayerbotAI.h"
|
|
#include "QuestDef.h"
|
|
#include "TravelMgr.h"
|
|
|
|
class TellRpgStatusAction : public Action
|
|
{
|
|
public:
|
|
TellRpgStatusAction(PlayerbotAI* botAI) : Action(botAI, "rpg status") {}
|
|
|
|
bool Execute(Event event) override;
|
|
};
|
|
|
|
class StartRpgDoQuestAction : public Action
|
|
{
|
|
public:
|
|
StartRpgDoQuestAction(PlayerbotAI* botAI) : Action(botAI, "start rpg do quest") {}
|
|
|
|
bool Execute(Event event) override;
|
|
};
|
|
|
|
class NewRpgStatusUpdateAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgStatusUpdateAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg status update")
|
|
{
|
|
// int statusCount = RPG_STATUS_END - 1;
|
|
|
|
// transitionMat.resize(statusCount, std::vector<int>(statusCount, 0));
|
|
|
|
// transitionMat[RPG_IDLE][RPG_GO_GRIND] = 20;
|
|
// transitionMat[RPG_IDLE][RPG_GO_CAMP] = 15;
|
|
// transitionMat[RPG_IDLE][RPG_WANDER_NPC] = 30;
|
|
// transitionMat[RPG_IDLE][RPG_DO_QUEST] = 35;
|
|
}
|
|
bool Execute(Event event) override;
|
|
|
|
protected:
|
|
// static NewRpgStatusTransitionProb transitionMat;
|
|
const int32 statusWanderNpcDuration = 5 * 60 * 1000;
|
|
const int32 statusWanderRandomDuration = 5 * 60 * 1000;
|
|
const int32 statusRestDuration = 30 * 1000;
|
|
const int32 statusDoQuestDuration = 30 * 60 * 1000;
|
|
};
|
|
|
|
class NewRpgGoGrindAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgGoGrindAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg go grind") {}
|
|
bool Execute(Event event) override;
|
|
};
|
|
|
|
class NewRpgGoCampAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgGoCampAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg go camp") {}
|
|
bool Execute(Event event) override;
|
|
};
|
|
|
|
class NewRpgWanderRandomAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgWanderRandomAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg wander random") {}
|
|
bool Execute(Event event) override;
|
|
};
|
|
|
|
class NewRpgWanderNpcAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgWanderNpcAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg move npcs") {}
|
|
bool Execute(Event event) override;
|
|
|
|
const uint32 npcStayTime = 8 * 1000;
|
|
};
|
|
|
|
class NewRpgDoQuestAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgDoQuestAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg do quest") {}
|
|
bool Execute(Event event) override;
|
|
|
|
protected:
|
|
bool DoIncompleteQuest();
|
|
bool DoCompletedQuest();
|
|
|
|
const uint32 poiStayTime = 5 * 60 * 1000;
|
|
};
|
|
|
|
class NewRpgTravelFlightAction : public NewRpgBaseAction
|
|
{
|
|
public:
|
|
NewRpgTravelFlightAction(PlayerbotAI* botAI) : NewRpgBaseAction(botAI, "new rpg travel flight") {}
|
|
bool Execute(Event event) override;
|
|
};
|
|
|
|
#endif |