Commit Graph

15 Commits

Author SHA1 Message Date
hg 70ab08fc54 Cleanup some expedition logging and formatting
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
2020-10-07 21:55:28 -04:00
hg 940c8fcb36 Cleanup expedition headers and unused variables
Modify some expedition and dz logging

Remove unnecessary includes in expedition sources
2020-10-07 21:55:27 -04:00
hg c280615b53 Don't log expired lockouts in expedition request
Removes logging of lockouts with timer under leeway rule
2020-10-07 21:55:27 -04:00
hg 57eaa74280 Refactor client cross zone message helpers
Remove extra cross zone message server opcode and struct. Existing
function already exists for normal messages

Group CZClientMessageString struct with other CZ structs
2020-10-07 21:55:27 -04:00
hg c7e8182cd2 Store lockouts with source expedition uuid
Add Client::GetLockoutExpeditionUUID quest api

Refactor lockout update methods to take ExpeditionLockoutTimer parameter

Fix updating expedition lockout cache for multiple AddLockout calls

Fix updating lockout duration when replacing a lockout in database

Replace lockout timer inherited flags with expedition uuid comparisons

Remove is_inherited column from expedition_lockouts table
2020-10-07 21:55:25 -04:00
hg a8af2a0216 Remove replay timer argument to CreateExpedition
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.
2020-10-07 21:55:25 -04:00
hg 49c440599d Process character lockout results in db methods 2020-10-07 21:55:23 -04:00
hg 388399f6e3 Refactor member validation in expedition 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
2020-10-07 21:55:23 -04:00
hg 8ae063f953 Ignore expired lockouts on expedition invite
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
2020-10-07 21:55:22 -04:00
hg f716c06ca3 Use built-in benchmarking for expedition caching 2020-10-07 21:55:20 -04:00
hg b8c429b8f8 Add expired lockouts leeway rule
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.
2020-10-07 21:55:18 -04:00
hg 59cd45ec39 Fix wrong group leader name in expedition requests
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.
2020-10-07 21:55:17 -04:00
hg 181973537c Add option to disable expedition conflict messages
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
2020-10-07 21:55:17 -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
hg 0a4151b7c5 Implement initial expedition system
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
2020-10-07 21:55:15 -04:00