* Rename dz member id field
The name of the struct is enough to make this implicit
* Rename dz member enum and struct
Rename ExpeditionMember to DynamicZoneMember
Rename ExpeditionMemberStatus to DynamicZoneMemberStatus
* Rename dz window packet structs
This makes it more clear the window may be used by any dynamic zone
system not just expeditions (live missions fill the window when
player doesn't have an active expedition).
* Rename dz window packet fields
Move ExpeditionLockoutTimer to common
This simplifies expedition request conflict checks and uses repository
for the queries instead of processing the query result directly.
Add 60s to lockout times sent to clients. Lockout timers
are rounded down to the nearest minute when displayed
This replaces the lockout leeway rule with better behavior
This more accurately matches live for the new behavior introduced
in the September 16, 2020 patch. All members of a raid/group are
still checked for conflicts and the truncation is only allowed if
there are none.
It might make sense to add a rule for this since ignoring members
that would exceed the expedition max from the start makes it more
convenient to create expeditions. Members that wouldn't be added
anyway don't really need their conflicts checked.
This implements the new behavior from live's September 16, 2020
(test server's September 8, 2020) patch
Expeditions can be created even when the client's group or raid
exceeds the expedition's max player requirement. Members are added
until the max player count is reached and the rest are ignored.
Raid members are added ordered by their raid group number with
ungrouped members having the lowest priority
Rename expedition request method ValidateMembers to CanMembersJoin
Change some expedition messages to System color (live changes)
Remove logging unsanitized input
Make unsigned comparison not compare < 0
Cleanup some FormatName and string usage. Some of these strings could
probably be moved instead
Remove unnecessary expedition lookup in a world message handler
Remove extra cross zone message server opcode and struct. Existing
function already exists for normal messages
Group CZClientMessageString struct with other CZ structs
Breaking change to the current API
has_replay_timer column removed from expedition_details table
This argument is unnecessary and just creates confusion. Expedition
replay timers use a hardcoded name precisely for this purpose and
those lockouts are already being checked on creation requests.
Small cleanup of logic and unused variables
Rename LoadValidationData to LoadMembersForCreateRequest
Remove unnecessary early string building for members query
Remove unnecessary lockout expired check for leader messages
This fixes an edge case with client invites sometimes failing because
an expired lockout hasn't been removed from client yet
Clients no longer receive expired lockouts from expeditions when joining
Adds a rule for leeway with expired lockouts during creation requests
The client removes lockout timers with under 60s remaining from the
window. This allows a small leeway to compensate so players don't
request an expedition that has visually hidden lockouts.
Get group leader name from Client if possible and ask database otherwise
Group::GetLeaderName() is unreliable and broken for groups formed across
zones. The correct leader name is needed here to avoid any possible
exploits with an invalid leader bypassing lockout checks.
Add optional argument to CreateExpedition to disable conflict messages
Some live expeditions like anguish use a timeout to prevent excessive
leader conflict messages while still performing a creation request
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
Add Expeditions logging category
Add handlers for all Dynamic Zone/Expedition related opcodes
Add FormatName string_util function to format character names
Add Zone::IsZone helper method
Add cross zone MessageString support with variable parameters
Add static Client method helpers for cross zone messaging
Add #dz gm command to debug expedition cache for current zone