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:
Akkadius
2021-02-06 18:52:14 -06:00
parent 55d4865d36
commit ff5ea82e38
12 changed files with 4302 additions and 4229 deletions
+37
View File
@@ -0,0 +1,37 @@
#ifndef EQEMU_TASK_GOAL_LIST_MANAGER_H
#define EQEMU_TASK_GOAL_LIST_MANAGER_H
#include "tasks.h"
#include "../common/types.h"
#include <list>
#include <vector>
#include <string>
#include <algorithm>
struct TaskGoalList_Struct {
int ListID;
int Min, Max;
std::vector<int> GoalItemEntries;
};
// This is used for handling lists, loading them from the database, searching them.
// Used for lists of NPCs to kill, items to loot, etc, as well as lists of items to
// reward the player with on completion of the task.
class TaskGoalListManager {
public:
TaskGoalListManager();
~TaskGoalListManager();
bool LoadLists();
int GetListByID(int list_id);
bool IsInList(int list_id, int entry);
int GetFirstEntry(int list_id);
std::vector<int> GetListContents(int list_index);
private:
std::vector<TaskGoalList_Struct> task_goal_lists;
int goal_lists_count;
};
#endif //EQEMU_TASK_GOAL_LIST_MANAGER_H