mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-16 13:31:29 +00:00
Second pass
This commit is contained in:
parent
b7983d4c20
commit
4039cb12ba
899
zone/tasks.cpp
899
zone/tasks.cpp
File diff suppressed because it is too large
Load Diff
106
zone/tasks.h
106
zone/tasks.h
@ -269,17 +269,17 @@ public:
|
|||||||
private:
|
private:
|
||||||
bool UnlockActivities(int character_id, ClientTaskInformation &task_info);
|
bool UnlockActivities(int character_id, ClientTaskInformation &task_info);
|
||||||
void IncrementDoneCount(
|
void IncrementDoneCount(
|
||||||
Client *c,
|
Client *client,
|
||||||
TaskInformation *Task,
|
TaskInformation *task_information,
|
||||||
int TaskIndex,
|
int task_index,
|
||||||
int ActivityID,
|
int activity_id,
|
||||||
int Count = 1,
|
int count = 1,
|
||||||
bool ignore_quest_update = false
|
bool ignore_quest_update = false
|
||||||
);
|
);
|
||||||
inline ClientTaskInformation *GetClientTaskInfo(TaskType type, int index)
|
inline ClientTaskInformation *GetClientTaskInfo(TaskType task_type, int index)
|
||||||
{
|
{
|
||||||
ClientTaskInformation *info = nullptr;
|
ClientTaskInformation *info = nullptr;
|
||||||
switch (type) {
|
switch (task_type) {
|
||||||
case TaskType::Task:
|
case TaskType::Task:
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
info = &active_task;
|
info = &active_task;
|
||||||
@ -298,6 +298,7 @@ private:
|
|||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
int active_task_count;
|
int active_task_count;
|
||||||
|
|
||||||
union { // easier to loop over
|
union { // easier to loop over
|
||||||
struct {
|
struct {
|
||||||
ClientTaskInformation active_task; // only one
|
ClientTaskInformation active_task; // only one
|
||||||
@ -318,67 +319,76 @@ class TaskManager {
|
|||||||
public:
|
public:
|
||||||
TaskManager();
|
TaskManager();
|
||||||
~TaskManager();
|
~TaskManager();
|
||||||
int GetActivityCount(int TaskID);
|
int GetActivityCount(int task_id);
|
||||||
bool LoadSingleTask(int TaskID);
|
bool LoadTasks(int single_task = 0);
|
||||||
bool LoadTasks(int SingleTask = 0);
|
|
||||||
void ReloadGoalLists();
|
void ReloadGoalLists();
|
||||||
inline void LoadProximities(int ZoneID) { ProximityManager.LoadProximities(ZoneID); }
|
inline void LoadProximities(int zone_id)
|
||||||
|
{
|
||||||
|
proximity_manager.LoadProximities(zone_id);
|
||||||
|
}
|
||||||
bool LoadTaskSets();
|
bool LoadTaskSets();
|
||||||
bool LoadClientState(Client *c, ClientTaskState *state);
|
bool LoadClientState(Client *client, ClientTaskState *client_task_state);
|
||||||
bool SaveClientState(Client *c, ClientTaskState *state);
|
bool SaveClientState(Client *client, ClientTaskState *client_task_state);
|
||||||
void SendTaskSelector(Client *c, Mob *mob, int TaskCount, int *TaskList);
|
void SendTaskSelector(Client *client, Mob *mob, int task_count, int *task_list);
|
||||||
void SendTaskSelectorNew(Client *c, Mob *mob, int TaskCount, int *TaskList);
|
void SendTaskSelectorNew(Client *client, Mob *mob, int task_count, int *task_list);
|
||||||
bool ValidateLevel(int TaskID, int PlayerLevel);
|
bool ValidateLevel(int task_id, int player_level);
|
||||||
int GetTaskMinLevel(int TaskID);
|
|
||||||
int GetTaskMaxLevel(int TaskID);
|
|
||||||
std::string GetTaskName(uint32 task_id);
|
std::string GetTaskName(uint32 task_id);
|
||||||
TaskType GetTaskType(uint32 task_id);
|
TaskType GetTaskType(uint32 task_id);
|
||||||
void TaskSetSelector(Client *c, ClientTaskState *state, Mob *mob, int TaskSetID);
|
void TaskSetSelector(Client *client, ClientTaskState *client_task_state, Mob *mob, int task_set_id);
|
||||||
|
// task list provided by QuestManager (perl/lua)
|
||||||
void TaskQuestSetSelector(
|
void TaskQuestSetSelector(
|
||||||
Client *c,
|
Client *client,
|
||||||
ClientTaskState *state,
|
ClientTaskState *client_task_state,
|
||||||
Mob *mob,
|
Mob *mob,
|
||||||
int count,
|
int count,
|
||||||
int *tasks
|
int *tasks
|
||||||
); // task list provided by QuestManager (perl/lua)
|
|
||||||
void SendActiveTasksToClient(Client *c, bool TaskComplete = false);
|
|
||||||
void SendSingleActiveTaskToClient(
|
|
||||||
Client *c,
|
|
||||||
ClientTaskInformation &task_info,
|
|
||||||
bool TaskComplete,
|
|
||||||
bool BringUpTaskJournal = false
|
|
||||||
);
|
);
|
||||||
void SendTaskActivityShort(Client *c, int TaskID, int ActivityID, int ClientTaskIndex);
|
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(
|
void SendTaskActivityLong(
|
||||||
Client *c, int TaskID, int ActivityID, int ClientTaskIndex,
|
Client *client,
|
||||||
bool Optional, bool TaskComplete = false
|
int task_id,
|
||||||
|
int activity_id,
|
||||||
|
int client_task_index,
|
||||||
|
bool optional,
|
||||||
|
bool task_complete = false
|
||||||
);
|
);
|
||||||
void SendTaskActivityNew(
|
void SendTaskActivityNew(
|
||||||
Client *c, int TaskID, int ActivityID, int ClientTaskIndex,
|
Client *client,
|
||||||
bool Optional, bool TaskComplete = false
|
int task_id,
|
||||||
|
int activity_id,
|
||||||
|
int client_task_index,
|
||||||
|
bool optional,
|
||||||
|
bool task_complete = false
|
||||||
);
|
);
|
||||||
void SendCompletedTasksToClient(Client *c, ClientTaskState *state);
|
void SendCompletedTasksToClient(Client *c, ClientTaskState *client_task_state);
|
||||||
void ExplainTask(Client *c, int TaskID);
|
void ExplainTask(Client *client, int task_id);
|
||||||
int FirstTaskInSet(int TaskSet);
|
int FirstTaskInSet(int task_set);
|
||||||
int LastTaskInSet(int TaskSet);
|
int LastTaskInSet(int task_set);
|
||||||
int NextTaskInSet(int TaskSet, int TaskID);
|
int NextTaskInSet(int task_set, int task_id);
|
||||||
bool IsTaskRepeatable(int TaskID);
|
bool IsTaskRepeatable(int task_id);
|
||||||
|
|
||||||
friend class ClientTaskState;
|
friend class ClientTaskState;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TaskGoalListManager GoalListManager;
|
TaskGoalListManager goal_list_manager;
|
||||||
TaskProximityManager ProximityManager;
|
TaskProximityManager proximity_manager;
|
||||||
TaskInformation *Tasks[MAXTASKS];
|
TaskInformation *p_task_data[MAXTASKS];
|
||||||
std::vector<int> TaskSets[MAXTASKSETS];
|
std::vector<int> task_sets[MAXTASKSETS];
|
||||||
void SendActiveTaskDescription(
|
void SendActiveTaskDescription(
|
||||||
Client *c,
|
Client *client,
|
||||||
int TaskID,
|
int task_id,
|
||||||
ClientTaskInformation &task_info,
|
ClientTaskInformation &task_info,
|
||||||
int StartTime,
|
int start_time,
|
||||||
int Duration,
|
int duration,
|
||||||
bool BringUpTaskJournal = false
|
bool bring_up_task_journal = false
|
||||||
);
|
);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user