Commit graph

2495 commits

Author SHA1 Message Date
Kamron Batman
e994505ad0
fix: Adds safety to corpses and cleans up quests (#1685)
### Summary
- Adds some more checks in case a corpse's owner is somehow null. Would like to eventually allow null owner corpses, but more work is needed.
- Cleans up variable unboxing and reassignment in quests. Also flattens quest logic. Still more work needs to be done.
- Codegens more quest items/mobiles.
2024-02-18 19:33:08 -08:00
Kamron Batman
0d5aa1d022
fix: Fixes region duplicates (#1684) 2024-02-18 12:01:16 -08:00
Kamron Batman
d0d7be8de0
fix: Fixes codegenned spawners and adds RunUO spawner import support (#1682)
> [!IMPORTANT]  
> This code change includes important fixes for all spawners after they were converted to codegen!

> [!NOTE] 
> **Developer Note**
> Usage/Description/Aliases attributes were moved to the core so they can be used by the command registration system.

### Summary
- **Fixes spawners not registering their spawns on world load**
- Changes `[GenerateSpawners` to `[ImportSpawners`
- Removes `ConvertPremiumSpawners`
- Adds Premium spawner import support to `[ImportSpawners`
- Adds RunUO XML import support: https://github.com/ruaduck/xmlspawner/blob/ServUOMaster/XmlSpawner/XmlSpawner%20Core/SpawnerExporter.cs
- Fixed an issue where not manually registering an alias meant it wasn't available as a command
2024-02-17 10:46:55 -08:00
dependabot[bot]
cc064a27a5
chore(deps): Bump xunit from 2.6.6 to 2.7.0 (#1680)
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.6 to 2.7.0.
- [Commits](https://github.com/xunit/xunit/compare/2.6.6...2.7.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-17 00:35:24 -08:00
dependabot[bot]
6fe27baa42
chore(deps): Bump xunit.runner.visualstudio from 2.5.6 to 2.5.7 (#1681)
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.6 to 2.5.7.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/compare/2.5.6...2.5.7)

---
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>
2024-02-17 00:33:43 -08:00
Kamron Batman
8f4d86ca1f
fix: Fixes OPL for a few items (#1679) 2024-02-14 19:47:30 -08:00
Kamron Batman
5ada7a4e50
fix: Codegens spawners (#1678) 2024-02-12 21:14:42 -08:00
Kamron Batman
48e47f9352
fix: Fixes duplicate command listed. (#1677) 2024-02-11 18:13:45 -08:00
Kamron Batman
4479555156
fix: Fixes missing methods. Adds more admin gump world building (#1675)
### Summary
- Fixe commands missing in helpinfo.
- Adds more admin gump world building options. 

### Screenshots

<img src="https://github.com/modernuo/ModernUO/assets/3953314/3001aa65-4f46-4ba4-89ed-745fefdd27c3" width="50%">
2024-02-10 20:31:25 -08:00
Kamron Batman
cf989151f1
fix: Fixes the tooltip for IOS (#1674) 2024-02-10 18:56:45 -08:00
Kamron Batman
effc2c103f
fix: Fixes powerscroll properties label (#1673) 2024-02-10 10:47:27 -08:00
Kamron Batman
5decc0d1cd
fix: Fixes commands webpage table spacing (#1672) 2024-02-10 02:34:51 -08:00
Kamron Batman
d9d3a36815
fix: Fixes commands webpage table size (#1671) 2024-02-10 01:53:41 -08:00
Kamron Batman
ac61b22f4b
fix: Fixes commands.html tooltip (#1670) 2024-02-10 01:28:55 -08:00
Kamron Batman
fffda53263
fix: Adds command help, webpage, and fixes issues with other commands (#1669)
### Summary

- Fixes `[AdvancedSearch` being accessible by players 😱 
- Adds `[GenCommands` to generate the same commands html page on https://muo.gg/commands.
- Fixes `[helpinfo` so all commands properly show up!

> [!WARNING]  
> ### Developer Warning:
> Commands must now be registered in the `Configure` bootup phase.
> If a command is not registered early enough, it may not be available to systems like [helpinfo
> that cache their information.

> [!NOTE]  
> ### Developer Note:
> Various commands related to generating content have been changed to _Developer_ and above access level.

### Screenshots
<img width="673" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/b105b5c9-5eb4-4ace-93ff-1bfb31e7132f">

<img width="547" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/e97487e8-47a5-4aa7-89cc-9fe3deda584d">
2024-02-10 00:19:19 -08:00
Kamron Batman
3244704ea2
fix: Fixes directory copying (#1668) 2024-02-09 23:25:20 -08:00
dependabot[bot]
00332e542d
chore(deps): Bump Microsoft.NET.Test.Sdk from 17.8.0 to 17.9.0 (#1667)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.8.0 to 17.9.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.8.0...v17.9.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 14:48:53 -08:00
Kamron Batman
3f00f6d610
fix: Fixes loot with zero amount (#1666)
### Summary

* Adds logging if Amount goes to zero. It should never go to zero!
* Deletes an item if it mutates with zero amount.
* Eliminates possible allocation from `params` for `Type[][]` loot pack construction.
* Renames `Loot.ChestOfHeirloomsContains` to `Loot.RandomChestOfHeirloomsContent`.
2024-01-29 23:23:42 -08:00
Kamron Batman
64a8d6cb5d
fix: Fixes order of execution with AutoSave and TZ (#1665) 2024-01-24 17:17:45 -08:00
Kamron Batman
3812a783ca
fix: Fixes issue with duping items and serialization, and sector lists. (#1662) 2024-01-23 23:08:52 -08:00
Kamron Batman
497ea87943
fix: Fixes disconnects due to bad seeding (#1663) 2024-01-23 19:01:02 -08:00
Kamron Batman
4cd668ef61
feat: Moves TcpServer to another thread. Rewrites Firewall (#1660)
## Breaking Changes
* The Firewall and IP Limiter have been rewritten. Please read the notes carefully!
* `TcpServer.Instances` moved back to `NetState.Instances` - sorry - it was stupid to move it to begin with.

> [!Note]
> Sockets that fail the IP Limiter or Firewall will be immediately and forcibly disconnected.
> This means they will be stuck at "Verifying account..." if it was a real client.

### Summary
- Removes firewall wildcard support.
- Removes `AccessRestrictions`.
- Moves Firewall/IPLimiter to the core.
- Moves `TcpServer` to its own thread.
- Removes the `SocketConnect` and `SocketDisconnect` event sinks.
- Moves `Instances` back to `NetState.Instances`.
- Fixes a long standing bug with bad handling of duplicate listener addresses.

#### Firewall
The firewall has been completely rewritten. There is now an "Admin Firewall" which saves to the config file. Secondarily, there is an internal firewall used exclusively by the TcpServer while processing sockets. The Admin firewall mirrors it's additions/deletions to the internal firewall by adding requests to a queue.

> [!IMPORTANT]  
> **Wildcard firewall entries, such as `X`, `*`, `?` are not allowed.**
> **Ranges in between IP classes or sextets are not allowed.**
> **Please make sure to use one of the following:**
> * IP Address - `192.168.1.1`
> * CIDR - `192.168.1.0/24`
> * Range - `192.168.1.1-192.168.1.100`

#### IP Limiter
The IP Limiter has been completely rewritten. The available configurations are:
```json
"ipLimiter.enable": "True",
"ipLimiter.maxConnectionsPerIP": 10,
"ipLimiter.clearConnectionAttemptsDuration": "00:00:00:10",
"ipLimiter.clearThrottledDuration": "00:00:02:00",
```

The IP Limiter is set up to prevent spamming connections from the same IP. Every time an IP connects, it is added to a connection list. After 10 attempts, the IP is added to the throttle list. To keep the system fast, the connection list is entirely wiped every 10 seconds, and the throttle list is entirely wiped every 2 minutes.
2024-01-20 14:25:12 -08:00
Kamron Batman
5f3de6537b
chore: Update README.md (#1661) 2024-01-20 14:24:44 -08:00
dependabot[bot]
ee8d13f70b
chore(deps): Bump xunit from 2.6.5 to 2.6.6 (#1659)
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.5 to 2.6.6.
- [Commits](https://github.com/xunit/xunit/compare/2.6.5...2.6.6)

---
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>
2024-01-16 10:08:27 -08:00
Kamron Batman
823023275b
fix: Stops trying to perform snapshots when the world is not saving (#1658) 2024-01-15 08:29:54 -08:00
Kamron Batman
0ffea2e912
fix: Fixes Feint so it properly reduces damage (#1657) 2024-01-11 00:01:52 -08:00
Eric Vintimilla
49118556d3
fix: Fixes hues for Bags of Sending (#1654) 2024-01-06 08:50:36 -08:00
dependabot[bot]
1dbf8a0834
chore(deps): Bump xunit from 2.6.4 to 2.6.5 (#1655)
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.4 to 2.6.5.
- [Commits](https://github.com/xunit/xunit/compare/2.6.4...2.6.5)

---
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>
2024-01-05 19:55:05 -08:00
Kamron Batman
aaad909c89
fix: Fixes GetItemsAt, GetMobilesAt, and GetClientsAt (#1653) 2023-12-30 09:47:21 -08:00
Kamron Batman
2084374318
fix: Adds Mage AI invis chance variable (#1651) 2023-12-28 23:53:55 -08:00
Kamron Batman
fbbc407954
feat: Adds AdvancedSearch (XmlFind) (#1649)
### Summary

Adds Advanced Search (XmlFind) using `[AS` command.


Notable differences from XmlFind:
* No save to file.
* No "Display from" option (might add that later).
* No advanced XmlSpawner property test syntax. Only basic property operator comparisons.
* This version will freeze your shard, but fans out to all processors just like world saves. (So it should be stupid fast, especially if you have lots of cores)
* Does not support spawn entry/type/error searching. We have a spawn search command to do that already.
* I haven't set up correct "defaults" for the options when you first open it. I'll do that later.

### Screenshots
<img width="575" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/2b08e586-0ea6-41c4-b7cd-f70e2ee62b86">

<img width="575" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/da3f16b9-6a9e-4d2c-9d93-6cdfa67b4ddc">

<img width="572" alt="image" src="https://github.com/modernuo/ModernUO/assets/3953314/ae1d0a3f-a30d-497c-99ea-2cc988147f8f">
2023-12-28 18:55:47 -08:00
Kamron Batman
fe6e9dfe5c
fix: Adds required changes for Advanced Search feature (#1650) 2023-12-28 18:16:58 -08:00
Kamron Batman
96c3f2eb91
fix: Use pooled ref for corpse instanced loot (#1645) 2023-12-26 10:51:58 -08:00
dependabot[bot]
449dba3ac7
chore(deps): Bump xunit.runner.visualstudio from 2.5.5 to 2.5.6 (#1647)
Bumps [xunit.runner.visualstudio](https://github.com/xunit/visualstudio.xunit) from 2.5.5 to 2.5.6.
- [Release notes](https://github.com/xunit/visualstudio.xunit/releases)
- [Commits](https://github.com/xunit/visualstudio.xunit/compare/2.5.5...2.5.6)

---
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-26 10:50:53 -08:00
dependabot[bot]
10605d5027
chore(deps): Bump xunit from 2.6.3 to 2.6.4 (#1646)
Bumps [xunit](https://github.com/xunit/xunit) from 2.6.3 to 2.6.4.
- [Commits](https://github.com/xunit/xunit/compare/2.6.3...2.6.4)

---
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-26 10:48:30 -08:00
Kamron Batman
d4282367ba
fix: Fixes crash with combatant and mobs facing each other (#1644)
### Summary
- Fixes crash bugs with combatant checks in AI
- Fixes mobs not facing each other while in combat. (Old RunUO bug)
- Fixes predators not actually going into guard when their combatant dies.
- Adds missing checks for combatant in various AI.

Note: Much easier to understand changes if whitespace is off - https://github.com/modernuo/ModernUO/pull/1644/files?diff=split&w=1
2023-12-20 14:48:24 -08:00
Kamron Batman
1e73802d1e
fix: Fixes network issue with incoming packet length (#1643) 2023-12-20 13:19:00 -08:00
Kamron Batman
61e9dd29ac
fix: Adds missing migration files. (#1642)
### Summary

- Bumps serialization generator. v2.10.9 fixes an issue with nuget publishing where files were missing.
- Fixes camps missing serialization of their prisoner.
- Adds missing serialization migration files.
2023-12-20 13:02:01 -08:00
Kamron Batman
7d9bc9ff0a
fix: Fixes thread guard and cleans up incoming packet reader (#1641)
### Summary
* Fixes syntax compile error when THREADGUARD is enabled.
* Removes `int packetLength` from incoming packet handles since they aren't needed.

### Developer Notes
Incoming packet handler `SpanReader` is now properly scoped to that packet by length.
2023-12-19 17:04:09 -08:00
Gnai
25a75fdf24
fix: Update Main.cs to accept utf8 on console (#1639) 2023-12-16 00:33:56 -08:00
Stefano Merotta
1ab367d637
fix: Fixes pooled ref collections dispose on defaults (#1638) 2023-12-15 13:46:52 -08:00
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