Commit graph

1861 commits

Author SHA1 Message Date
Kamron Batman
fa0bf86a08
fix: Codegens furniture containers (#977) 2022-03-27 15:02:29 -07:00
Kamron Batman
8f922c94ae
fix: Codegens lockable containers and cleans up lockpickable (#976) 2022-03-26 21:48:18 -07:00
Kamron Batman
fc0594f87c
fix: Codegens TreasureMapChest (#975) 2022-03-26 21:33:46 -07:00
Kamron Batman
ba5bb13e60
fix: Codegens mark containers (#974) 2022-03-26 21:23:21 -07:00
Kamron Batman
2f6a0fad3a
fix: Codegens trappable containers (#973)
Splits out trappable container so the logic is easier to expand.
Changes trappable containers to be code genned.
2022-03-26 21:15:15 -07:00
Kamron Batman
81cafa0753
fix: Fixes bank checks falling to the floor. (#972) 2022-03-26 21:06:46 -07:00
Kamron Batman
e9f986f55b
fix: Adds Gen2 callback for each STArrayPool (#971)
Adds. Gen2Callback for STArrayPool so it can purge the internal array stacks properly. This only happens if significant timed has passed, 2 Gen 2's have been run, and memory pressure exceeds a threshold.
2022-03-26 13:57:42 -07:00
Kamron Batman
474427041f
feat: Adds a PooledRefList (#676) 2022-03-26 11:11:22 -07:00
Kamron Batman
154f7edbdb
fix: Updates sponsors links 2022-03-23 00:08:01 -07:00
Kamron Batman
601eb4e116
fix: Uses variables for gump html localized (#970) 2022-03-22 23:51:36 -07:00
Kamron Batman
c166e113b1
fix: Streamlines gump compilation (#969)
Changes gump compilation to use string interpolation. .NET 6 uses code generation and compile time tricks to speed up string interpolation between 15 and 30% and reduce allocations dramatically.
2022-03-22 23:46:10 -07:00
Kamron Batman
14b63ca48e
fix: Updates ArrayPool to STArrayPool for performance. (#968) 2022-03-22 20:07:32 -07:00
Kamron Batman
76fddcbccd
feat: Adds a single threaded array pool (#967)
## Added Feature
Adds a single threaded array pool that works exactly the same as `ArrayPool<T>.Shared`.
The `STArrayPool<T>.Shared` can only be used on a single thread, the main game thread of the server.

Note: Unlike the built-in array pool, there is no hook into the _GC Gen 2_. This means to relieve potentially high memory pressure, `ArrayPool<T>.Shared.Trim()` must be called. The pool will only release arrays _after two successive calls within 10 seconds or longer_. If the server is at less than 70% total memory usage, or the server is not going to use this pool for something egregious, then don't bother ever calling Trim().


## Changes
- [X] Fixes ArrayPool calls that should be cleared due to references.
- [X] Benchmarks against ArrayPool with 4+ rented arrays deep of the same length.
- [x] Unit tests
2022-03-22 09:58:24 -07:00
Kamron Batman
0925a2d435
fix: Cleans up Point checks and removes statics (#966)
- [X] Removes static freezing/unfreezing. Use other tools for this.
- [X] Cleans up IPoint3D allocations
- [X] Removes IPoint3D constructors since the compiler may not optimize the constructor path and allow allocations.


Note: Instead of `new Point3D(m)`, do something like `new Point3D(m.Location)`. Sorry for the inconvenience. In the long run this will prevent abuse of hot paths that will cause performance issues.
2022-03-20 23:15:59 -07:00
Kamron Batman
23532db603
fix: Cleans up LINQ calls. (#965)
- [X] Removes several `ToList()` uses with `PooledRefQueue`
- [X] Adds a `PeekRandom` to PooledRefQueue
- [X] Updates EV/BS so they dispel each other in a more efficient manner.
- [X] Fixes Firebomb so it works like a normal firefield.
- [X] Fixes field spells so they aren't unnecessarily using a Point3D ref more than necessary.
- [X] Removes extra allocation in campfire by using reverse loop.
- [X] Removes other LINQ calls that aren't needed.
2022-03-20 19:20:54 -07:00
Kamron Batman
daf89686d1
chore: Updates CI/CD to use .NET 6.0.201 (#964) 2022-03-18 19:49:50 -07:00
Kamron Batman
89f3a0522c
fix: Round 3 of speed updates for NPCs (#963)
- [X] Fixes mobs having 0 speed.
- [X] Fixes mobs missing legacy speeds.
2022-03-18 12:56:42 -07:00
Kamron Batman
1e5b1a11a8
fix: Cleans up unused code (#961) 2022-03-15 20:02:40 -07:00
Kamron Batman
c64e3e3ba8
fix: Fixes bad movement checks (#960) 2022-03-15 19:39:52 -07:00
Kamron Batman
1ec3636951
fix: Fixes speed issues (#959)
- [X] Removes all speeds in constructors since _they aren't used anyways_.
- [X] Adjusted timers according to the _time transformations in RunUO_.
2022-03-15 10:18:27 -07:00
Kamron Batman
16c4268b54
fix: Fixes file reading. (#958)
.NET 6 introduced a breaking change where lseek and sys-calls are not used for reading and file streams. This effectively broke out native reader. Since the file reading is fairly optimized, and honestly we don't need it to be "fast" in this case, I have removed the native reader.

https://devblogs.microsoft.com/dotnet/file-io-improvements-in-dotnet-6/
2022-03-11 01:45:03 -08:00
Kamron Batman
bdee7bc671
fix: Fixes NPC slowness. (#955)
* Adds the following configurations:
  * `movement.delay.npcMinDelay` - 0.1 - Pets or Non-monster NPCs
  * `movement.delay.npcMaxDelay` - 0.4 - Pets or Non-monster NPCs
  * `movement.delay.monsterMinDelay` - 0.4 - Non-pet Monsters or NPC vs Player Combat
  * `movement.delay.monsterMaxDelay` - 0.8 - Non-pet Monsters or NPC vs Player Combat
  * `movement.delay.monsterMinDex` - 150 - Dex maximum for delay by dex
  * `movement.delay.MinDex` - 190 - Dex maximum for delay by dex
2022-03-10 22:55:06 -08:00
Kamron Batman
44bd129734
fix: Fixes mana insufficient message for newer clients. (#957)
Publish 100 introduced the cliloc change for insufficient mana. This was rolled out starting with v7.0.65.4 on 6/22/2018.
2022-03-10 12:18:22 -08:00
Kamron Batman
60991b7ab0
fix: Deletes schema migration project (#954) 2022-03-07 22:43:30 -08:00
Kamron Batman
58b907d39e
fix: Fixes packet length checks (#953)
Fixes an issue with DropReq where an old client was sending in 14 bytes, but the server was expecting 15 bytes.

To fix this we introduced a new packet handler, `ContainerGridPacketHandler` and changed the code to determine the length of the packet dynamically using `GetLength(NetState)`.

Also fixed throttling so dropped packets are properly skipped.
2022-03-04 12:32:25 -08:00
Kamron Batman
1f4162288e
fix: Fixes UOClient NPE (#952) 2022-02-28 17:24:00 -08:00
Kamron Batman
5a43c806fe
fix: Use tuple shorthand syntax (#951) 2022-02-28 08:43:41 -08:00
Kamron Batman
ca29fc640a
fix: Fixes stats for earlier expansions (#950) 2022-02-28 07:04:07 -08:00
Kamron Batman
54b268c02f
fix: Codegens treasure chests (#949) 2022-02-27 18:02:36 -08:00
Kamron Batman
17f8d3563a
fix: Codegens treasure/paragon chests & strongboxes (#948) 2022-02-27 17:22:38 -08:00
Kamron Batman
9bc6d5bdb8
fix: Codegens salvage bags (#947) 2022-02-27 17:09:12 -08:00
Kamron Batman
003ad1164f
fix: Codegens containers (#946) 2022-02-27 17:01:49 -08:00
Kamron Batman
77181678da
fix: Converts BaseArmor and BaseClothing to use string crafter fields (#928) 2022-02-27 03:18:17 -08:00
Kamron Batman
651cffa872
fix: Cleans up mobile status packets (#835)
* Removes Span2D for mobile moving. Instead uses pure math and simplifies the calculation.
* Cleans up the extended mobile status packet.
2022-02-27 03:10:35 -08:00
Kamron Batman
e873d2ed7e
fix: Simplifies fastwalk detection (#907)
* Uses a circular buffer for steps.
* Limits to 3 steps instead of 4.
* Gives a 5% buffer on the first step.
2022-02-27 02:20:03 -08:00
Kamron Batman
5b7b99e0de
fix: Adds CUO settings support and adds more robust 7.0.9 support (#945) 2022-02-27 02:15:06 -08:00
Kamron Batman
941452de4a
fix: Stops creating blocked packets entirely (#944)
Optimizes larger servers where users are logging in and packets are being created for no reason.
2022-02-27 00:13:49 -08:00
Kamron Batman
5db8b1354c
fix: Fixes various minor issues (#943) 2022-02-26 23:43:25 -08:00
Kamron Batman
dc2b00ec5b
fix: Fixes town crier NPE (#942) 2022-02-23 21:21:20 -08:00
Arthrutus
032f21ff27
fix: Update Blighted Grove Teleporters (#939) 2022-02-20 23:23:25 -08:00
Kamron Batman
6593abf418
fix: Fixes weight problem with dupe. Fixes mobile base weight. (#938) 2022-02-18 22:11:57 -08:00
Kamron Batman
699478425f
chore: Updates readme to remove blurb about schema migration (#937) 2022-02-18 11:15:32 -08:00
Kamron Batman
2009ac6892
fix: Adds more null checks for text definition to prevent NPEs (#936) 2022-02-18 11:13:38 -08:00
Kamron Batman
04909828c8
fix: Fixes argument for schema generation in publish command (#935) 2022-02-18 11:00:10 -08:00
Kamron Batman
36d07dd34d
fix: Fixes ruleset (#934) 2022-02-17 08:45:08 -08:00
Kamron Batman
11dcbe7edb
fix: Fixes scrolls not working (#933) 2022-02-16 18:52:58 -08:00
Kamron Batman
ecfa290514
fix: Fixes running schema migrations on Windows (#932) 2022-02-16 17:29:29 -08:00
Kamron Batman
d7786ce586
fix: Fixes TextDefinition and optimizes CraftItem (#930) 2022-02-12 22:42:50 -08:00
Kamron Batman
202c4a99b7
fix: Fixes craft checks (#929) 2022-02-12 21:22:03 -08:00
Kamron Batman
48f1fe3384
fix: Moves codegen to its own repo (#918)
- [X] Replace serialization generator with nuget
- [X] Replace schema migration with dotnet bool
- [X] Add ability to run migrations in VS/Rider using a project build
2022-02-12 17:58:42 -08:00