Commit Graph

5161 Commits

Author SHA1 Message Date
hg 2f1c3b8037 Use stl algorithms for expedition member searches 2020-10-07 21:55:20 -04:00
hg f716c06ca3 Use built-in benchmarking for expedition caching 2020-10-07 21:55:20 -04:00
hg 44a6e5a63e 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-10-07 21:55:19 -04:00
hg e5e22c34d7 Add #dzkickplayers command for pre-RoF clients
Performs "/kickplayers exp" for older clients without the command
2020-10-07 21:55:19 -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 e79d03261a Send expedition re-invite to clients that zone
Moves expedition message handling in world to Expedition method
for messages that need special handling
2020-10-07 21:55:19 -04:00
hg 20bfdac7e0 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-10-07 21:55:19 -04:00
hg c93b46af8e 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-10-07 21:55:19 -04:00
hg a9a3e46aa2 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-10-07 21:55:18 -04:00
hg 26176f44fe Validate expedition invite response server side
Stores expedition invite data on client
2020-10-07 21:55:18 -04:00
hg a8184ce853 Add instance time remaining to #dz list output 2020-10-07 21:55:18 -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 d9ee19f0ea Move LoadAllClientLockouts back to a client method 2020-10-07 21:55:17 -04:00
hg 0de11ab56b 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-10-07 21:55:17 -04:00
hg 7eb6a9828e Filter out expired instances from #dz list
Add 'all' argument to #dz list to optionally show expired instances
2020-10-07 21:55:17 -04:00
hg 7e25e7b3a3 Add #dz lockouts remove command
This allows clearing a character's lockouts

Adds client RemoveAllExpeditionLockouts methods and exposes to lua api
2020-10-07 21:55:17 -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 a47546fc14 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-10-07 21:55:16 -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 3ca57dc0eb 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-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
hg 41db607d36 Implement Lua quest api for expeditions 2020-10-07 21:55:15 -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
hg e69f0b230b 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-10-07 21:55:15 -04:00
Chris Miles a4a4a2266b Merge pull request #1122 from EQEmu/bug/item_loss_message
Only UF and earlier have the CORPSE_ITEM_LOST string
2020-10-06 02:30:26 -05:00
Noudess d507222d21 Allow amphibious creatures to swim to next node of pathing. 2020-09-21 10:36:00 -04:00
Michael Cook (mackal) 32f4722c0f Only UF and earlier have the CORPSE_ITEM_LOST string
Let's not confuse players with missing messages I guess
2020-09-20 13:55:45 -04:00
Chris Miles 5e93746e8c Merge pull request #1119 from noudess/master
Fix bugged pet sit button and taunt.
2020-09-19 18:48:13 -05:00
Michael Cook (mackal) 1106e404c7 Merge pull request #1121 from EQEmu/bug_fix/pet_affinity_solo_fix
Fix issue where a group buff was casted on a solo player
2020-09-10 14:25:37 -04:00
KimLS 0e2c918479 Added alias to lua skills that don't start with a number so i can use them with typescript which don't allow identifiers starting with 0-9 2020-09-09 21:29:29 -07:00
Noudess 05dfe748d3 Use aabonuses.PetCommands instead of checking AA level 2020-09-08 19:10:48 -04:00
Noudess cd2b2c3c19 Fix indentation. 2020-09-08 16:48:09 -04:00
Michael Cook (mackal) 6f2b39792a Fix issue where a group buff was casted on a solo player
The pet affinity in this case was checking the caster's AAs not the
target's like it should
2020-09-08 15:57:17 -04:00
Noudess ff6de1938b Change older clients to default to taunting=true only for taunt eligble pets. 2020-09-03 15:38:35 -04:00
Noudess d5451c5d77 Remove left over logging. 2020-09-02 14:56:12 -04:00
Noudess 96fb156c47 Change Older clients to not use persistant taunt button & default to taunt on. 2020-09-02 14:50:51 -04:00
Noudess 56afa0404b Updates to fix taunt button on PET UI to match live behavior. 2020-09-02 12:50:11 -04:00
Noudess 29f7bc7a9c Fix bugged pet window sit button and pet sit based regen. 2020-08-31 13:39:42 -04:00
Akkadius 32407dbb56 Add rule Character:FinalExpMultiplier - Added on top of everything else, easy for setting EXP events 2020-08-21 01:04:18 -05:00
Chris Miles 482816058f Merge pull request #1113 from EQEmu/fix/ZonePoint_memleak
Fix memory leak for virtual zone line branch
2020-08-21 00:25:27 -05:00
Chris Miles 5d4a78fb3f Merge pull request #1112 from noudess/untargettable
Add check so that the 'u' key does not open a trade window with an untargettable mob.
2020-08-21 00:24:28 -05:00
Chris Miles ebea77e8ea Merge pull request #1115 from EQEmu/bugfix/command_task
Fix missing arg to client message in #task
2020-08-21 00:24:03 -05:00
Akkadius 51356610b2 Fix overflow issue with character corpse creation using the wrong struct in allocation 2020-08-21 00:23:13 -05:00
Michael Cook (mackal) 84a75f2a77 Fix missing arg to client message in #task 2020-08-19 17:13:28 -04:00
Michael Cook (mackal) 539de20a11 Fix memory leak for virtual zone line branch 2020-08-18 23:32:45 -04:00
Chris Miles b57bcced40 Merge pull request #1111 from EQEmu/bug_fix/aepcv1_mobai_distance
Fix NPC AI casting of ST_AEClientV1
2020-08-18 13:21:53 -05:00
Noudess 9ab61d4ed4 Fix so an untargettable mob is not opened for trade when client pressed the 'u'
key.  Discovered this on untargettable mobs at doors.
2020-08-18 11:15:33 -04:00
Michael Cook (mackal) f7e997fba1 Fix NPC AI casting of ST_AEClientV1
As noted, I think we do this check incorrectly, but this should work
fine and matches other similar spells, let's get it good enough first.
2020-08-17 18:04:52 -04:00
Trust bd4810351d [Aggro] PercentalHeal should be included in aggro generation
Per January 15th 2003 Patch Notes:
"NPCs will now notice Druid and Shaman Percentage Heal spells in a manner similar to traditional healing spells."

Added SE_PercetalHeal to the same CheckHealAggroAmount as SE_CurrentHP to be similar to traditional healing spells.
2020-08-16 18:32:26 -04:00