Rename PendSharedTask and update comment

This commit is contained in:
Michael Cook (mackal) 2019-06-08 17:38:04 -04:00
parent 577e67f4ee
commit f7c7f5646e
3 changed files with 9 additions and 6 deletions

View File

@ -1799,7 +1799,7 @@ void Client::Handle_OP_AcceptNewSharedTask(const EQApplicationPacket *app)
auto *ant = (AcceptNewSharedTask_Struct*)app->pBuffer;
if (ant->task_id > 0 && RuleB(TaskSystem, EnableTaskSystem) && taskstate)
taskstate->PendSharedTask(this, ant->task_id, ant->task_master_id);
taskstate->RequestSharedTask(this, ant->task_id, ant->task_master_id);
}
void Client::Handle_OP_AdventureInfoRequest(const EQApplicationPacket *app)

View File

@ -3375,10 +3375,13 @@ void ClientTaskState::AcceptNewTask(Client *c, int TaskID, int NPCID, bool enfor
parse->EventNPC(EVENT_TASK_ACCEPTED, npc, c, buf.c_str(), 0);
}
// This function will do a bunch of verification, then set up a pending state which will then send a request
// to world and send off requests to out of group zones to ask if they can join the task
// Once the we get all of the replies that pass, we will then assign the task
void ClientTaskState::PendSharedTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement)
/*
* This function is a proxy for OP_AccetNewSharedTask since it has to fire to
* world. We do a handful of checks on the leader, then build a packet with a
* list of all the members in our group/raid if applicable. The verification for
* the other members is done in world.
*/
void ClientTaskState::RequestSharedTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement)
{
if (!taskmanager || TaskID < 0 || TaskID >= MAXTASKS) {
c->Message(13, "Task system not functioning, or TaskID %i out of range.", TaskID);

View File

@ -180,7 +180,7 @@ public:
bool HasSlotForTask(TaskInformation *task);
// shared task related functions
void AcceptNewSharedTask(Client *c, int TaskID, int NPCID, int id, int accepted_time, std::vector<std::string> &members);
void PendSharedTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement = false);
void RequestSharedTask(Client *c, int TaskID, int NPCID, bool enforce_level_requirement = false);
inline bool HasFreeTaskSlot() { return ActiveTask.TaskID == TASKSLOTEMPTY; }