8949 Commits

Author SHA1 Message Date
hg
a312cd6e1d Don't sync character lockout uuid
Fixes regression that caused loot event apis to stop working
2020-12-30 18:47:33 -05:00
hg
8b2b2db848 Move offline players to dz safereturn
This is an experimental change which allows members to log in at the
safe return if they were offline when the expedition was deleted.
Prior to this they would log in at bind instead

Partially reverts commit 32c69d235d7fc8b816fa598b499be47d451ddba5
Removed expedition members are no longer hard deleted from db
2020-12-30 18:47:33 -05:00
hg
4f9eaf7574 Sync character lockouts when entering dz
This removes the is_pending column from character lockouts table

Synchronizing character lockout timers with the expedition's when zoning
into the dynamic zone simplifies adding missing lockouts to new members.
This also matches live behavior that replaces any character lockout
timers from another expedition with ones from the current expedition
2020-12-30 18:47:32 -05:00
hg
fc7d8a82e5 Sort #dz list output by dz id
Sort #dz expedition list by expedition id
2020-12-30 18:47:32 -05:00
hg
81e4bd6040 Reduce expedition member status packet updates
Only send update for expedition member status if it changes

Avoids unnecessary packets when members zone
2020-12-30 18:47:32 -05:00
hg
54a175b3ef Cleanup unused arg in remove lockout method 2020-12-30 18:47:32 -05:00
hg
738fd48163 Use id not name in dz makeleader world msg 2020-12-30 18:47:32 -05:00
hg
e5916c5c03 Add rule to enable "In Dynamic Zone" status
Live doesn't appear to ever update with this status
2020-12-30 18:47:32 -05:00
hg
1de590137f Verify new expedition leader in world
Cleanup makeleader methods

World now checks if character is expedition member instead of zone
2020-12-30 18:47:32 -05:00
hg
311042f06d Add ExpeditionMember::IsValid method 2020-12-30 18:47:32 -05:00
hg
6acfc41778 Let world handle expedition leader changes
This should eliminate race conditions caused by zones trying to set
a leader when members in different zones quit at the same time

Zone still detects when leader goes offline to trigger a change
since it's easier than having world process expedition member status
updates and perform expedition lookups
2020-12-30 18:47:32 -05:00
hg
955cbeb826 Revert "Don't set member offline before linkdead"
This reverts commit 8d27602aa0b3f766760f0952389c988f1b150de6.

This doesn't work because a linkdead leader coming back online will
toggle to offline state anyway
2020-12-30 18:47:32 -05:00
hg
6e9f920931 Add saylinks to #dz list output 2020-12-30 18:47:32 -05:00
hg
4ae9904822 Use strlen for perl hash key size 2020-12-30 18:47:32 -05:00
hg
c0b8bfde03 Fix invalid return in perl expedition api
This was returning an invalid (garbage) hash reference for
empty results when filtering on expedition name
2020-12-30 18:47:32 -05:00
hg
c09ada67d6 Add expedition lock message constants to perl 2020-12-30 18:47:32 -05:00
hg
cc5dd4cd82 Add missing expedition perl api declaration 2020-12-30 18:47:32 -05:00
hg
8708564889 Don't send info packet when new member added
It isn't necessary to send this packet to current members when a new
expedition member is added. The member list packet changes the current
player count on the window
2020-12-30 18:47:32 -05:00
hg
f506ce9d58 Reduce packet updates when expedition member added
This fixes unnecessary packets and compass updates being sent for
invited members and better matches live's packet update pattern

This also fixes duplicate updates being sent to the added member

Live only sends a MemberListName update for members added through a
swap (player count doesn't change). For members added through an
invite it sends expedition info and a full member list update

A full member list update is sent for both cases in this patch. This
is because MemberListName currently always adds members with status
"unknown". This is either due to unknown packet fields or a change
in future clients
2020-12-30 18:47:32 -05:00
hg
074b7096df Use fmt join for simple query strings 2020-12-30 18:47:32 -05:00
hg
b46eca4ec6 Store expeditions with dz id not instance id
This exposes dynamic zone ids for any future changes and will make it
easier to preserve historic dz and expedition data. This also cleans up
some dynamic zone creation for expedition requests

When purging instances the expedition table is no longer updated
since dynamic zone ids are not re-used like instance ids are

Update #dz list commands to show dz id

Add GetDynamicZoneID and get_expedition_by_dz_id quest apis
2020-12-30 18:47:32 -05:00
hg
54500b0e72 Use column aliases for expedition request query 2020-12-30 18:47:31 -05:00
hg
d2ad2ec078 Add comment to FormatName 2020-12-30 18:47:31 -05:00
hg
b85feb5461 Rename expedition packet fields 2020-12-30 18:47:31 -05:00
hg
022f82291a Rename world expedition cache to state 2020-12-30 18:47:31 -05:00
hg
579c300cbc Rename expeditions table 2020-12-30 18:47:31 -05:00
hg
0f051b68ae Separate world expedition source files 2020-12-30 18:47:31 -05:00
hg
58b3708a47 Use named args in CreateExpedition lua api
This is a breaking api change

All expedition request parameters are now passed via a single table
containing hash keyed options to define values
2020-12-30 18:47:31 -05:00
hg
b68994f25c Change all expedition tables to latin1
The lockout tables are latin1 to support older MySQL and MariaDB
versions that limit indexes
2020-12-30 18:47:31 -05:00
hg
ad51de052c Cleanup expedition perl api croak messages 2020-12-30 18:47:31 -05:00
hg
77406d7322 Add AddReplayLockoutDuration api 2020-12-30 18:47:31 -05:00
hg
3ed7215a92 Rename character expedition lockouts table 2020-12-30 18:47:31 -05:00
hg
3a1eb51890 Send lockout times with client rounding offset
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
2020-12-30 18:47:31 -05:00
hg
ca113cdd85 Let world dispatch expedition expire warnings
This depends on C++14 remaining enabled for chrono literals
2020-12-30 18:47:31 -05:00
hg
da5d4b9830 Send all members expedition expire warnings
All expedition members are notified not just those in dz

This will only work if the dz is running. It might make more sense to
move this to client or world processing so members are notified even if
the zone instance isn't running
2020-12-30 18:47:31 -05:00
hg
79287fc507 Require zone id to get expedition by instance id
This is a breaking api change
eq.get_expedition_by_instance_id(instance_id) is replaced with
eq.get_expedition_by_zone_instance(zone_id, instance_id)

This replaces the FindCachedExpeditionByInstanceID method of
obtaining expeditions via instance id with a new method that
requires the dz zone id as well
2020-12-30 18:47:31 -05:00
hg
cd98b8bc6f Only send member updates after caching dz data
This fixes characters not receiving a compass if they're already
in the compass zone when an expedition is created from another zone
2020-12-30 18:47:31 -05:00
hg
18dd9e6637 Add #dz expedition unlock command
Add expedition name and zone to #dz expedition list

Adjust #dz list output
2020-12-30 18:47:31 -05:00
hg
6266aa86a4 Add perl expedition api 2020-12-30 18:47:31 -05:00
hg
c26c6af356 Remove rule to verify expedition leader with db
This is a holdover from earlier system design and shouldn't be necessary
2020-12-30 18:47:11 -05:00
hg
a3a6e55d22 Add lockout timer multiplier rule
This allows servers to adjust all new lockout durations added
during special events like live does
2020-12-30 18:47:11 -05:00
hg
b965a165b1 Add api to update expedition expire time
Add SetSecondsRemaining method to set expire time on expedition
2020-12-30 18:47:11 -05:00
hg
2c2c2ac5ee Add api to get expedition's zone name 2020-12-30 18:47:11 -05:00
hg
cbccd72050 Truncate members after conflict checks
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.
2020-12-30 18:47:11 -05:00
hg
3db23e402c Add api to add lockout to all clients in zone 2020-12-30 18:47:11 -05:00
hg
c45840173e Load dz from cache on client switchlist reply 2020-12-30 18:47:11 -05:00
hg
76b5803f83 Let MovePCDynamicZone filter on zone version
Add client GetDynamicZones method to provide a single method to get all
associated client dynamic zones

Refactor compass update and MovePCDynamicZone to use this method
instead of searching for client dzs separately

Add optional disable message arg to MovePCDynamicZone
2020-12-30 18:47:11 -05:00
hg
b377fd183a Add api to add lockout duration
Also supports reducing lockout duration

Add Expedition::AddLockoutDuration

Add Client::AddExpeditionLockoutDuration

Some expeditions require adding to existing lockout durations
during progression. These add the specified seconds to individual
member lockout timers instead of setting a static duration based on
internal expedition lockout like UpdateLockoutDuration.
2020-12-30 18:47:11 -05:00
hg
8e52dd0579 Add expedition lock messages 2020-12-30 18:47:11 -05:00
hg
b5db40cba6 Add GetZoneVersion to expedition api 2020-12-30 18:47:11 -05:00