252 Commits

Author SHA1 Message Date
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
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
9164073d14 Let world shutdown dz early for empty expeditions
Since world now tracks empty expeditions it can determine when to
shutdown dynamic zone instances when the rule is enabled rather than
letting zones do it.
2020-12-30 18:47:08 -05:00
hg
148af3edfc Only delete empty expeditions when the dz is empty
Zones are no longer able to delete expeditions. World now tracks empty
expeditions in cache and only deletes them when it detects an
expedition's dynamic zone instance has no more clients inside.

This fixes an exploit where lockouts couldn't be applied to expeditions
after all members were removed because zones were deleting the expedition
immediately. Clients still inside the dz were able to complete events
before being kicked from the instance while not having an expedition.

Expeditions are no longer purged from database in the world purge
instance timer to avoid a possible race with this new system
2020-12-30 18:47:08 -05:00
hg
dcbcc5a156 Implement world cache to monitor expeditions
This implements a small cache in world to track expedition states.

This fixes expired expeditions being left in zone caches unless the
expedition's dz instance was running to detect it (or unless an
expedition was deleted via a client using /kickplayers). This was also
leaving clients in a ghost expedition that no longer actually existed
2020-12-30 18:47:08 -05:00
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
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
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
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
Akkadius
758a30a080 Fix merge 2020-07-12 16:57:36 -05:00
Akkadius
3016f9409b Fix merge 2020-07-12 16:57:04 -05:00
Akkadius
8647bd73ce Merge remote-tracking branch 'origin' into integration/multi-tenancy-expansions-repository 2020-07-12 16:51:36 -05:00
Chris Miles
b801f8dfe5
Merge pull request #1092 from EQEmu/cross_zone_overhaul
Completely overhaul cross zone and world wide methods in quest API.
2020-07-07 14:15:29 -05:00
Alex
c8389bc674 Completely overhaul cross zone and world wide methods in quest API. 2020-07-07 08:02:56 -04:00
Alex
f1929c4f45 Add hot reload saylinks as well as a rule to determine if you bypass the saylinks. 2020-07-07 07:20:08 -04:00
Akkadius
b7e2261e16 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-07-07 01:32:17 -05:00
Alex
f514dd5b55 Optimize cross-zone utilities and add cross-zone player move utilities to Perl/Lua. 2020-06-29 17:54:30 -04:00
Akkadius
e03ca7f65e Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-06-29 00:40:27 -05:00
Alex
25c3d3803f Add cross-zone task assign methods to Perl/Lua. 2020-06-27 20:03:06 -04:00
Akkadius
3f62da4573 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-05-23 22:33:34 -05:00
KimLS
2fbd5aaccc Rename namespace EQEmu to namespace EQ (so we don't have two similar but different namespaces anymore) 2020-05-17 18:36:06 -07:00
Alex
5f0d3e9026 Add several cross zone methods to Perl/Lua. 2020-05-11 20:10:52 -04:00
Alex
dc9bd031ff
Merge branch 'master' into crosszonesignalplayerbygroupid 2020-05-10 21:00:43 -04:00
Alex
857b24727c Add CrossZoneMessagePlayerByGuildID() to Perl/Lua. 2020-05-10 16:52:33 -04:00
Alex
12c4b20169 Add CrossZoneSignalPlayerByGroupID() to Perl/Lua. 2020-05-09 21:15:34 -04:00
Akkadius
373fb3f0e7 Decouple zone calls, cleanup logic 2020-04-19 04:36:39 -05:00
Akkadius
a0f8bbb3b9 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-18 02:31:43 -05:00
Chris Miles
16cfad1966
UCS / Raid / Zone Fixes (#1033)
* Cache EntityList::GetRaidByClient

* Adjustments [skip ci]

* Update entity [skip ci]

* More cleanup [skip ci]

* More tweaks [skip ci]

* Cleanup [skip ci]

* Fix bugs with UCS reconnection on crash / exit, not adding soft deleted characters, put main loop on UV lib

* Reduce log spam that should be debugging; send keepalives to clients so that they properly prune from the connection list

* Shutdown the eventloop to properly shutdown the zone versus calling a hard exit
2020-04-14 23:28:43 -05:00
Akkadius
2b1b786f02 Merge branch 'master' of https://github.com/EQEmu/Server into integration/multi-tenancy-expansions-repository 2020-04-06 02:55:46 -05:00
KimLS
52d2469da2 Rewrite how zone finds ports 2020-03-21 17:05:28 -07:00
Akkadius
d360c60289 Migrate ldon traps and #hotfix [skip ci] 2020-03-12 02:40:04 -05:00
Akkadius
ca49f3902f Migrate getZoneX calls and npc types calls [skip ci] 2020-03-12 02:27:09 -05:00
Chris Miles
81ff7f5d57
Merge pull request #964 from EQEmu/feature/hot-reload
Feature - Hot Reload
2020-02-22 16:18:47 -06:00
hg
e09b0ae1e9 Let client handle consent confirmation messages to corpse owner 2020-02-02 14:37:12 -05:00
Akkadius
158d8a011f Beginning of hot reload work 2020-01-31 20:25:06 -06:00
hg
14c070f845 Use strn0cpy instead of strcpy when copying consent name buffers
Add nullptr checks to consent functions that accept char pointers
2020-01-30 20:19:54 -05:00
hg
9689787e56 Remove assignments in conditions 2020-01-29 18:34:33 -05:00
hg
63b8df72b2 Implement consent for group/raid/guild and add Auto Consent support
Refactors consent to be more live accurate

Message sent to owner and receiver for each zone a corpse is in
Corpses now store consent list instead of clients holding corpse list
Consent throttling added
Message strings and colors updated
Removed reporting invalid consent targets
2020-01-27 00:17:15 -05:00
Uleat
86593798a9 Added safety check for zone dereference in ServerOP_ReloadRules handler 2019-12-01 17:59:38 -05:00
Alex
058a722569
Revert "Revert "Build System Updated"" 2019-10-13 18:49:16 -07:00
Alex
b9f57f1f28
Revert "Build System Updated" 2019-10-12 21:07:06 -07:00
KimLS
259bce9509 Refactor zone net class (nothing to do with networking -.-) 2019-09-27 14:42:35 -07:00
Akkadius
4b61d00dfe Implement Zone -> World keepalive so that Zone reconnects to world in the case of a world crash / reset 2019-09-07 20:20:10 -05:00
Akkadius
698d6d4ed2 Logs::ZoneServer to LogInfo 2019-09-02 03:30:03 -05:00
Akkadius
af4c630ede Logs::Spells to LogSpells 2019-09-02 03:26:44 -05:00
Akkadius
1acb76bc74 More Logs::None to LogDebug 2019-09-02 03:18:12 -05:00
Akkadius
678c25e02c Simplify error logging 2019-09-01 22:05:44 -05:00
Akkadius
98cbb7d781 Simplify log calls 2019-09-01 21:04:58 -05:00