Commit Graph

9 Commits

Author SHA1 Message Date
hg 32c69d235d Remove member history from expeditions
Expedition uuids are now used to check if characters may re-join
2020-10-07 21:55:25 -04:00
hg 6cce00ec9a Remove logging of expedition query failures
This is redundant with sql error logging. Logging the operations is
enough to determine the source of any errors
2020-10-07 21:55:24 -04:00
hg 6dcb44e6fe Store expedition duration and times as chrono
This simplifies comparisons and reduces conversions
2020-10-07 21:55:24 -04:00
hg 7e532869a0 Clear stale pending expedition lockouts
Delete pending lockouts of members on expedition creation

Delete pending lockouts when all members removed from expedition

This fixes an edge case where members could incorrectly be assigned
pending lockouts that were never cleared from the database (from a
server crash or other situation) after entering another dz.
2020-10-07 21:55:23 -04:00
hg 158d934df7 Refactor zone expedition caching
This optimizes caching all expeditions by loading dynamic zone data and
expedition members in bulk instead of for each expedition separately.
This reduces the number of queries from 1+2n to 3 total.

Expedition members are now joined in the initial query since empty
expeditions aren't cached anyway. Optional internal lockouts for all
cached expeditions are loaded in a single bulk query afterwards.

Dynamic Zone data is also loaded as a single bulk query afterwards to
simplify processing and keep dz database logic separated. It might be
worth investigating if joining dz data in the initial expeditions load
query is worth refactoring for.
2020-10-07 21:55:23 -04:00
hg ca2c1171a1 Let world shutdown dz early for empty expeditions
Since world now tracks empty expeditions it can determine when to
shutdown dynamic zone instances when the rule is enabled rather than
letting zones do it.
2020-10-07 21:55:22 -04:00
hg e822fdb9cf Only update dz expire time if reducing
Add optional UpdateExpireTime parameter

This is currently only used when an expedition becomes empty to make
dynamic zone instances shutdown earlier. For that it should only update
if new time is less than remaining time
2020-10-07 21:55:19 -04:00
hg 098176a7ed Let dz handle client removal timers
Remove all clients inside a dz, not just those assigned to instance
2020-10-07 21:55:16 -04:00
hg b8b4c5a280 Add DynamicZone class for expedition instancing
Add DynamicZone sql table schema

Add DynamicZones logging category

Modify CreateExpedition to take DynamicZone and ExpeditionRequest objects

Implement DynamicZone compass, safereturn, and zone-in coordinates.

Implement live-like DynamicZone instance kick timer for removed members

Implement updating multiple client compasses (supports existing quest compass)

fix: Send client compass update after entering zones to clear existing compass

Implement Client::MovePCDynamicZone to invoke DynamicZoneSwitchListWnd
when entering a zone where client has multiple dynamic zones assigned

Implement OP_DzChooseZoneReply handling

Add Lua api methods for expedition's associated dynamic zone

Add #dz list gm command to list current DynamicZone instances from database
2020-10-07 21:55:16 -04:00