hg 20c639c872
[Tasks] Reward clients on shared task completion sync (#2306)
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
2022-07-16 15:26:48 -05:00
..
2022-07-14 02:32:35 -05:00
2021-08-31 01:24:21 -05:00
2021-10-03 13:25:49 -04:00
2022-05-09 20:49:43 -05:00
2022-05-09 20:49:43 -05:00
2022-05-09 20:49:43 -05:00
2022-05-09 20:49:43 -05:00
2022-06-10 13:52:22 -04:00
2018-11-07 21:55:12 -08:00
2022-07-04 11:19:44 -04:00
2020-04-19 04:36:39 -05:00
2020-01-31 20:25:06 -06:00