733 Commits

Author SHA1 Message Date
hg
049fe55c7f
[Expeditions] Create common dz abstract class (#1312)
This creates an abstract class in common so zone and world can share
most of the implementation. World now has access to the same dz data and
api as zone.

Rename CharacterChange to AddRemoveCharacter for clarity

Rename GetRemainingDuration to GetDurationRemaining for consistency

Move dynamic zone queries to custom repository methods
2021-03-29 02:17:36 -05:00
hg
5b74f1e756
[Expeditions] Refactor expedition requests (#1301)
Move ExpeditionLockoutTimer to common

This simplifies expedition request conflict checks and uses repository
for the queries instead of processing the query result directly.
2021-03-18 23:42:41 -05:00
hg
ee4af65268
[Expeditions] Cleanup client dz safe return methods (#1300)
This changes Zone::GetDynamicZone to return a pointer instead of a copy
and also lets DynamicZone be forward declared in zone.h
2021-03-18 23:42:20 -05:00
hg
0d12bf0b1f
[Expeditions] Store description and leader name on dz (#1294)
* Rename dynamic zone source files

* Store description and leader name on dz

Removes the DynamicZoneInfo struct used for switch list window. This
data can be stored on DynamicZone and kept updated by its owning system

* Separate create compass packet method

Cleanup MarkSingleCompassLoc
2021-03-16 00:00:55 -05:00
Akkadius
450c748299 Fix database connection pointer bucket consistency 2021-02-28 19:31:46 -06:00
Michael Cook (mackal)
7a46a6595c
[Cleanup] use std::make_unique (#1259)
* Convert common/eq_limits.cpp to use make_unique

* Convert common/net/console_server.cpp to use make_unique

* Convert common/net/servertalk_client_connection.cpp to use make_unique

* Convert common/net/servertalk_legacy_client_connection.cpp to use make_unique

* Convert common/net/servertalk_server.cpp to use make_unique

* Convert common/net/websocket_server.cpp to use make_unique

* Convert common/net/websocket_server_connection.cpp to use make_unique

* Convert common/shareddb.cpp to use make_unique

* Convert eqlaunch/worldserver.cpp to use make_unique

* Convert loginserver/server_manager.cpp to use make_unique

* Convert loginserver/world_server.cpp to use make_unique

* Convert queryserv/worldserver.cpp to use make_unique

* Convert ucs/worldserver.cpp to use make_unique

* Convert world/clientlist.cpp to use make_unique

* Convert world/expedition.cpp to use make_unique

* Convert world/launcher_link.cpp to use make_unique

* Convert world/login_server.cpp to use make_unique

* Convert world/main.cpp to use make_unique

* Convert world/ucs.cpp to use make_unique

* Convert world/web_interface.cpp to use make_unique

* Convert world/zonelist.cpp to use make_unique

* Convert world/zoneserver.cpp to use make_unique

* Convert zone/client.cpp to use make_unique

* Convert zone/corpse.cpp to use make_unique

* Convert zone/dynamiczone.cpp to use make_unique

* Convert zone/expedition.cpp to use make_unique

* Convert zone/main.cpp to use make_unique

* Convert zone/mob_ai.cpp to use make_unique

* Convert zone/mob_movement_manager.cpp to use make_unique

* Convert zone/pathfinder_nav_mesh.cpp to use make_unique

* Convert zone/worldserver.cpp to use make_unique
2021-02-23 18:30:46 -06:00
Alex
65704274cb
[Quest API] Resolves traindiscs and scribespells issues in Perl/Lua. (#1249) 2021-02-14 19:15:09 -05:00
Chris Miles
8f7702095b
Merge pull request #1228 from EQEmu/anon_afk_client
[Quest API] Add Anon/AFK methods to Perl and Lua.
2021-02-07 18:09:49 -06:00
Kinglykrab
fac9c3469f Add Anon/AFK methods to Perl and Lua. 2021-02-07 00:40:08 -05:00
Akkadius
b7983d4c20 First pass 2021-02-06 00:45:13 -06:00
Chris Miles
b74edd9dc2
Merge pull request #1196 from EQEmu/spell_lua_perl
Add new Spell methods to Perl and Lua.
2021-01-30 17:27:15 -06:00
Kinglykrab
c0129a6b8a Add new Spell methods to Perl and Lua. 2021-01-28 20:12:57 -05:00
Kinglykrab
d30593c35e Add 4 new special attacks to Perl/Lua.
- IMMUNE_DAMAGE_CLIENT (47)
Immune to all damage except NPC damage.

- IMMUNE_DAMAGE_NPC (48)
Immune to all damage except Client damage.

- IMMUNE_AGGRO_CLIENT (49)
Immune to aggro by a Client.

- IMMUNE_AGGRO_NPC (50)
Immune to aggro by an NPC, clients must attack directly to gain aggro, allows pet only boss mechanics and stuff.
2021-01-23 21:36:07 -05:00
Evan Alexander King
3fa236c2bb Add client->Fling() to Perl/Lua.
- $client->Fling(value, target_x, target_y, target_z, ignore_los, clipping) in Perl.
- client:Fling(value, target_x, target_y, target_z, ignore_los, clipping) in Lua.
2021-01-03 03:12:01 -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
54a175b3ef Cleanup unused arg in remove lockout method 2020-12-30 18:47:32 -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
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
779fc6265e Load character lockouts without looping 2020-12-30 18:47:10 -05:00
hg
6e5ca19d18 Get dz safe return from cache not db
This was loading the dz from database to get safe return data every time
a client's dz removal timer triggered

Add the Zone::GetDynamicZone() method so zones that are dz instances can
find the data from the cache of any dz systems
2020-12-30 18:47:10 -05:00
hg
cb4a117503 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-12-30 18:47:10 -05:00
hg
d61879fd3c Add character id based expedition apis
Add static expedition methods to add or remove character lockouts

Add CreateLockout static helper to ExpeditionLockoutTimer

Refactor existing character lockout removal to allow removal of lockouts
for offline characters (was only used by #dz lockouts remove command)

Fix #dz list member count
2020-12-30 18:47:10 -05:00
hg
5a826add92 Cleanup expedition headers and unused variables
Modify some expedition and dz logging

Remove unnecessary includes in expedition sources
2020-12-30 18:47:10 -05:00
hg
184ea679f2 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-12-30 18:47:09 -05:00
hg
fa21d835d9 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-12-30 18:47:09 -05:00
hg
f23ca8055f 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-12-30 18:47:09 -05:00
hg
59d10a9db3 Process character lockout results in db methods 2020-12-30 18:47:09 -05:00
hg
f9eafa52f9 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-12-30 18:47:08 -05:00
hg
4284624096 Remove expedition includes from client header
Make quest compass a vec3 to remove include dependency

Quest compass location doesn't require a zone id since it can only be
set in the zone that it's drawn in. Drop the DynamicZoneLocation member
and forward declare to remove the dependency on header.

Move ExpeditionInvite struct to zone common header

Including expedition.h in client.h just to use the ExpeditionInvite struct
is an unnecessary header dependency that increases incremental build time.
This allows expedition classes to be forward declared in client header.
2020-12-30 18:47:08 -05:00
hg
33f2336244 Only draw dynamic zone compasses in non-instances
This fixes compasses being drawn in instances that use the same zone as compass

Also adds RemoveCompass method to quest api
2020-12-30 18:47:08 -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
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
af766dd323 Move LoadAllClientLockouts back to a client method 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
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
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
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
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
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
Michael Cook (mackal)
eb0d12f220 Save the rest_timer sooner to prevent issues
We need to save the remaining time sooner to prevent circumstances
described here:

http://www.projecteq.net/forums/index.php?threads/raid-out-of-combat-regen-timers-resetting-on-non-raid-mobs.16114/
2020-11-17 15:47:12 -05:00
Michael Cook (mackal)
60254105f1 Update the SummonItem call to default charges for QuestRewards
This should summon the item at max charges, if it has charges
2020-11-05 19:40:04 -05:00
Chris Miles
80ce499f67
Scanning Optimizations (#1133)
* Scanning optimizations this more properly applies idle / moving scanning algorithms and applies update_others when a client is moving

* Fix bots

* Perform a self and other scan when npc's pop
2020-10-25 23:01:30 -05:00
Noudess
56afa0404b Updates to fix taunt button on PET UI to match live behavior. 2020-09-02 12:50:11 -04:00
Akkadius
efdead0b0a Add expansion info 2020-08-16 01:12:30 -05:00
Akkadius
f78828216d Add support for virtual zonepoints 2020-08-16 00:06:20 -05:00
Akkadius
bda13383ef Revert "Merge pull request #1101 from KinglyKrab/custom"
This reverts commit 43108acae1ef5eb5d127226c3fc0659dbdc10b9d, reversing
changes made to daa1db65b92cb9403c48071a044cb62b458c9afd.
2020-08-03 22:21:51 -05:00