8949 Commits

Author SHA1 Message Date
hg
3f4ea66ea1 Implement expedition locking
Disables the ability to add new members

Adds Expedition::SetLocked(bool) to quest api

Adds is_locked column to expedition_details db table
2020-12-30 18:47:08 -05:00
hg
5ddb62e275 Make adding replay timers to new members optional
Not all expeditions with a replay timer lockout add it to newly
added members automatically

This adds the Expedition::SetReplayLockoutOnMemberJoin(bool) method
to the quest api so it can be disabled
2020-12-30 18:47:08 -05:00
hg
a7795eda5d Change expedition tables to latin1_swedish_ci
Fixes insertion in MySQL older than 5.7.7 and MariaDB older than 10.2.2
that limit indexes to 767 bytes. This may be a temporary fix until
future refactoring
2020-12-30 18:47:08 -05:00
hg
aee3e1084c Fix missing invite failure messages 2020-12-30 18:47:08 -05:00
hg
39fad0c1a0 Remove unused ExpeditionMemberStatus Lua constants 2020-12-30 18:47:08 -05:00
hg
32cc2d66dd Use stl algorithms for expedition member searches 2020-12-30 18:47:08 -05:00
hg
780cf148fa Use built-in benchmarking for expedition caching 2020-12-30 18:47:08 -05:00
hg
8c1f556f29 Rename #dz cache to #dz expedition
Add expedition's remaining dz time to expedition list

Move #dz destroy to a #dz expedition subcommand

Add success or failure messages to destroy command
2020-12-30 18:47:08 -05:00
hg
c9504452e1 Add #dzkickplayers command for pre-RoF clients
Performs "/kickplayers exp" for older clients without the command
2020-12-30 18:47:07 -05:00
hg
528b74109e 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-12-30 18:47:07 -05:00
hg
89c6d1e258 Send expedition re-invite to clients that zone
Moves expedition message handling in world to Expedition method
for messages that need special handling
2020-12-30 18:47:07 -05:00
hg
50f9a49911 Check for empty expedition via database not cache
Checking the cache on member removal here isn't reliable due to race
with cross zone message

If a zone removes a member at the same time as another zone, neither zone
can know if the expedition will be empty via cache unless it processes the
world message from the other zone's member removal first.
2020-12-30 18:47:07 -05:00
hg
cc0c5afd00 Add alternative CreateExpedition api
This allows expedition creation to be passed via Lua tables

This also allows for compass, safereturn, and/or zone in location data
of dynamic zones to be set on expedition creation from lua api

Usage example:
  local instance_info = {
    "anguish", 0, 21600,
    compass = { 300, 1353.15, 1712.19, 109.001 },
    safereturn = { 300, 1349.13, 1715.00, 123.81, 0 },
    zonein = { -9, -2466, -79, 0 }
  }
  local expedition_info = { "Anguish, the Fallen Palace", 6, 54, true }
  local dz = e.other:CreateExpedition(instance_info, expedition_info)
2020-12-30 18:47:07 -05:00
hg
a1b5b210dd Send client lockout update in lockout methods
Add optional client update argument to client lockout methods

This is better than requiring callers to manually send the update
2020-12-30 18:47:07 -05:00
hg
d92c0e330d Validate expedition invite response server side
Stores expedition invite data on client
2020-12-30 18:47:07 -05:00
hg
43963783db Add instance time remaining to #dz list output 2020-12-30 18:47:07 -05:00
hg
11181190ee 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-12-30 18:47:07 -05:00
hg
af766dd323 Move LoadAllClientLockouts back to a client method 2020-12-30 18:47:07 -05:00
hg
158dad052c Clear client expedition info if removed inside dz
Clears client expedition info immediately if removed inside dynamic zone

Live clears expedition info from clients removed inside a dz on the same
timer used for removals, even if the client zones before it triggers.
This is problematic to mimic and not worth the effort
2020-12-30 18:47:07 -05:00
hg
a9c65cd4b2 Filter out expired instances from #dz list
Add 'all' argument to #dz list to optionally show expired instances
2020-12-30 18:47:07 -05:00
hg
ef77b28b3f Add #dz lockouts remove command
This allows clearing a character's lockouts

Adds client RemoveAllExpeditionLockouts methods and exposes to lua api
2020-12-30 18:47:07 -05:00
hg
b116730885 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-12-30 18:47:07 -05:00
hg
78eb3be127 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-12-30 18:47:07 -05:00
hg
1819b7c23b Cache new expedition before sending client updates
Compass updates get data from the expedition cache so it needs to be
cached first.

Currently this doesn't affect anything because compass isn't sent to
CreateExpedition and has to be set post-creation. In the future this
will make the order of client messages more live accurate though
2020-12-30 18:47:07 -05:00
hg
eccc79e4ce Let dz handle client removal timers
Remove all clients inside a dz, not just those assigned to instance
2020-12-30 18:47:07 -05:00
hg
9102bb1478 Assign lockouts to all clients inside dz
This is live like and prevents possible exploiting by dropping
expedition before a lockout. Clients will continue receiving lockouts
until they leave the zone or are kicked via timer
2020-12-30 18:47:07 -05:00
hg
8eef2ae089 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-12-30 18:47:07 -05:00
hg
f74605d339 Implement Lua quest api for expeditions 2020-12-30 18:47:06 -05:00
hg
7798504641 Add expeditions sql schema file 2020-12-30 18:47:06 -05:00
hg
da067be2fa 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-12-30 18:47:06 -05:00
hg
a77f8b582e Update opcodes and packet structs for expeditions
Add and rename some opcodes

Add packet translations for expeditions

Fix OP_DzExpeditionEndsWarning opcode for RoF2

Add RoF2 OP_KickPlayers
2020-12-30 18:47:06 -05:00
Alex
51a74c23ef
quest::getspellname() and quest::getclassname() fixes/additions. (#1158)
- Update GetSpellName() to uint16.
- Add more classes to GetClassIDName().
2020-12-30 14:47:27 -06:00
Alex
c593ed6a05
Add SetRadiantCrystals() and SetEbonCrystals() to Perl/Lua. (#1159)
- Add $client->SetRadiantCrystals(value) to Perl.
- Add $client->SetEbonCrystals(value) to Perl.
- Add client:SetRadiantCrystals(value) to Lua.
- Add client:SetEbonCrystals(value) to Lua.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2020-12-30 14:46:09 -06:00
Chris Miles
c1d7a82307
[DevTools] Improve DevTools Toggling Options (#1161)
* Improve devtools toggling

* Cleanup a few more references
2020-12-30 14:43:33 -06:00
Alex
a920d449ff
Add removeitem(item_id, quantity) to Perl/Lua. (#1156)
- Perl: quest::removeitem(item_id, quantity);
- Lua: eq.remove_item(item_id, quantity);
2020-12-29 18:21:47 -06:00
Paul Coene
21a1a7bed7
Client tracks pet sit/stand - force new pets to stand rather than use client (#1155)
Co-authored-by: Noudess <noudess@gmail.com>
2020-12-22 18:05:02 -06:00
Paul Coene
8a0f242fc6
Added RACE_BOAT_533 to IsBoat() (#1154)
Co-authored-by: Noudess <noudess@gmail.com>
2020-12-22 14:45:17 -06:00
Michael Cook (mackal)
4ec9ccae98
Merge pull request #1153 from thalix1337/master
Fix for Feature/underworld, typo in SQL
2020-12-22 12:56:09 -05:00
thalix1337
cc344ac98a Fix for Feature/underworld, typo in SQL 2020-12-22 18:06:26 +01:00
Michael Cook (mackal)
69a8507908
Feature/underworld (#1146)
* Update NewZone_Structs

* Update packet translators for NewZone_Struct

* Add OP_UnderWorld OPcodes

These aren't implemented yet, but I thought it would be good to document
them. This sends up just entity ID and location when you fall
underworld. This could possibly be used to check for someone screwing
with zone data locally to warp or something I guess.

* Add database fields
2020-12-21 17:08:04 -06:00
Thalic
f87662f676
Minor ortographic corrections of ruletypes.h (#1147)
* Update ruletypes.h

* Update ruletypes.h
2020-12-21 17:07:45 -06:00
Paul Coene
1eb5e4a0c1
Remove the extra erroneous message (DoT landing message) at mob death if mob dies of DoT. (#1138)
* Removed the erroneous message of a DoT "landing" when a mob dies from that DoT

* Set spell=-1 on Death struct for NPCs.  It was causing extra DoT msg.

* Remove whitespace

Co-authored-by: Noudess <noudess@gmail.com>
2020-12-21 17:07:15 -06:00
neckkola
a1cc68d214
Added new Perl/LUA GetSpellIDByBookSlot (#1151)
Added a new questAPI GetSpellIDByBookSlot to allow for sorting spellbooks by various attributes (level, type, etc).  Allows to determine which spell is in what book slot.
2020-12-21 17:06:48 -06:00
Alex
c6d4d8f291
Merge pull request #1148 from noudess/waterroam
Destination check needed to be actual ground z at loc.  -15 wasnt enough
2020-12-13 16:38:55 -08:00
Noudess
fff53fc465 Destination check needed to be actual ground z at loc. -15 wasnt enough 2020-12-13 10:17:04 -05:00
Chris Miles
5a4c651d6b
Drone Build Pipeline (#1144)
* Create drone config

* Tweak config

* Update .drone.yml

* Garbage commit to run another build

* Bring cores down

* Fix formatting from https://github.com/EQEmu/Server/pull/1142

* Add tests line

* Change directory to build before running the unit tests

* Remove tests dir

* Avoid double build on PR's

* Testing build settings
2020-12-07 22:36:59 -06:00
Alex
ff4c9e1e70
Merge pull request #1142 from noudess/waterroam
Allow water based roamboxes again.
2020-12-07 14:07:59 -08:00
Noudess
8bc60acd77 Fix so roamboxes allow water boxes again. 2020-12-07 11:10:59 -05:00
E Spause
f26b3195c9
Add safeguard for issue with mobs pathing to 0,0,0 on teleport nodes with values 0,0,0 (#1140)
* IP limit and account session limit refactor - uses responses built into loginserver

* Fix an issue where teleport nodes with 0.0f as a value were added to routes when pathing.
2020-12-05 15:15:53 -06:00
Michael Cook (mackal)
31019b8832
Merge pull request #1137 from EQEmu/bug_fix/rest_timer
Save the rest_timer sooner to prevent issues
2020-11-22 14:35:24 -05:00