Commit graph

2454 commits

Author SHA1 Message Date
Eric Vintimilla
0d65464c9f
fix: Fixes crash when banker tries to consume checks & gold from bankbox (#1635)
Co-authored-by: Stefano Merotta <97297186+stefanomerotta@users.noreply.github.com>
Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
2023-12-15 09:13:21 -08:00
Kamron Batman
c487aab3f9
doc(chore): Update README.md - Fix another link (#1637) 2023-12-14 12:18:27 -08:00
FiftyTifty
49ccc8cfee
doc(chore): Update README.md - .Net 8.0 Link (#1636) 2023-12-14 12:15:19 -08:00
dependabot[bot]
e73c599cc6
chore(deps): Bump xunit.runner.visualstudio from 2.5.4 to 2.5.5 (#1633)
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.4 to 2.5.5.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/compare/2.5.4...2.5.5)

---
updated-dependencies:
- dependency-name: xunit.runner.visualstudio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 09:02:04 -08:00
dependabot[bot]
442bdd77d9
chore(deps): Bump xunit from 2.6.2 to 2.6.3 (#1634)
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.2 to 2.6.3.
- [Commits](https://github.com/xunit/xunit/compare/2.6.2...2.6.3)

---
updated-dependencies:
- dependency-name: xunit
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-12 09:00:16 -08:00
dependabot[bot]
a012f72205
chore(deps): Bump Serilog.Sinks.Console from 5.0.0 to 5.0.1 (#1632)
Bumps [Serilog.Sinks.Console](https://github.com/serilog/serilog-sinks-console) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/serilog/serilog-sinks-console/releases)
- [Commits](https://github.com/serilog/serilog-sinks-console/compare/v5.0.0...v5.0.1)

---
updated-dependencies:
- dependency-name: Serilog.Sinks.Console
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-08 16:02:37 -08:00
Stefano Merotta
ca5aa80fcd
fix: Fixes default GumpID and DropSound serialization for containers (#1631) 2023-12-08 16:02:23 -08:00
Kamron Batman
f35af0de2f
fix: Codegens camps (#1628) 2023-12-04 09:11:52 -08:00
Kamron Batman
b7882df136
fix: Fixes serialization and dirty tracking conveniences (#1627)
### Summary
- Fixes issues with non-_ISerializable_ objects having bad serialization (Skill/Stat. Mods)
- Fixes issues with MarkDirty and namespaces: https://github.com/modernuo/SerializationGenerator/issues/29
- Fixes missing dirty tracking for some data structures.
- Fixes cascading MarkDirty for non-serializable types that have owners that are also non-serializable types.

### New Codegenned API
When a data structure (Array, List, Dictionary, HashSet, etc) is source generated for serialization, new methods are added which will handle dirty tracking. Use these instead of the built in methods for that data structure.

_All Data Structures_
```cs
public void Clear<PropertyName>();
```

_Lists and Sets_
```cs
public void AddTo<PropertyName>(V value);
public void RemoveFrom<PropertyName>(V value);
```

_Lists_
```cs
public void InsertInto<PropertyName>(int index, V value);
public void RemoveFrom<PropertyName>At(int index);
```

_Dictionaries_
```cs
public void AddTo<PropertyName>(T key, V value);
public void RemoveFrom<PropertyName>(T key);
public void ReplaceIn<PropertyName>(T key, V value);
```

Over time, they will be cleaned up and more variants added such as `bool RemoveFrom<PropertyName>(T key, out V value)`
2023-12-03 15:55:31 -08:00
Kamron Batman
3a0d4b171b
fix: Codegens boats (#1625) 2023-12-02 12:55:38 -08:00
Kamron Batman
b29a79ac2d
fix: Fixes migration check (#1626) 2023-12-02 12:50:42 -08:00
Kamron Batman
e21ff0eb28
fix: Codegens BaseMulti, Container, and VirtualCheck (#1624) 2023-12-02 10:00:02 -08:00
mark1145
4ebdc75bdf
fix: Fixes PainSpike, ManaVampire, Evil Omen, and Curse (#1622)
Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
2023-12-02 09:59:42 -08:00
Stefano Merotta
fec78040bc
fix: Fixes wrong sector shift for tilematrix iteration (#1623) 2023-12-01 18:09:26 -06:00
Kamron Batman
130a5674bf
fix: Fixes negative weight issue (#1621)
Closes #73
2023-11-26 10:04:29 -08:00
Kamron Batman
4f6afad10b
chore: Update README.md for Sonoma support (#1620) 2023-11-26 09:41:41 -08:00
Kamron Batman
f21c9687b2
fix: Refactors getting static tiles to use enumerators (#1611)
### Summary
* Refactors getting static/multi tiles to not use allocations.
* `TileList` is now only used during bootstrapping and uses rented buffers to eliminate extra allocations.
* Replaces `StaticTile[] GetStaticTiles` with:
    ```cs
        Map.StaticTileEnumerable GetStaticTiles(int x, int y);
        Map.StaticTileEnumerable GetStaticAndMultiTiles(int x, int y);
        Map.StaticTileEnumerable GetMultiTiles(int x, int y);
    ```
* Removes `Synchronized` and `lock` from TileMatrix. It is no longer considered a multi-thread safe system.
2023-11-26 09:39:46 -08:00
Kamron Batman
3b1637b2da
fix: Removes redundant fixture check (#1619) 2023-11-26 09:24:52 -08:00
Kamron Batman
6a0fcd62c1
fix: Fixes various mobile packets and setting serials (#1618)
### Summary
- Removes old death packet that isn't used. Doubtful this causes issues with clients that are v4+.
- Removes duplicate incoming packets. Again, probably to fix some old client issues, doubtful it affects clients v4+.
- Fixes setting serials and entities in props/commands. Note: Disabled setting `Parent` since the new sector code has issues. We shouldn't rely on it anyway!
- Reverts a recent change to healthbars that should not have been made. Oops!
2023-11-26 00:42:15 -08:00
Kamron Batman
332e22f509
fix: Fix compiling (#1617) 2023-11-25 23:41:09 -08:00
Kamron Batman
674b8dca83
fix: Fixes character starting cities. (#1615)
### Summary

- Moves starting city info from AccountHandler to CharacterCreation
- Simplifies the logic of determining the starting cities
- Adds support for Trammel & Felucca for non-young accounts
- Fixes fall through starting city for v6+ in UOR era.
- All staff are force-sent to GA.

Closes #1408
2023-11-25 23:31:54 -08:00
Kamron Batman
a93a363c5f
fix: Fixes shutdown+save (#1614) 2023-11-25 10:11:24 -08:00
Kamron Batman
21a067c187
fix: Update RUNUO_TO_MODERNUO.md (#1613) 2023-11-24 23:49:43 -08:00
Kamron Batman
88b8851156
fix: Fixes argument out of range error from empty tile list (#1612) 2023-11-24 21:06:36 -08:00
Voxpire
3109f59d4d
fix: Updates container searches for non-generic types (#1567) 2023-11-23 09:29:45 -08:00
Kamron Batman
331f24cb71
fix: Fixes TimeSpan rounding issues (#1610)
### Summary

TLDR - .NET Framework rounded TimeSpan (and some DateTime) methods to the nearest millisecond. This was actually _expected_ accidentally for parts of RunUO.

We are aiming to fix this and clean up some other bad assumptions.

Closes #1604
2023-11-22 18:03:56 -08:00
mark1145
98727d13b3
fix: Fixes vendor buy int overflow (#1586) 2023-11-22 14:41:50 -08:00
Kamron Batman
d93e363017
fix: Fixes VS support by reverting source generators back to net standard 2.0 (#1609) 2023-11-21 17:10:13 -08:00
Kamron Batman
d5253c2bae
chore: Cleans up unused imports (#1608) 2023-11-21 12:32:51 -08:00
mdodkins
e680bdb4b5
fix: Adds boolean support for Server.TryParse (#1605) 2023-11-21 12:21:59 -08:00
Kamron Batman
03f850fe03
fix: Fixes sending packets and sidesteps a major issue with stackalloc and PGO in .NET 8 (#1607)
### Summary
- Works around a sneaky edge case bug in the JIT with stackalloc where sometimes the buffer is not zero'd.
- Fixes SendDisplayBoatHS
- Fixes sending health bars in the `SendEverything()` logic.
- Fixes a bug in sizing for some string helper functions.

### Developer Note
We are enabled `SkipLocalsInit` - do not rely on `stackalloc` to be zero'd. To zero the buffer, use `span.Clear();`

Closes #1606
2023-11-21 12:18:20 -08:00
Kamron Batman
79ba1ea917
fix: Fixes tests (#1603) 2023-11-19 10:11:04 -08:00
Kamron Batman
0da6e46d67
feat: Updates to .NET Standard 2.1 source generators (#1602) 2023-11-19 10:03:28 -08:00
Kamron Batman
021ebd0a88
fix: Fixes multi search (#1601) 2023-11-18 12:37:26 -08:00
Kamron Batman
b5c984e5de
fix: Fixes negative random numbers (#1600) 2023-11-18 10:22:40 -08:00
Kamron Batman
dba3ec2db5
fix: Use built-in RNG (#1599)
### Summary

.NET 8 supports Xoroshiro 256** off the shelf and added Shuffle. Switching to that implementation.

### Developer Notes

* Removed many convenience methods that weren't used.
2023-11-17 17:45:18 -08:00
Kamron Batman
1769d47ba5
fix: Removes Standart XxHash in favor of the built in one (#1598) 2023-11-17 16:11:35 -08:00
Kamron Batman
e9642d61f1
fix: Removes custom BitArray (#1597)
### Summary

The BitArray class will be optimized over the next several years for various platforms/hardware and maintaining a duplicate for serialization is not practical. Removing the custom implementation. Recommend against using BitArray for serialization unless it is absolutely necessary.
2023-11-17 14:37:07 -08:00
Kamron Batman
a1dffd10ce
fix: Acquired recipes are now a Set (#1596) 2023-11-17 00:04:46 -08:00
Quick
6f0c33bd10
fix: Fixes serialization on disguise kits (#1595) 2023-11-17 00:04:04 -08:00
Kamron Batman
f7626b64f3
chore: Bump fedora version in README.md (#1594) 2023-11-14 17:35:00 -08:00
Kamron Batman
2e4668dbe5
feat: Updates to .NET 8. (#1542)
### Breaking Changes
- Updating to .NET 8 - Required O/S's have slightly changed.
2023-11-14 17:08:09 -08:00
dependabot[bot]
bd79509400
chore(deps): Bump MailKit from 4.2.0 to 4.3.0 (#1590) 2023-11-13 22:11:41 -08:00
dependabot[bot]
24e018995c
chore(deps): Bump Serilog.Sinks.Console from 4.1.0 to 5.0.0 (#1587) 2023-11-10 22:46:17 -08:00
dependabot[bot]
172d4a3642
chore(deps): Bump Serilog from 3.0.1 to 3.1.1 (#1589) 2023-11-10 21:31:03 -08:00
Eric Vintimilla
f71d5bcff1
fix: Fixes missing ethereal horse label (#1585) 2023-11-09 14:16:41 -08:00
dependabot[bot]
1201f04321
chore(deps): Bump Microsoft.NET.Test.Sdk from 17.7.2 to 17.8.0 (#1584) 2023-11-08 22:36:06 -08:00
Kamron Batman
c8463e2eaf
fix: Fixes lightning arrow (#1583)
### Summary
- [X] Lightning arrow no longer allows SDI
- [X] Lightning arrow now proc's even without arrows
- [X] Fixed NPE with lightning arrow when a monster is already killed.
2023-11-05 17:36:09 -08:00
Kamron Batman
ca3df9cfa7
fix: Adds multis to map iterators, fixes searching empty nested containers (#1581)
### Summary
Eliminates `IPooledEnumerable<BaseMulti>` and `eable.Free()` from `Map` for multis. This drastically simplifies code that iterates in range, for example:

```cs
foreach (var m in m.GetMultisInRange(5))
{
}
```
The code above no longer requires an eable and calling `Free()`.


### Bug Fixes
- [X] Fixes an issue with searching through nested empty containers.
2023-11-05 08:17:34 -08:00
Kamron Batman
1f04a13f67
fix: Fixes poison field duration, cleans up skill calculations and poison calculations (#1582)
### Summary
- [X] Fixes poison field duration
- [X] Adds SA+ poison spell calculations
- [X] Cleans up skill calculations
- [X] Adjusts poison level thresholds to properly reflect OSI
2023-11-04 12:32:54 -07:00