Timers were not properly checking their expiration time on spawn and load and could cause invalid timers to load if the server was restarted resulting in improper lockouts.
* Fixed a typo in Zoning.cpp changed reguest to request.
* Update zoning.cpp
---------
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
* [Bug Fix] Spells - Self Only (Yellow) cast when non group member is targeted
When using a Yellow gem invis spell, it should cast on yourself regardless of the targetted entity.
* Update spells.cpp
---------
Co-authored-by: Alex King <89047260+Kinglykrab@users.noreply.github.com>
When zoning or forming a raid, bots would spam their spawn message. They will now be muted.
Adds an optional argument "silent" to the ^spawn command. This will bypass ^oo spawnmessage settings and not send a spawn message. Example: ^spawn Warbot silent
This adds a flag to mobs that are told to attack by their owner to prevent unintended attacks.
Previously, if you were to send your bots to attack a target and then switch targets: before casters land their spell or if melee (especially anyone with pets) hasn't engaged before the target switch, they could switch to your new target and attack.
This adds a flag upon attack and bots will only attack flagged targets.
* [Feature] Teach npcs how to cast sacrifice
* [Feature] Teach npcs how to cast sacrifice
- Remove the hardcoded limit preventing npcs from casting sacrifice. The
npc will receive as loot an emerald essence as expected.
* Update client.cpp
* Update client_packet.cpp
* Update spell_effects.cpp
* rename Client::SacrificeCaster to Client::sacrifice_caster_id
Current version only looks at your unspent AAs, meaning if you have 2000 spent AAs and 1 unspent AA, your scaling will be based on the 1 unspent AA instead of the 2001 total AA.
Here's the original log which is custom code found in the ModernAAScalingEnabled function:
[Wed Sep 11 14:10:19 2024] [AA] [ScaleAAXPBasedOnCurrentAATotal] AA Experience Calculation: add_aaxp = 660796, Base Bonus = 256.000000, Half-Life = 64.000000, Minimum Bonus = 1.000000, Earned AA = 1, Calculated Bonus = 253.242371
Custom code looks like this:
uint64 totalWithExpMod = add_aaxp;
if (RuleB(AA, EnableLogrithmicClasslessAABonus)) {
float base_bonus = RuleR(AA, InitialLogrithmicClasslessAABonus);
float half_life = RuleR(AA, HalfLifeLogrithmicClasslessAABonus);
float min_bon = RuleR(AA, MinimumLogrithmicClasslessAABonus);
float bonus_expon = earnedAA / half_life;
float bonus = base_bonus * std::pow(0.5, bonus_expon);
Log(Logs::General,
Logs::AA,
"AA Experience Calculation: add_aaxp = %d, Base Bonus = %f, Half-Life = %f, Minimum Bonus = %f, Earned AA = %d, Calculated Bonus = %f",
add_aaxp, base_bonus, half_life, min_bon, earnedAA, bonus);
if (bonus < min_bon) bonus = min_bon;
totalWithExpMod = (uint64)(totalWithExpMod * bonus);
}
After the fix, the log becomes:
[Wed Sep 11 14:10:19 2024] [AA] [ScaleAAXPBasedOnCurrentAATotal] AA Experience Calculation: add_aaxp = 660796, Base Bonus = 256.000000, Half-Life = 64.000000, Minimum Bonus = 1.000000, Earned AA = 1, Calculated Bonus = 253.242371
Which is much closer to the expected behavior
* initial work porting this to upstream
* more
* track complete connect
* it sucks to suck
* Few optimizations
* Move sent_inventory init
* Move var
* Adjustments
---------
Co-authored-by: Akkadius <akkadius1@gmail.com>
* Add an exception process to assigning item serial numbers to correct a bug in the client hot bar clicky system.
* fixed missing guid in replace statement
* added snapshot support
* upate #show inventory command to protect against crash conditions
* [Feature] Add Optional Return to EVENT_DAMAGE_TAKEN
# Description
- Allows operators to return a value from `EVENT_DAMAGE_TAKEN` to override the amount of damage taken based on any arbitrary criteria they'd like to apply.
* Update attack.cpp
When using a method that leverages client_max_level (e.g. Max Level by bucket / qglobal / quest API) it would stop xp at 0% into the level rather than maximum xp for the level.
This could pose an issue where: If you had a max level of 65 via a databucket and a raid zone required level 65, one death would de-level them and potentially prevent them from entering the zone.
I reorganized the code to leverage the existing max_level logic which allows max xp in the max level.
I also cleaned up the overall functions formating (Mostly brackets and implied if statements).