mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 12:41:30 +00:00
[Logs] Fix output for tasks in logs (#4907)
This commit is contained in:
parent
567d46c3d6
commit
687d10960a
@ -48,7 +48,7 @@ enum class SharedTaskRequestGroupType {
|
||||
struct ServerSharedTaskRequest_Struct {
|
||||
uint32 requested_character_id;
|
||||
uint32 requested_task_id;
|
||||
uint32 requested_npc_type_id; // original task logic passthrough
|
||||
uint32 requested_npc_entity_id; // original task logic passthrough
|
||||
uint32 accept_time;
|
||||
};
|
||||
|
||||
|
||||
@ -677,10 +677,10 @@ void SharedTaskManager::SendAcceptNewSharedTaskPacket(
|
||||
);
|
||||
|
||||
auto d = reinterpret_cast<ServerSharedTaskRequest_Struct *>(p->pBuffer);
|
||||
d->requested_character_id = character_id;
|
||||
d->requested_task_id = task_id;
|
||||
d->requested_npc_type_id = npc_context_id;
|
||||
d->accept_time = accept_time;
|
||||
d->requested_character_id = character_id;
|
||||
d->requested_task_id = task_id;
|
||||
d->requested_npc_entity_id = npc_context_id;
|
||||
d->accept_time = accept_time;
|
||||
|
||||
// get requested character zone server
|
||||
ClientListEntry *cle = client_list.FindCLEByCharacterID(character_id);
|
||||
|
||||
@ -24,16 +24,16 @@ void SharedTaskWorldMessaging::HandleZoneMessage(ServerPacket *pack)
|
||||
case ServerOP_SharedTaskRequest: {
|
||||
auto *r = (ServerSharedTaskRequest_Struct *) pack->pBuffer;
|
||||
LogTasksDetail(
|
||||
"[ServerOP_SharedTaskRequest] Received request from character [{}] task_id [{}] npc_type_id [{}]",
|
||||
"[ServerOP_SharedTaskRequest] Received request from character [{}] task_id [{}] npc_entity_id [{}]",
|
||||
r->requested_character_id,
|
||||
r->requested_task_id,
|
||||
r->requested_npc_type_id
|
||||
r->requested_npc_entity_id
|
||||
);
|
||||
|
||||
shared_task_manager.AttemptSharedTaskCreation(
|
||||
r->requested_task_id,
|
||||
r->requested_character_id,
|
||||
r->requested_npc_type_id
|
||||
r->requested_npc_entity_id
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -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)),
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user