mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 15:46:37 +00:00
Split task classes into their own cpp/h files to speed up incremental compilation and make things easier to maintain
This commit is contained in:
@@ -0,0 +1,97 @@
|
||||
#ifndef EQEMU_TASK_MANAGER_H
|
||||
#define EQEMU_TASK_MANAGER_H
|
||||
|
||||
#include "tasks.h"
|
||||
#include "task_client_state.h"
|
||||
#include "task_proximity_manager.h"
|
||||
#include "task_goal_list_manager.h"
|
||||
#include "../common/types.h"
|
||||
#include <list>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <algorithm>
|
||||
|
||||
class Client;
|
||||
class Mob;
|
||||
|
||||
class TaskManager {
|
||||
|
||||
public:
|
||||
TaskManager();
|
||||
~TaskManager();
|
||||
int GetActivityCount(int task_id);
|
||||
bool LoadTasks(int single_task = 0);
|
||||
void ReloadGoalLists();
|
||||
inline void LoadProximities(int zone_id)
|
||||
{
|
||||
proximity_manager.LoadProximities(zone_id);
|
||||
}
|
||||
bool LoadTaskSets();
|
||||
bool LoadClientState(Client *client, ClientTaskState *client_task_state);
|
||||
bool SaveClientState(Client *client, ClientTaskState *client_task_state);
|
||||
void SendTaskSelector(Client *client, Mob *mob, int task_count, int *task_list);
|
||||
void SendTaskSelectorNew(Client *client, Mob *mob, int task_count, int *task_list);
|
||||
bool ValidateLevel(int task_id, int player_level);
|
||||
std::string GetTaskName(uint32 task_id);
|
||||
TaskType GetTaskType(uint32 task_id);
|
||||
void TaskSetSelector(Client *client, ClientTaskState *client_task_state, Mob *mob, int task_set_id);
|
||||
// task list provided by QuestManager (perl/lua)
|
||||
void TaskQuestSetSelector(
|
||||
Client *client,
|
||||
ClientTaskState *client_task_state,
|
||||
Mob *mob,
|
||||
int count,
|
||||
int *tasks
|
||||
);
|
||||
void SendActiveTasksToClient(Client *client, bool task_complete = false);
|
||||
void SendSingleActiveTaskToClient(
|
||||
Client *client,
|
||||
ClientTaskInformation &task_info,
|
||||
bool task_complete,
|
||||
bool bring_up_task_journal = false
|
||||
);
|
||||
void SendTaskActivityShort(Client *client, int task_id, int activity_id, int client_task_index);
|
||||
void SendTaskActivityLong(
|
||||
Client *client,
|
||||
int task_id,
|
||||
int activity_id,
|
||||
int client_task_index,
|
||||
bool optional,
|
||||
bool task_complete = false
|
||||
);
|
||||
void SendTaskActivityNew(
|
||||
Client *client,
|
||||
int task_id,
|
||||
int activity_id,
|
||||
int client_task_index,
|
||||
bool optional,
|
||||
bool task_complete = false
|
||||
);
|
||||
void SendCompletedTasksToClient(Client *c, ClientTaskState *client_task_state);
|
||||
void ExplainTask(Client *client, int task_id);
|
||||
int FirstTaskInSet(int task_set);
|
||||
int LastTaskInSet(int task_set);
|
||||
int NextTaskInSet(int task_set, int task_id);
|
||||
bool IsTaskRepeatable(int task_id);
|
||||
|
||||
friend class ClientTaskState;
|
||||
|
||||
|
||||
private:
|
||||
TaskGoalListManager goal_list_manager;
|
||||
TaskProximityManager proximity_manager;
|
||||
TaskInformation *p_task_data[MAXTASKS]{};
|
||||
std::vector<int> task_sets[MAXTASKSETS];
|
||||
void SendActiveTaskDescription(
|
||||
Client *client,
|
||||
int task_id,
|
||||
ClientTaskInformation &task_info,
|
||||
int start_time,
|
||||
int duration,
|
||||
bool bring_up_task_journal = false
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //EQEMU_TASK_MANAGER_H
|
||||
Reference in New Issue
Block a user