Commit graph

6 commits

Author SHA1 Message Date
FlaggAC
7f1b58ab24
Change static readonly fields to const fields. (#4211)
This will at least somewhat improve performance, as confirmed through microbenchmark testing.

const fields are replaced with literal values in the Assembly's IL code, while static readonly fields may be optimized by the JIT, and is not guaranteed to happen. const fields may also lend themselves to stronger optimizations at runtime.
2024-08-24 14:32:35 +00:00
gmriggs
34d9363158
adding AssignMagic_New method, aligned more closely with retail (#3257)
* adding end of retail mutation filters for melee weapon damage, wield difficulty, damage variance, weapondefense, and weaponoffense

* .

* adding 4eyebiped credit

* adding end of retail mutation filters for missile weapon DamageMod, ElementalDamageBonus, WieldRequirements, and WeaponDefense

* adding end of retail mutation filters for caster weapon ManaConversionMod, ElementalDamageMod, WieldRequirements, and WeaponDefense

* update melee scripts

* resolve merge

* .

* add missing lines

* adding weapon speed mutations

* appending LongDesc with ' of <first spell name w/ descriptor>'

* .

* adding some missing spell descs from magloot logs

* adding SpellDIDs to isMagical casters

* wip

* finalizing

* updating qualityMod

* modifying qualityMod again, to align with data + magloot logs for legendary chests

* ConcurrentDictionary.TryAdd

* updating Clothing spells w/ latest data
2020-10-03 01:12:02 -04:00
gmriggs
e4e8a667e8
fixing double->float precision loss bug in ThreadSafeRandom.Next, auditing rng usage for entire codebase (#3145) 2020-08-26 01:03:17 -04:00
Mag-nus
cb6f854adc
Switch ThreadSafeRandom from lock to ThreadLocal<Random> (#2432)
* ThreadSafeRandom Cleanup

This fixes the namespace for ThreadSafeRandom, from ACE -> ACE.Common.

It also adds better Summary descriptions.

The rest of the file changes are simply adding ACE.Common references.

This is mainly commenting and namespace preparation for adding a non-thread safe random class, in effort to reduce lock contention.

* Switch ThreadSafeRandom from lock to ThreadLocal<Random>

For reference: ac99a1b716/src/Common/src/CoreLib/System/Random.cs
2019-12-08 08:52:41 -06:00
Mag-nus
12c138cb80
ThreadSafeRandom Cleanup (#2428)
This fixes the namespace for ThreadSafeRandom, from ACE -> ACE.Common.

It also adds better Summary descriptions.

The rest of the file changes are simply adding ACE.Common references.

This is mainly commenting and namespace preparation for adding a non-thread safe random class, in effort to reduce lock contention.
2019-11-21 07:22:20 -06:00
fartwhif
fe34acc14f Moving class ACE.Server.Physics.Common.Random to ACE.ThreadSafeRandom in project ACE.Common (#1167)
* Moving ACE.Server.Physics.Common.Random to ACE.ThreadSafeRandom
replaced the thread discriminator with a lock
renamed "Random" to "ThreadSafeRandom"
renamed "RollDice" functions to the standard "Next"

* deleted Source/ACE.Server/Physics/Common/Random.cs
replaced conditionally omitted and commented code with new name

* renamed source file
2018-12-21 23:51:57 -05:00