mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-12 00:18:37 +00:00
[Shared Tasks] Implement Activity Locking (#2339)
* Add shared task element locking This adds the `lock_activity_id` field to the tasks table which will automatically lock a shared task when that element becomes active. A method was added to world analogous to zone's UnlockActivities to determine when an activity is active with respect to task steps. Also adds quest apis to manually lock or unlock a client's shared task * Add comment
This commit is contained in:
@@ -2727,3 +2727,17 @@ bool ClientTaskState::HasActiveTasks()
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ClientTaskState::LockSharedTask(Client* client, bool lock)
|
||||
{
|
||||
if (m_active_shared_task.task_id != TASKSLOTEMPTY)
|
||||
{
|
||||
ServerPacket pack(ServerOP_SharedTaskLock, sizeof(ServerSharedTaskLock_Struct));
|
||||
auto buf = reinterpret_cast<ServerSharedTaskLock_Struct*>(pack.pBuffer);
|
||||
buf->source_character_id = client->CharacterID();
|
||||
buf->task_id = m_active_shared_task.task_id;
|
||||
buf->lock = lock;
|
||||
|
||||
worldserver.SendPacket(&pack);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user