* [Feature] Add support for -1 extradmgskill to allow all skills to be scaled.
- `$mob->GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.
- `statbonuses:GetSkillDamageAmount(skill_id)` now uses `-1` properly.
- `mob:GetSkillDmgAmt(skill_id)` now uses `int` instead of `uint16`.
- A `-1` value in `extradmgskill` denotes the ability to scale all skills at once.
- Consolidated `AddItemBonuses()`, `AdditiveWornBonuses()`, `CalcItemBonuses()`, and `CalcRecommendedLevelBonus()` to mob-based methods to avoid code duplication.
- Bots, NPCs, and Mercs can now use additive worn effects if the rule is enabled, as well as all other proper stat bonuses that only clients had before.
- No SQL update required to change `extradmgskill` and `extradmgamt` to `int` as they already are this type in the database, just had to adjust `item_data.h` and `shareddb.cpp`.
* Update mob.cpp
* Cleanup.
* Cleanup.
* Move #include <vector> to header.
* Add method for GetExtraDamageSkills
* fix additembonuses
* Update bonuses.cpp
* Update mob.cpp
* Out of bounds.
* Update bonuses.cpp
---------
Co-authored-by: Aeadoin <109764533+Aeadoin@users.noreply.github.com>
* [Feature] Add Item Extra Skill Damage Percent Modifier
# Notes
- Allows `Character:ItemExtraDmgCap` to be disabled if set to `-1` or lower.
- Allows operators to set `Character:ItemExtraSkillDamageCalcAsPercent` to `true` to allow skill damage for Frenzy, Backstab, Bash, Slam, Kick, and all Monk attacks to scale with a percentage based on `extradmgamt` values from items and spells.
* > 0
* [Strings] Add more number formatters
# Notes
- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.
* [Strings] Add more number formatters
- Adds `Strings::ToUnsignedInt` for `uint32` support.
- Adds `Strings::ToBigInt` for `int64` support.
- Adds `Strings::ToUnsignedBigInt` for `uint64` support.
- Adds `Strings::ToFloat` for `float` support.
- Replaces all `std::stoi` references with `Strings::ToInt`.
- Replaces all `atoi` references with `Strings::ToInt`.
- Replaces all `std::stoul` references with `Strings::ToUnsignedInt`.
- Replaces all `atoul` references with `Strings::ToUnsignedInt`.
- Replaces all `std::stoll` references with `Strings::ToBigInt`.
- Replaces all `atoll` references with `Strings::ToBigInt`.
- Replaces all `std::stoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `atoull` references with `Strings::ToUnsignedBigInt`.
- Replaces all `std::stof` references with `Strings::ToFloat`.
* Rebase cleanup
* Changes/benchmarks/tests
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* [BOT] Add 100% Hit chance if sitting while attacked.
* [BOT] Add 100% Hit chance if sitting while attacked.
* Add Mercs correctly
* Missed usage of IsSitting() in Mob::RollD20
* [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
* [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
* [Messages] Convert messages from Spells to FocusEffect where necessary.
https://github.com/EQEmu/Server/issues/837 from 2019 notes a couple places that should use Focus Effect chat type instead of Spells chat type.
* Add rule for item cast messages.
* Implement NPC per second regen
* Add hp_regen_per_second to ModifyNPCStat
* Take per second regen the rest of the way
* Add #npcedit hp_regen_per_second
* Add db migration
* [Spells] Fix for numhits type 7 counter incrementing incorrectly.
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
bot fix
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
mercs
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
remove old variable and related code.
* [Spells] Fixes for numhits type 7 counter incrementing incorrectly.
comments
Need to increase from int16 to int32 when calculating focus due it causing issues with returning spell ids for some effects which can easily be over the int16 limit. CalcAAFocus and CalcFocusEffect were doing all math in int16 also, no reason not to increase to int32.
* Implemented SPA 498 and 499
Implemented
SE_AddExtraAttackPct_1h_Primary 498 , gives your double attacks a percent chance to perform an extra attack with 1-handed primary weapon, base: chance, limit: amt attacks max: none
SE_AddExtraAttackPct_1h_Secondary 499 gives your double attacks a percent chance to perform an extra attack with 1-handed secondary weapon, base: chance, limit: amt attacks max: none
Added limit functionality to similar effect SPA 266
SPA 266 will now be calculated to take highest percent value when applying bonus. (was additive, which does not seem correct based on AA data)
* Update attack.cpp
code update
* Update bonuses.cpp
code update
* Update spdat.h
added commas
* Update spell_effects.cpp
fix to remove unknown spa message
Co-authored-by: Michael Cook (mackal) <mcook@mackal.net>
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.
* Add a std::string overload for Database::SetMQDetectionFlag
* Replace calls to MakeAnyLenString in client_packet.cpp
At least the SetMQDetectionFlag ones
* Replace MakeAnyLenString calls in client_process
At least SetMQDectectionFlag ones
* Replace MakeAnyLenString in embparser
fmtlib actually is gross here, oh well.
* Replace MakeAnyLenString in merc
* Replace MakeAnyLenString in inventory
Also if'd out an unfinished implementation of Client::GetItemLinkHash
* Replace AppendAnyLenString in zonelist
* Replace AppendAnyLenString in zonelist
* Replace MakeAnyLenString in clientlist
* Nuke MakeAnyLenString/AppendAnyLenString
* Fix formatting string in zonelist