Move ClientTaskInformation to global task header

This commit is contained in:
Michael Cook (mackal) 2019-05-21 22:03:08 -04:00
parent 85a858fcd6
commit 5c1ab3b24c
3 changed files with 19 additions and 18 deletions

View File

@ -151,5 +151,20 @@ typedef enum { ActivityDeliver = 1, ActivityKill = 2, ActivityLoot = 3, Activity
ActivityTradeSkill = 6, ActivityFish = 7, ActivityForage = 8, ActivityCastOn = 9, ActivitySkillOn = 10,
ActivityTouch = 11, ActivityCollect = 13, ActivityGiveCash = 100 } ActivityType;
struct ClientActivityInformation {
int ActivityID;
int DoneCount;
ActivityState State;
bool Updated; // Flag so we know if we need to update the database
};
struct ClientTaskInformation {
int slot; // intrusive, but makes things easier :P
int TaskID;
int CurrentStep;
int AcceptedTime;
bool Updated;
ClientActivityInformation Activity[MAXACTIVITIESPERTASK];
};
#endif /* !GLOBAL_TASKS_H */

View File

@ -20,8 +20,8 @@ struct SharedTaskMember {
class SharedTask {
public:
SharedTask() : id(0), task_id(0) {}
SharedTask(int id, int task_id) : id(id), task_id(task_id) {}
SharedTask() : id(0), task_id(0), locked(false) {}
SharedTask(int id, int task_id) : id(id), task_id(task_id), locked(false) {}
~SharedTask() {}
void AddMember(std::string name, ClientListEntry *cle = nullptr, bool leader = false)
@ -39,8 +39,10 @@ public:
private:
int id; // id we have in our map
int task_id; // ID of the task we're on
bool locked;
std::string leader_name;
std::vector<SharedTaskMember> members;
ClientTaskInformation task_state; // book keeping
};
class SharedTaskManager {

View File

@ -84,22 +84,6 @@ private:
};
struct ClientActivityInformation {
int ActivityID;
int DoneCount;
ActivityState State;
bool Updated; // Flag so we know if we need to update the database
};
struct ClientTaskInformation {
int slot; // intrusive, but makes things easier :P
int TaskID;
int CurrentStep;
int AcceptedTime;
bool Updated;
ClientActivityInformation Activity[MAXACTIVITIESPERTASK];
};
struct CompletedTaskInformation {
int TaskID;
int CompletedTime;