[Logs] Fix output for tasks in logs (#4907)

This commit is contained in:
JJ
2025-06-09 13:32:45 -04:00
committed by GitHub
parent 567d46c3d6
commit 687d10960a
6 changed files with 14 additions and 14 deletions
+1 -1
View File
@@ -20,7 +20,7 @@ void SharedTaskZoneMessaging::HandleWorldMessage(ServerPacket *pack)
->AcceptNewTask(
c,
(int) p->requested_task_id,
(int) p->requested_npc_type_id,
(int) p->requested_npc_entity_id,
p->accept_time
);
c->LoadClientTaskState();
+4 -4
View File
@@ -1968,7 +1968,7 @@ void ClientTaskState::RemoveTaskByTaskID(Client *client, uint32 task_id)
void ClientTaskState::AcceptNewTask(
Client *client,
int task_id,
int npc_type_id,
int npc_entity_id,
time_t accept_time,
bool enforce_level_requirement
)
@@ -2001,7 +2001,7 @@ void ClientTaskState::AcceptNewTask(
// fill
r->requested_character_id = client->CharacterID();
r->requested_task_id = task_id;
r->requested_npc_type_id = npc_type_id;
r->requested_npc_entity_id = npc_entity_id;
// send
worldserver.SendPacket(pack);
@@ -2190,11 +2190,11 @@ void ClientTaskState::AcceptNewTask(
task_manager->SaveClientState(client, this);
NPC *npc = entity_list.GetID(npc_type_id)->CastToNPC();
NPC *npc = entity_list.GetNPCByID(npc_entity_id);
if (npc) {
if (player_event_logs.IsEventEnabled(PlayerEvent::TASK_ACCEPT)) {
auto e = PlayerEvent::TaskAcceptEvent{
.npc_id = static_cast<uint32>(npc_type_id),
.npc_id = npc->GetNPCTypeID(),
.npc_name = npc->GetCleanName(),
.task_id = static_cast<uint32>(task_id),
.task_name = task_manager->GetTaskName(static_cast<uint32>(task_id)),
+1 -1
View File
@@ -42,7 +42,7 @@ public:
int GetTaskActivityDoneCount(TaskType task_type, int index, int activity_id);
int GetTaskActivityDoneCountFromTaskID(int task_id, int activity_id);
int GetTaskStartTime(TaskType task_type, int index);
void AcceptNewTask(Client *client, int task_id, int npc_type_id, time_t accept_time, bool enforce_level_requirement = false);
void AcceptNewTask(Client *client, int task_id, int npc_entity_id, time_t accept_time, bool enforce_level_requirement = false);
void FailTask(Client *client, int task_id);
int TaskTimeLeft(int task_id);
bool IsTaskCompleted(int task_id, Client *c = nullptr);