mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
If a member is offline (or possibly during a race while zoning?) when the shared task is completed they will not receive the reward. On live the character receives their reward (with an updated replay timer) if they enter back into game while the shared task is still active. They keep the original replay timer if the shared task is no longer active and do not receive a reward. This makes it so clients are issued rewards (and a task completed event is dispatch) if the client's task state was out of sync with a completed shared task. To prevent characters being rewarded more than once in case of bad sync checks, a 'was_rewarded' field has been added to the character_tasks table and updated when rewards are assigned. This fixes a couple bugs so the character_activities table is correctly updated with shared task states to better detect when out of sync: - The character_activities table is now flagged to update after syncing shared task states. This table was not being updated if a client was offline or inaccessible for a shared task element update. - The character_activities table is now updated when a task element is completed. This was only being updated for activity increments and on completing the entire task. SaveClientState is now called at the end of ClientTaskState::IncrementDoneCount to cover all cases. This also has a cosmetic change to show replay timers before rewards like live, though this will not work for shared tasks until refactoring world code