* Switch the 2 split calls to SplitString
* Nuke duplicate split in favor of SplitString #1263
* Add a test for SplitString
* Optimize SplitString
Benchmarking:
--------------------------------------------------------------
Benchmark Time CPU Iterations
--------------------------------------------------------------
bench_oldsplit 5201 ns 5201 ns 129500
bench_split 1269 ns 1269 ns 548906
This is splitting a VERY long SpecialAbilities string. This is ~75%
speed up.
* For as long as I can remember people have had issues with zoning in, facing the wrong way, and walking through a zone line.
With this we will be able to set zone's safe heading as well as preserve heading on summon (NPC or GM) and teleports between zones.
This affects several pre-existing quest methods and extends their parameters to allow for the addition of heading.
The following functions have had heading added.
Lua
- client:SetBindPoint()
- client:SetStartZone()
Perl
- $client->SetBindPoint()
- $client->SetStartZone()
- quest::rebind()
SetStartZone parameter list was fixed also.
This converts some pre-existing methods from glm::vec3() to glm::vec4() and has an overload where necessary to use a glm::vec3() method versus glm::vec4() method.
This shouldn't affect any pre-existing servers and will allow PEQ and others to document safe headings for zones properly.
* Removed possible memory leaks.
* Fix SQL.
* Fix client message.
* Fix debug log.
* Fix log message.
* Fix call in rebind overload.
* Fix floats.
* Add default to column.
* Add rule 'GM:MinStatusToBypassLockedServer'
Default Status: 100
Description: Players >= this status can log in to the server even when it is locked
* Add rule 'GM:MinStatusToBypassLockedServer'
Default Status: 100
Description: Players >= this status can log in to the server even when it is locked
Add common expedition base class
Use repository for zone and world expedition caching
World now stores members and leader as Member objects instead of ids
This improves readability of the caching methods and lets world cache
expedition dzs and members like zone. World also now caches expeditions
as unique_ptr which will be necessary for future dz callback lambdas
that capture 'this' so addresses don't change on cache vector resizes.
Using search_deliminated_string here is significantly faster than
splitting, most likely because of dynamic memory management
Some tests on my system:
----------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------
bench_split 864 ns 864 ns 807922
bench_search 35 ns 35 ns 20265205
This test was a case where the string was present somewhere in the
middle which gave a ~96% speed up
----------------------------------------------------
Benchmark Time CPU Iterations
----------------------------------------------------
bench_split 936 ns 936 ns 725518
bench_search 61 ns 61 ns 11156359
This test was when the string was not present, which will be the vast
majority of times this is actually checked, was ~93% speed up
* Added a check to stop Bard song for Mezz/Stun
* Cleaned Song stun / mezz stop
* Update client_process.cpp
* removed bard check & added else where
* code clean up
Co-authored-by: ProducerZekServer <go@away.com>
This isn't the exactly the right way, but it's behavior is much closer
to live than current for Solon's Song of the Sirens (725), the other
bard charms don't repulse due to mana cost
* Bards song with a mana cost shouldn't repulse
* Bard songs with SE_TemporaryPets shouldn't repulse
This is mostly just an issue with Vet AAs, the actually songs have a
recast, so are already handled
* SE_Familiar should be prevented as well
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
Move early empty shutdown and process rate rules to DynamicZone scope
This decouples the expired status check from expeditions into an
internal dz method that can be called by its owning system
- Add quest::GetZoneShortName(zone_id) to Perl.
- Add quest::GetZoneLongNameByID(zone_id) to Perl.
- Add eq.get_zone_id_by_name(zone_name) to Lua.
- Add eq.get_zone_short_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_id(zone_id) to Lua.
- Add eq.get_zone_long_name_by_name(zone_name) to Lua.
* Fix x/y offsets from client to reflect EQ x/y instead of boat heading x/y
* Use std version of math calls and reduce the # of calls
* Remove errant instrumentation
Co-authored-by: Noudess <noudess@gmail.com>
Use internal dz messages to process duration and location changes
Add world DynamicZone class (later this will inherit from a base)
Add FindDynamicZoneByID to get dz from zone and world system caches
Only zone requires to be linked to lua, so let's not link EVERYTHING.
There is probably more clean up we could do, but I know for a fact Lua
is only used by zone.
This probably has some measurable benefits that probably don't really
matter that much :)
Move ExpeditionLockoutTimer to common
This simplifies expedition request conflict checks and uses repository
for the queries instead of processing the query result directly.
* Update command.cpp
Fixed typo in the command description.
* Bugfix for #flymode zone crash
Bugfix for #flymode zone crash when invalid values are passed. Also, when entering #flymode without parameters, the correct syntax is now displayed.
* Changed as requested
This fixes unnecessary leader processing on mass dzquits
Also marks leader dirty for empty expeditions in case something goes
wrong (shouldn't be possible after 62e480fe)
* 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