9036 Commits

Author SHA1 Message Date
splose
e8b94a11f1
[Rules] Add rule to allow you to cast invis on already invis'd players (#1361) 2021-05-24 20:29:27 -05:00
TurmoilToad
7458b5f32f
[Docs] Create CODE_OF_CONDUCT.md (#1360) 2021-05-24 20:23:50 -05:00
hg
efa245d636
[Quest API] Add write overloads to lua packet quest api (#1366)
Makes prototyping easier without having to manually track an offset

Also add GetWritePosition and SetWritePosition
2021-05-24 20:22:31 -05:00
Michael Cook (mackal)
e5b9d72b81
[Fix] Fix Spell Cast Time reduction issues (#1369)
Remove the overloads that don't make sense (bots probably doesn't make
sense either, but too lazy)

Fix the formulas

Removed the Spells:MaxCastTimeReduction rule since this is HARDCODED in
the client so it doesn't really make sense to have it as a customization
point. If you want to hack the client, change the hardcode as well I
guess.
2021-05-24 20:21:39 -05:00
Alex
93329b4b06
[Shared Bank] Add additional popup to shared bank warning message, as client-side filters can cause the message to be unseen. (#1368) 2021-05-24 20:15:37 -05:00
Michael Cook (mackal)
b65cf4c081
This skill bonus was suppose to only apply to monks with epics (#1364)
This also scales up to 280 skill, so under that, you don't get as high
of a bonus
2021-05-19 19:40:51 -04:00
Dencelle
a59ffc6e6b
[Bug Fix] EntityList::AESpell fix for Pacify / Mez (#1354)
* [Bug Fix] EntityList::AESpell fix for Pacify / Mez

this fixes AE pacify / Mez spells only landing on 4 when it shouldn't have a cap

* Update effects.cpp

added constants

* Update effects.cpp

opmization thanks to @mackal

* Update effects.cpp

this fixes the unlimited issue

* added Spells:AOEMaxTargets to rules

incase a server doesn't want there to be a absolute unlimited AOE targeting for spells

* Update ruletypes.h
2021-05-15 17:33:45 -04:00
hg
c1c2d7b302
[Dynamic Zones] Store min and max players on dz (#1355)
This starts some changes that move storage of things from expeditions to
dynamic zone class so other systems can possibly use them. This will also
make it easier to move window packet creation methods to DynamicZone.

For now these will remain on the expeditions table in the database. This
can be re-evaluated once other components are moved and seeing how other
systems may want to handle their player requirements.
2021-05-12 19:59:48 -05:00
Paul Coene
4cc24dea75
[GM Command] #list npcs Goto option now goes to higher Z if selected NPC is a boat. (#1349)
* #list npcs Goto option now goes to higher Z if npc selected is a boat.

Makes using #list npcs and using the goto button more useful when NPC is a boat, as normal Z will put you in the water.

* Use ?: instead of bool multiply

* Update command.cpp
2021-05-12 19:17:55 -05:00
hg
1f896d05ed
[Repository Generator] Fix repository generator on windows (#1353)
Remove hardcoded port
2021-05-12 19:16:29 -05:00
Michael Cook (mackal)
1f978ffd72
[Bug Fix] EntityList::AESpell was off by one (#1351)
We need to do the spell effect first, then check the limits
2021-05-12 19:13:05 -05:00
JJ
6ce273baf5
[SQL] Tweak SQL from #1339 [skip ci] (#1348) 2021-05-10 11:13:58 -05:00
Alex
e18b332414
[CLE] Reset iterator in IsAccountInGame() (#1345) 2021-05-10 01:34:40 -05:00
Paul Coene
2edda6e743
[Feature] Allow any spawn2 spawned mob to path while zone is idle if new flag is set. (#1339)
* Changes to allow any spawn2 to be marked to path even when zone is idle

* Fixed for Kingly review of PR

Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:21:43 -05:00
Paul Coene
b335568bf9
Prevent client update while on boat if boat turning (#1343)
Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:15:38 -05:00
JeffyW
0758250ad1
[Installer] $ENV support, formatting, and optimizations (#1340)
* [Installer] $ENV support

Add support for passing in installation variables instead of install_variables.txt.

In particular:
- EQEMU_SERVER_SKIP_UPDATE
- EQEMU_SERVER_SKIP_MAPS_UPDATE
Both work the same as files with the same name.

- MYSQL_DATABASE
- MYSQL_USER
- MYSQL_PASSWORD
All get read into the same $installation_variables collection, and are still overridden by any values found in installation_variables.txt

- MYSQL_HOST
Added to the list of $installation_variables, supported in installation_variables.txt, and overrides the default host for where the database lives (allowing it to be a separate container)

- MYSQL_ROOT_PASSWORD
If set, will use "root" as the user for DROP/CREATE DATABASE calls, to prevent requiring the "eq" user requiring more permission than is given by default with the MySql/MariaDB containers.

* [Installer] new_server_with_bots

Enabling bots requires both updated binaries and some database scripts.  Fetching source and compiling the code is the longest part of setting up a new server.  If you know you want bots, rather than having to do it twice, we can just accept an option to do it all at the same time.

* [Installer] Git/Source/Build optimizations

Source code is the same for bot/non-bot, so switch to a common directory for source and separate directories for build.

If the source directory already exists with a .git subfolder, rather than attempt to re-clone, instead do a git pull to still get the latest code.  Helps when using a shared volume but rebuilding containers.

* [Installer] Formatting / Cleanup

Fixed some indentation, added an existing option to the utility script output, removed some excess newlines, and moved a debug output to help identifying errors.
2021-05-10 01:15:11 -05:00
Paul Coene
843aac631b
[Bug Fix] Add debugging and fix edge case where no target for aggro mob (#1344)
Co-authored-by: Noudess <noudess@gmail.com>
2021-05-10 01:10:13 -05:00
hg
0ce7c11d36
[Expeditions] Track DZ member status in world (#1341)
World now caches and tracks member statuses so it can send them to zones
that request them on startup. Prior to this the cle would be searched in
world for every zone startup caching request, now it's only searched once
when a new expedition is created.

Bulk loading statuses removed since it would only be needed on world
startup now and likely have no clients in the client list anyway.

This also lets world choose non-linkdead members on expedition leader
changes and better detect when a leader change needs to occur
2021-05-10 01:07:19 -05:00
Alex
26d374d52a
[Quest API] Add IsRaidTarget() to Perl and Lua (#1347)
- Add $npc->IsRaidTarget() to Perl.
- Add npc:IsRaidTarget() to Lua.
2021-05-10 01:05:46 -05:00
Paul Coene
39f5949441
#grid delete was deleting the grids everywhere (#1346)
Fix to only delete correct zone grid.
2021-05-09 16:39:54 -04:00
hg
abf73947f4
[Dynamic Zones] Rename dynamic zone structs (#1327)
* Rename dz member id field

The name of the struct is enough to make this implicit

* Rename dz member enum and struct

Rename ExpeditionMember to DynamicZoneMember

Rename ExpeditionMemberStatus to DynamicZoneMemberStatus

* Rename dz window packet structs

This makes it more clear the window may be used by any dynamic zone
system not just expeditions (live missions fill the window when
player doesn't have an active expedition).

* Rename dz window packet fields
2021-04-27 18:53:56 -05:00
Michael Cook (mackal)
4358e24dab
[Bug Fix] Fix use-after-free corruption with some DB calls (#1335) 2021-04-27 18:53:34 -05:00
Michael Cook (mackal)
c063d9512e
[Rule] Add a rule to disable the Pet Resist buff (#1337)
Spells:July242002PetResists defaults to true
2021-04-27 18:52:39 -05:00
Alex
39de9c04f6
Add new experience modifiers table to GetCharacterTables() and GetPlayerTables() in database_schema.h. (#1338) 2021-04-27 18:52:00 -05:00
Alex
1637ea95cb
Fix Perl NPC GetAvoidanceRating() Perl Croak. (#1333) 2021-04-27 17:46:59 -04:00
Paul Coene
6fb687871c
Fix calls to GetSafePoints to not pass null_ptr as zonename (#1336)
* Fix calls to GetSafePoints to not pass null_ptr as zonename

* Fix GetSafePoints to check and deal will nullptr being sent as short_zone_name

* Remove unintentinal formatting change

* Fix some typos/cut-n-paste errors I assume

Co-authored-by: Noudess <noudess@gmail.com>
2021-04-27 17:21:37 -04:00
Alex
dd06033a58
Add character-specific zone-based experience modifiers. (#1326)
* Add character-specific zone-based experience modifiers.

This will allow server operators to give players individual experience modifiers (regular and AA).

Zone ID 0 will server as a global modifier for players, if no rows are found the modifier defaults to 1.0 so experience is neither increased nor decreased.

Setting a zone-specific modifier will override the zone ID 0 global modifier.

Requires a SQL update: sql/git/required/2021_04_11_character_exp_modifiers.sql

- Add quest::getaaexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_aa_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::getexpmodifierbycharid(character_id, zone_id) to Perl.
- Add eq.get_exp_modifier_by_char_id(character_id, zone_id) to Lua.
- Add quest::setaaexpmodifierbycharid(character_id, zone_id, aa_modifier) to Perl.
- Add eq.set_aa_exp_modifier_by_char_id(character_id, zone_id, aa_modifier) to Lua.
- Add quest::setexpmodifierbycharid(character_id, zone_id, exp_modifier) to Perl.
- Add eq.set_exp_modifier_by_char_id(character_id, zone_id, exp_modifier) to Lua.
- Add $client->GetAAEXPModifier(character_id, zone_id) to Perl.
- Add client:GetAAEXPModifier(character_id, zone_id) to Lua.
- Add $client->GetEXPModifier(character_id, zone_id) to Perl.
- Add client:GetEXPModifier(character_id, zone_id) to Lua.
- Add $client->SetAAEXPModifier(zone_id, aa_modifier) to Perl.
- Add client:SetAAEXPModifier(zone_id, aa_modifier) to Lua.
- Add $client->SetEXPModifier(zone_id, exp_modifier) to Perl.
- Add client:SetEXPModifier(zone_id, exp_modifier) to Lua.

* Removed unneeded [].

* Fix variable name,

* Fix variable name.

* Fix version.h.

* Rename 2021_04_11_character_exp_modifiers.sql to 2021_04_23_character_exp_modifiers.sql

* Update db_update_manifest.txt
2021-04-23 08:47:39 -04:00
Alex
13a50f7806
[Quest API] Add HTML color tag method to Perl and Lua. (#1324)
* Add HTML color tag method to Perl and Lua.
- Add quest::gethexcolorcode(color_name) to Perl.
- Add eq.get_hex_color_code(color_name) to Lua.

Full color list here: https://pastebin.com/rUYKr1ye

* Convert to static and use strcasecmp over strcmp.

Co-authored-by: Chris Miles <akkadius1@gmail.com>
2021-04-22 23:52:00 -05:00
Paul Coene
c18562b150
[Bug] Fix ignore_primary_assist. (#1323)
* [Bug] Fix ignore_primary_assist.

* Fix to continue loop instead of return

Co-authored-by: Noudess <noudess@gmail.com>
2021-04-22 23:40:17 -05:00
Michael Cook (mackal)
dba3010c89
[Strings] Split String Optimizations (#1325)
* 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.
2021-04-22 23:36:39 -05:00
Alex
00fb9bc9f9
[Bug Fix] Zone Heading for Binds, Summons, Teleports, and Zoning. (#1328)
* 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.
2021-04-22 22:49:44 -05:00
splose
5893730704
[Rules] Add rule 'GM:MinStatusToBypassLockedServer' (#1330)
* 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
2021-04-22 22:42:14 -05:00
Alex
0f23bd24cc
[Quest API] Convert Client GetLastName() method export to Mob export. (#1331) 2021-04-22 22:41:19 -05:00
Peter Rigby
324d48aa90
[Fix] Moved assigning of AISpellVar variables before AI_Start() so that any values that override the rule values will not be ignored (#1321) 2021-04-07 01:22:42 -05:00
hg
dadc1b2843
[Expeditions] Refactor expedition caching (#1315)
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.
2021-04-07 01:20:35 -05:00
Michael Cook (mackal)
0534a2c6be
Switch scheduled hot zone check to search instead of split (#1313)
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
2021-04-07 01:17:30 -05:00
RoTPvP
050e78b1b6
Added a check to stop Bard song for Mezz/Stun (#1319)
* 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>
2021-04-02 23:44:59 -04:00
Michael Cook (mackal)
084b253ff7
Hack to fix repulsable bard charms (#1320)
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
2021-04-01 14:19:47 -04:00
Michael Cook (mackal)
a9a83a2052
[Bug Fix] Misc Bard Song Fixes (#1317)
* 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
2021-04-01 14:19:29 -04:00
Akkadius
d117ce0bf2 [Hotfix] Incorrect Perl usage method (docs) 2021-03-31 00:18:43 -05:00
hg
10b1f7e1ca
Add missing includes to fix windows compile (#1314) 2021-03-29 18:09:36 -05:00
Akkadius
4ac32d89e8 [Hotfix] DB Manifest 2021-03-29 03:01:07 -05:00
Chris Miles
7aa5308f9c
[Scheduler] Event scheduler implementation (#1257)
* Event scheduler implementation

* Create 2021_02_17_server_scheduled_events.sql

* Tweak

* Remove unused event [skip ci]

* Cleanup [skip ci]

* PR adjustments

* Database manifest
2021-03-29 02:52:57 -05:00
Michael Cook (mackal)
f51bc4daaf
[Fix] Clean up Filtered/MessageString functions (#1311)
This solves the OOB issue pointed out in #1304 and cleans up the code a
bit so it should be less error prone
2021-03-29 02:18:03 -05:00
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
f5cf566fca
[Expeditions] Let dz process its expired state (#1310)
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
2021-03-28 20:43:09 -05:00
Alex
97c11a1199
[Quest API] Add new zone name methods to Perl and Lua. (#1309)
- 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.
2021-03-28 20:25:50 -05:00
Akkadius
ba64d6f494 [Installer] Swap unstable powershell download for Perl LWP::Simple call 2021-03-28 20:04:34 -05:00
Alex
410ba4b19a
[Rules] Cleanup all unused rules. (#1308) 2021-03-28 18:37:21 -05:00
Paul Coene
74076078bb
[Boats] Fix x/y offsets from client to reflect EQ x/y instead of boat heading… (#1296)
* 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>
2021-03-28 18:20:02 -05:00