3099 Commits

Author SHA1 Message Date
Aeadoin
bf43bda1e2
[Bots] Cleanup Bot Spell Functions, reduce reliance on NPC Functions/Attributes (#2495)
* [Bots] Initial Cleanup of Functions, moved Bot Casting out of mob_ai.cpp

* Moved Bots off NPC AI_Spells Struct, and AI_Spells private attribute.

* Formatting Fixes, fixed LogAI entries, Added LogAIModerate Alias

* Add Constants.

* Added Bot DB Struct, fixed some potential casting issues

* Formatting

* Formatting
2022-10-29 16:38:15 -04:00
Kinglykrab
7abb02655d
[Rules] Add Toggle for Warrior Shielding (#2496)
This adds a toggle to disable the Warrior shielding ability. This will not stop the client-side message from sending when you do not have a target, but it will keep the ability from doing anything.
2022-10-22 14:59:52 -05:00
Coreidan
221140c3c5
[Doors] Fix Neriak PoK Stone (#2486)
* [Doors] Fix Neriak PoK Stone

This augments the recent zone version heading changes where the doors for Neriak need to be corrected. The client version mask was incorrect and the locations were incorrect for the client.  Tested in my sandbox.

* [Doors] Change Misty PoK Stone Destination To Old Zone

Code fix #2482 changed Misty PoK Stone destination to the new misty zone.  This needed to be changed back to the old zone.  Zone destination was modified along with destination coordinates.

Co-authored-by: chrisjezorek <chris@jezoreksolutions.com>
2022-10-15 15:18:12 -05:00
Chris Miles
7092183103
[Crash] Stability Fixes (#2489)
* Input sanitation for #zone

* Update zone.cpp

* Update clientlist.cpp

* Test

* Test

* Remove logging, revert /who all code

* Remove log

* Update clientlist.cpp
2022-10-15 15:17:50 -05:00
Akkadius
05723ad1e8 [Hotfix] Return weather_type_map 2022-10-14 17:57:55 -05:00
Chris Miles
4c7a625d7c
[Doors] Fix Misty PoK Stone (#2482) 2022-10-13 21:03:15 -05:00
Kinglykrab
0240a9cc76
[Quest API] Add IsRaining() and IsSnowing() to Perl/Lua. (#2477)
* [Quest API] Add IsRaining() and IsSnowing() to Perl/Lua.

- Add quest::IsRaining() to Perl.
- Add quest::IsSnowing() to Perl.
- Add eq.is_raining() to Lua.
- Add eq.is_snowing() to Lua.

This will allow server operators to tell if a zone is currently raining, snowing, or neither.

* Remove unnecessary quest manager stuff.

* Added constants and cleaned up #weather command

* Revert "Added constants and cleaned up #weather command"

This reverts commit 2ec85304b7407bbd4acfcc0dd7e1e5710f7bce8f.

* Revert "Revert "Added constants and cleaned up #weather command""

This reverts commit 76f4e411b6239aec9e6c8945ede0656e5e2ad9c1.

* Delete settings.json

* Update zone.cpp
2022-10-13 20:59:55 -05:00
Aeadoin
eb02525d36
[Feature] Add Support for "Show Mine Only" Filters (#2484)
* [Feature] Add Support for "Show Mine Only" Filters

* Added "Show Mine Only" support for HoTs

* remove this-> as it's implied.
2022-10-12 20:39:53 -05:00
Michael
d7097e84ff
[Feature] AA Cap Limit (#2423)
* [Feature] AA Cap Limit

Will force unused AA points to the cap if they exceed the cap. Will also force AA Percentage to 0%. NOTE: The variable, UnusedAAPointCap, should NOT be lowered once implemented without first checking the DB for how many Unused AAs people have.  The next time they gain any EXP, it WILL drop them to cap.  Also, PCs should be given warning prior to this patch going to Live, to ensure they have a chance to spend any AAs above the cap, else they will lose them.

* Fix formatting on strings

* Fixes

* Change ConvertArray to fmt

* Fix formating and >= 0 aa_cap per review
2022-10-12 20:14:44 -05:00
Aeadoin
a9e218acfa
[Feature] Soft Delete Bots on Character Soft Delete (#2467)
* [Feature] Soft Delete Bots on Character SoftDelete

* Moved Bot Soft Delete logic to be inline with SoftDeletes rule.

* Update from feedback

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-10-12 20:12:29 -05:00
Kinglykrab
267d73ca27
[Tasks] Use zone currencies instead of hard-coded enum. (#2459) 2022-09-28 22:20:07 -05:00
Chris Miles
74dfc1ae3c
[Database] Add fallback migration for logsys columns (#2457) 2022-09-28 21:02:51 -05:00
Chris Miles
f357361474
[Logging] Add stack trace in code paths that shouldn't occur (#2453)
* [Logging] Add stack trace in code paths that shouldn't occur

* Update zone_store.cpp

* Windows workaround
2022-09-28 13:32:39 -05:00
Chris Miles
f8e7576ae7
[File Paths] Implement Path Manager (#2440)
* Push up branch for testing

* Path manager

* Tweaks

* Changes

* More path work

* Update paths for eqemu_server.pl

* More path work

* Import and export client files

* Path remove

* More path work

* Update eqemu_config.h

* Fix tests

* Tests disable temp

* Update eqemu_config.h

* Update .drone.yml

* Hook tests back up

* Update main.cpp

* Platform tests

* Fix include

* Use std::filesystem on windows

* Fix IPCMutex name on windows

* std::filesystem changes

* Update path_manager.cpp

* Explicit string cast

* Explicit string cast

* Update path_manager.cpp

* Windows fixes

* Mapped files

* Relative fixes

* Use relative paths off of cwd

* Update Debian image to Debian 11 (updates GCC)

Co-authored-by: hg <4683435+hgtw@users.noreply.github.com>
2022-09-28 04:08:59 -05:00
Chris Miles
19791195e5
[Logging] Netcode Logging Unify (#2443)
* [Logging] Unify netcode logging

* More tweaks, generator

* Exclude OP_SpecialMesg at callback level

* Consolidate packet loggers

* Log at EQStream level instead of proxy

* Fix C->S

* Server to server logging

* C-S for Loginserver

* Hook UCS for C->S

* Update eqemu_logsys.h

* World C->S logging

* Translate opcodes through patch system for client to server

* Additional logging requests

* Add detailed opcode translation logging

* vStringFormat resiliency

* Translate loginserver C->S

* Simplify out message string (reduce copies) and ignore legacy formats

* Update eqemu_logsys.cpp

* Log file format

* Handle deprecated categories
2022-09-28 03:42:09 -05:00
Chris Miles
7ac8fe17e5
[Library] Bump httplib to 0.11.2 (#2442) 2022-09-28 03:03:23 -05:00
hg
e883703b2f
[Tasks] Schema simplification (#2449)
* Combine task_activity item and npc fields

This will make tooling easier.

While denormalizing goallists may not be ideal, it decouples tasks from
rewards which share the table and removes a redundant column in favor
of a using the delimited string which better matches live packet data.

* [Tasks] Deprecate goallists table, migrate reward goal lists, simplify logic

* Update 2022_09_25_task_concat_matchlists.sql

* Update 2022_09_25_task_concat_matchlists.sql

* Tweaks

* Fix reward column name in conversion script

* Task reward stacking

* Update task_client_state.cpp

* Implement stack counts

* Fix reward item instance memory leak

* Validate reward item instance

* Fix item reward message

* Fix findtask

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-09-28 02:31:05 -05:00
Chris Miles
78a9de124e
[Command] Fix #copycharacter command crash (#2446) 2022-09-25 13:00:25 -04:00
Aeadoin
b2a73dc572
[Feature] Add Type 49545 to Spell Resistrictions (#2436) 2022-09-20 09:06:23 -04:00
hg
2c9fe4f2b8
[Tasks] Add rule to update multiple task elements (#2427)
On live if a task update would affect multiple elements, only the first
one gets updated. This was added as part of the changes in 7482cfc0.

Setting `UpdateOneElementPerTask` to false will restore the old behavior
that increments all active elements matching the task update criteria.
2022-09-06 12:42:45 -04:00
Michael Cook (mackal)
73f310d098
I guess we'll go plural (#2425) 2022-09-05 10:54:33 -04:00
Chris Miles
78d4bd464e
[Zone Points] Fix zone point heading data (#2415)
* [Zone Points] Fix zone point heading data

* Update 2022_09_03_fix_zone_point_heading_data.sql

* Augment #showzonepoints with saylinks

* Add more heading fixes to zone points

* Account for 999 target_heading

* Add zone safe headings
2022-09-05 04:08:34 -05:00
Chris Miles
186c2fe2ae
[Doors] Fix door target zone heading data (#2414)
* [Doors] Fix door target zone heading

* Fix even more doors that were wrong to be accurate to live

* Update version.h
2022-09-05 04:06:39 -05:00
Chris Miles
5250b819fa
[Character Starting Points] Fix headings data (#2413)
* [Character Starting Points] Fix headings

* Update version.h

Co-authored-by: Michael Cook (mackal) <277429+mackal@users.noreply.github.com>
2022-09-05 04:02:47 -05:00
Akkadius
da4bcbf736 [Hotfix] Faction associations file naming / lock consistency 2022-09-05 00:10:21 -05:00
Michael Cook (mackal)
5e9a9e8afe
[Bug Fix] Shared Memory Faction Association Typo (#2419) 2022-09-03 12:08:40 -04:00
Michael Cook (mackal)
2b4e555eae
[Feature] Faction Association (#2408)
* Add faction logging category

Probably should use this for more things

* Add FactionAssociation struct

This is simply just a struct that contains an array of faction ids and
multiplier. This can hold a maximum of 10 entries (Seru hit is 8, so 2
extra) this can be raised if need be.

* Add database changes and other data point changes

This is all the database changes and loading changes

Included is an optional SQL that will be used as a starting point, there
is likely errors or typos, but we will fix those as they are discovered.

* Add Client::RewardFaction function

This just takes the faction ID and the magnitude of the primary faction
hit and calculates the rest.

The minimum change will be either 1 or -1. We stop processing after we
see an ID of 0 and assume there will be no later entries.

The primary faction ID will always receive a hit even if there is no
faction association entries

* Add users of RewardFaction to NPC death, tasks, and QuestRewards

This will only use the new system if the magnitude is set, otherwise we
will just use the old system still

* Add quest system calls and lua QuestReward support

* Add #factionassociation command

This just calls RewardFaction, mostly useful for debugging
2022-09-03 10:57:55 -04:00
hg
efe1879115
[Tasks] Change zone task data container (#2410)
This allows removal of the task id limit (MAXTASKS)

There's some suspect places task data isn't verified but left unchanged

If memory use becomes too high once more live data is added tasks can be
stored in shared memory instead
2022-09-03 03:33:49 -05:00
Chris Miles
ec857cefae
[Zoning] Fix zoning logic issues (#2412)
* [Zoning] Fix various zoning issues, flag logic, #zone etc

* Enforce character restrictions later in the connection process so we don't end up in a loop race condition in world
2022-09-03 00:57:57 -05:00
hg
034667f03b
[Bug Fix] Avoid erase in discord queue range loop (#2411)
Erasing from the map inside the range loop invalidated the iterator used
internally by the loop. This caused ucs access violations under msvc
debug builds when a discord logging category was enabled.
2022-09-02 21:49:14 -05:00
hg
7482cfc066
[Tasks] Replace task goals with explicit fields (#2402)
The task goal system made implementing tasks a little confusing since
the goal could be ambiguous depending on type. This also didn't support
filtering on multiple goals (e.g. looting items from matching npc names
inside an area). Deliver types could specify an npc id in `delivertonpc`
but the database may have multiple npcs with the same name or a task
might want to match partial npc names.

This replaces goalids with explicit fields for npcs, items, proximity
areas, and touch switch ids. These changes make managing task data
easier without needing to update multiple tables and allows filtering
task updates by multiple criteria. To mitigate any performance impact
from merging task proximities, only clients with explore tasks in the
current zone are checked during client movement updates.

Items and npcs still support goallists but it would be possible to
denormalize entries into delimited strings to combine with the match
lists. This would also decouple task goals from reward lists.

The client task update functions were refactored to run through a single
filtering function which significantly reduces duplicated code from the
legacy task system. This will also make it easier to later implement
any unhandled types.

Since the new fields will handle filtering single entries and lists
based on having values set, `goalmethod` now only distinguishes quest
controlled from source controlled.

This is a breaking api change, `taskexploredarea` has been removed
since explore ids no longer exist.
2022-09-01 19:18:21 -05:00
Chris Miles
89fdd842e1
[Code Cleanup] Zone Data Loading Refactor (#2388)
* [Code Cleanup] Zone data loading refactor

* Update client_packet.cpp

* strcpy adjustments

* Ensure safe points get reloaded properly

* Simplify GetPEQZone and getZoneShutDownDelay

* Bring in zone_store where needed

* Update client.cpp

* Signature

* Signature

* Convert helpers to using pointers

* PR comment

* Update worlddb.cpp

* Fix loading for instances

* Fix zoning with fallback as well

* Another place for instance fallback
2022-09-01 18:48:28 -05:00
Michael Cook (mackal)
6f7fa98996
[Repositories] Add more precise types to repository generator (#2391)
* Make utils/scripts/generators/repository-generator.pl aware of more
datatypes

This adds support for unsigned and more integer types. It also avoids
using parsing functions that require casting (still needed in some
cases)

Having the data types in the Repository structs better map to the types
in the database will allow us to avoid casting when we pull data out of
them. And as a benefit, assume something is wrong if we do :)

Hopefully clean up some warnings due to casting too.

Co-authored-by: Akkadius <akkadius1@gmail.com>
2022-08-31 00:04:27 -05:00
Kinglykrab
fcf01f6d87
[Commands] Add #findrecipe and #viewrecipe Commands. (#2401)
* [Commands] Add #findrecipe and #viewrecipe Commands.

- Add #findrecipe [Search Critieria] command.
- Add #viewrecipe [Recipe ID] command.
- #findrecipe will show #viewrecipe saylinks if the user has access to that command.
- #viewrecipe will show #summonitem saylinks if the user has access to that command.

* Cleanup

* Lexicon change.

* Remove unnecessary .c_str() and
2022-08-30 23:32:17 -05:00
Aeadoin
149fa54cfa
[Feature] Implement Heroic Strikethrough to NPCs (#2395)
* [Feature] Implement Heroic Strikethrough to NPCs

* Removed virtual from inline int32 GetHeroicStrikethrough()

* Fix formatting

* Removed unnecessary function
2022-08-30 23:29:41 -05:00
Michael Cook (mackal)
edda5ef811
[Utility] Add std::string_view overloads for std::from_chars (#2392)
* Add std::string_view overloads for std::from_chars

std::from_chars floating point support is still pour, so we provide some
fall backs. These fall backs currently lack error handling.

(since GCC 11 and MSVC 2019 16.4 FP support is added, clang with libc++
still doesn't support FP)

GCC's floating point support is still rather pour (performance) and
probably shouldn't be used, but we have support to if people want to
now.

Probably need more test cases ...

* Fix issue with std::chars_format define lacking

My test case for lacking FP support was clang with libc++ which defined
this enum anyways.
2022-08-30 23:13:59 -05:00
Chris Miles
786a7e2169
[Zone] Fix and simplify zone shutdown logic (#2390)
* Fix and simplify zone shutdown logic

* Add ResetShutdownTimer
2022-08-30 23:08:24 -05:00
Michael Cook (mackal)
59584a8d94
Use macro to generate correct format specifier (#2400)
Windows and Linux use different data models on 64 bit systems so "%lld"
isn't the same on them.
2022-08-28 14:38:26 -04:00
Chris Miles
c0d4dd4176
[Expansions] Zone expansion consistency changes (#2380)
* [Expansions] Zone expansion consistency changes

* Add expansion check exclusions

* Update 2022_08_19_zone_expansion_consistency.sql
2022-08-21 20:36:21 -05:00
hg
e65b61a95f
[Tasks] Implement task activity prerequisites (#2374)
Some live tasks make new elements available without requiring all
currently active ones to be completed first.

This adds the `req_activity_id` field to task activities which will mark
an element active if its required activity id is completed. If a valid
value is set then it's used instead of checking the current step.

The `step` field may still be set on rows with a valid `req_activity_id`
to specify its logical step and prevent later steps from becoming active
until completed. It's only ignored when deciding if the current element
is active.

The legacy task logic for unlocking activities was completely refactored
for this. A common method has been added so both zone and world can make
use of it to determine which elements are currently active. The previous
step system should remain unchanged.

The world logic for locking shared tasks when an element became active
did not account for "sequential" mode (all steps 0), unordered steps, or
gaps in step numbers. This also resolves that issue.
2022-08-21 19:55:19 -05:00
Chris Miles
893d53425a
[Repository] Modernize character recipe list (#2385) 2022-08-21 19:06:57 -05:00
Aeadoin
1d8dc4c8a8
[Feature] Change Mana Costs to use Signed Int (#2384) 2022-08-21 15:38:21 -04:00
Kinglykrab
b108828502
[Bug Fix] Fix Strings::Money Missing Conditions. (#2383)
Noudess pointed out we were missing CSP, CP, and SP options in these conditions.
2022-08-21 15:00:02 -04:00
Michael Cook (mackal)
3f9df40c3c
Update CURRENT_BINARY_DATABASE_VERSION (#2382)
PR #2376 didn't update it
2022-08-20 17:20:37 -04:00
Kinglykrab
59691f39d7
[Commands] Command Status Reload and Helper Method (#2377)
* [Commands] Command Status Reloading

Currently command status changes require a server restart to take effect, this will allow them to be changed and use `#reload commands` without needing a restart.

Added a helper method called GetCommandStatus() for future reference when sending command saylinks to people and making sure if they're high enough status for the command before sending the link.

* Update client.cpp

* Update command.h

* Saylink cleanup.

* Remove unnecessary packet sending.

* Revert "Remove unnecessary packet sending."

This reverts commit e7e77b83af02955e6cda97fae7901620e09f9ba1.
2022-08-20 10:23:26 -04:00
Kinglykrab
216b6ef426
[Saylinks] Convert all GM Command Saylinks to Silent Saylinks. (#2373)
* [Saylinks] Convert all GM Command Saylinks to Silent Saylinks.
- This cleans up all non-silent GM Command Saylinks that we had before due to the way they worked before. All saylinks like this should be silent now.
- Add source short hand capability for say links with same link as text.

* Defaults to r anyway.

* Spacing.
2022-08-13 20:40:22 -04:00
Chris Miles
597b041d92
[Saylinks] Add Silent helper (#2372)
* [Saylinks] Add Silent helper

* Swap out usage in door manipulation for silent saylink helper
2022-08-13 19:44:53 -04:00
Chris Miles
79285b1002
[Repositories] Add GetMaxId, Count (#2371)
* [Repositories] Add GetMaxId, Count

* Update cmake with repositories, regenerate extended repos

* Remove license from files

* Simplify receivers

* Receiver simplify remaining

* Simplify receivers final

* Pass params by const reference

* Modernize grid tables

* Remove guild members since it doesn't conform as a generatable table

* PR comment
2022-08-13 18:40:56 -05:00
Kinglykrab
8ee7759dec
[Rules] Add Rule to Enable Tells with #hideme (#2358)
With the recent changes to #hideme as of #2328, tells are disabled to hidden GMs, meaning a GM must show themselves in order to receive tells.
2022-08-04 16:41:36 -04:00
Chris Miles
5ec18709a6
[Hotfix] Remove expansion field from account for those who have it (#2357) 2022-08-01 15:07:36 -05:00