* [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
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.
* [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>
* [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
* [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
* [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>
* 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>
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.
* [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
* 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
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
* [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
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.
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.
* [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
* 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>
* [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
* 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.
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.
* [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.
* [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.