From 5c1ab3b24cbc57f28420cf6d0c352bbc2271b66a Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Tue, 21 May 2019 22:03:08 -0400 Subject: [PATCH] Move ClientTaskInformation to global task header --- common/global_tasks.h | 15 +++++++++++++++ world/shared_tasks.h | 6 ++++-- zone/tasks.h | 16 ---------------- 3 files changed, 19 insertions(+), 18 deletions(-) diff --git a/common/global_tasks.h b/common/global_tasks.h index 8c840248b..9023af54d 100644 --- a/common/global_tasks.h +++ b/common/global_tasks.h @@ -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 */ diff --git a/world/shared_tasks.h b/world/shared_tasks.h index 4bf7e1ca4..2bab5f90c 100644 --- a/world/shared_tasks.h +++ b/world/shared_tasks.h @@ -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 members; + ClientTaskInformation task_state; // book keeping }; class SharedTaskManager { diff --git a/zone/tasks.h b/zone/tasks.h index f7867364c..cba82562a 100644 --- a/zone/tasks.h +++ b/zone/tasks.h @@ -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;