Commit graph

482 commits

Author SHA1 Message Date
Kamron Batman
217c63a07a
Merge branch 'main' into webSupport
# Conflicts:
#	Projects/Benchmarks/Benchmarks/Packets/GumpUtilities.cs
#	Projects/Server/Gumps/Gump.cs
#	Projects/Server/Network/Packets/IncomingPlayerPackets.cs
#	Projects/Server/Network/Packets/OutgoingGumpPackets.cs
2022-07-08 16:09:07 -07:00
mark1145
bd4e6fc30e
fix: Fixes curses and spell effects (#1112)
* * Fix statmod naming mismatch: everything in code searches for "[Magic] {type} Offset" but stat reductions are being added as "[Magic] {type} Curse"

* Clarifies and cleans up curses

* Fixes blood oath

* * NobleSacrifice remove all curses in one go

* Dont need a method

* Fix extra parentheses

Co-authored-by: Kamron Batman <3953314+kamronbatman@users.noreply.github.com>
2022-07-07 23:59:46 -07:00
nullptr-w8
ad0e1702a3
fix: Fixes [spawn gump for older clients (#1108) 2022-07-04 07:20:20 -07:00
Kamron Batman
8303c74379
fix: Fixes ValueStringBuilder initial rented buffer (#1111)
Fixes issue with ValueStringBuilder having an empty initial buffer.
2022-07-03 08:14:54 -07:00
Kamron Batman
c6c644c966
fix: Fixes crafting so it doesn't create items before world load. (#1110) 2022-07-02 02:18:28 -07:00
Quick
04c44e2968
fix: Fixes bug with town crier NPE from random entry (#1106) 2022-07-02 01:54:58 -07:00
Kamron Batman
7c981b2d10
fix: Adds throwing weapons (#1107) 2022-07-01 17:03:27 -07:00
nullptr-w8
1cf4a43c2c
fix: Fixes [spawn gump headers (#1103) 2022-07-01 11:13:44 -07:00
Kamron Batman
a9f7f2b7e9
fix: Fixes LearnAllRecipes (#1104) 2022-07-01 11:11:37 -07:00
nullptr-w8
31fb29cf0b
feat: Adds [Spawn command & Gump Grids (#917)
Adds `[spawn` command
<img width="1018" alt="Screen Shot 2022-06-30 at 10 13 15 PM" src="https://user-images.githubusercontent.com/3953314/176828843-eda4da40-b7f5-494b-a0bc-667aba3293bb.png">
2022-06-30 22:22:51 -07:00
Quick
6601101e2e
fix: Updates spawner gump visuals! Thanks Quick! (#1102)
This update changes the default RunUO SpawnerGump's overall look and feel and expands slightly some functionality. Inspired by the XmlSpawner gump.

![image](https://user-images.githubusercontent.com/577652/176790254-cc1fb6bb-b281-49c9-a7cd-ec5376a69921.png)

![image](https://user-images.githubusercontent.com/577652/176790147-408ef682-9670-4753-872c-db843be1ab05.png)

1. The name of the spawner is displayed
2. This displays the total current spawn with the current allowed max spawn
3. Cleans up the display of the current count and the max count
4. The ability to turn on/off the spawner
5. Several changes to buttons 
   - Simple Save and Cancel instead of Okay, Cancel and Apply.
   - Props button to display spawner properties
   - Goto button to teleport to the spawner
   - Reset button that will clear all the spawned mobs and turn off the spawner
   - Repositioned the buttons to make a little more sense
6. The sum of all the max spawn values per entry, from all pages
2022-06-30 20:48:54 -07:00
Kamron Batman
cb474712f8
fix: Removes side effect of setting skill mod when changing Owner (#1101)
## Breaking Change!
Setting `mod.Owner` will no longer update a skill mod.
**Please stick to the API and use `mobile.AddSkillMod(mod)` for all situations, including equipping.**


## Fixes
- [X] Fixes memory leak in factions.
- [X] Changes `List<SkillMod>` to `HashSet<SkillMod>`.
- [X] Eliminates skill mods adding/removing twice.
2022-06-30 12:07:08 -07:00
Kamron Batman
2d00f6d27a
fix: Fixes old haven and new haven starting cities (#1097)
Adds OldHaven cities for shards that use clients older than 6.x
2022-06-29 01:23:57 -07:00
Stefano Merotta
f4cbe82d17
fix: Added comment for magery circle formula (#1095) 2022-06-28 09:58:51 -07:00
Kamron Batman
a37b8b285c
fix: Adds AssistVersion packet support for Razor (#1094)
- [X] Fixes razor negotiations via 0xF0 packet (open negotiation)
- [X] Adds AssistVersion handling for Razor
- [X] Displays Assistant in Client/Admin gump
2022-06-28 01:05:00 -07:00
Kamron Batman
7099329dfe
fix: Fixes disallowed features enum serialization (#1093) 2022-06-27 18:30:31 -07:00
Kamron Batman
8d3aaaeb2a
fix: Removes razor negotiations since they arent maintained (#1090) 2022-06-26 08:33:53 -07:00
Kamron Batman
4f28e1e3c4
fix: Adds back razor/assistuo negotiations (#1089)
* [X] Adds Razor negotiations
* [X] Adds AssistUO "handshake" 🙄
2022-06-25 01:47:45 -07:00
Kamron Batman
bc2ed44440
fix: Fixes starting champion with valor (#1088) 2022-06-21 22:43:08 -07:00
Kamron Batman
087cc15f39
fix: Reverts changes to fists (#1087) 2022-06-21 21:24:31 -07:00
Kamron Batman
792f04a323
fix: Fixed lantern deserialization (#1086) 2022-06-21 21:04:02 -07:00
Kamron Batman
38b45d5e0b
fix: Cleans up AI code (#1084) 2022-06-20 19:32:16 -07:00
Kamron Batman
da877f59a7
fix: Fixes possibel NPE with misbehaving Weapon property (#1083) 2022-06-20 16:31:39 -07:00
Kamron Batman
7adf52ef48
fix: Moves mods and fixes migrations for lights (#1080)
- [X] Removes duplicate property for owner.
- [X] Codegens them all (even though they aren't used, just in case someone wants to).
2022-06-18 21:28:51 -07:00
Kamron Batman
dc7033d71f
fix: Fixes candle serialization (#1081) 2022-06-18 16:09:02 -07:00
Kamron Batman
354f7e2f41
fix: Codegens torches, candles, and lanterns (#1078) 2022-06-18 08:39:44 -07:00
Kamron Batman
35689a395b
fix: Fixes codegenning sack of flour (#1076) 2022-06-17 23:29:36 -07:00
Kamron Batman
41efa69b56
fix: Adds OSI candle/torch functionality, codegens lights (#1075) 2022-06-17 23:26:27 -07:00
Kamron Batman
cf1d037444
fix: Fixes serialization NPE when namespace is missing (#1074) 2022-06-16 22:45:39 -07:00
Kamron Batman
17e33a65d2
fix: Fixes source gen bugs (#1072) 2022-06-16 21:34:11 -07:00
Kamron Batman
6edccfe2aa
fix: Codegens mahjong (#1070) 2022-06-16 10:19:49 -07:00
Kamron Batman
800f864335
fix: Updates serialization generator to fix crashing from duplicate fields (#1071) 2022-06-16 09:31:09 -07:00
Kamron Batman
2fb660040b
fix: Cleans up namespaces (#1069) 2022-06-15 19:52:23 -07:00
Kamron Batman
4a057bf5ac
fix: Fixes poison charge OPL (#1068) 2022-06-15 19:11:52 -07:00
Kamron Batman
057cf87e60
fix: Updates encoded packet handler to use function pointers (#1066) 2022-06-15 17:20:36 -07:00
Stefano Merotta
f24b98f8e2
fix: Replaces throttlers and packet callbacks with function pointers (#1063)
Replaces multi-cast delegates with function pointers to gain 25% in performance and lower allocations.
2022-06-15 12:48:43 -07:00
Kamron Batman
b779d7737f
fix: Adds ISpanFormattable support to Serial (#1065) 2022-06-14 18:39:46 -07:00
Kamron Batman
c1cc1308a5
fix: Codegens guildstone and jewelery (#1061) 2022-06-14 08:29:00 -07:00
Kamron Batman
3594e97109
fix: Updates serialization generator (#1062)
Updates the serialization and schema generators to a considerably more optimized version.
2022-06-13 23:28:33 -07:00
Kamron Batman
a07c42fc85
fix: Codegens gems (#1059) 2022-06-13 17:38:46 -07:00
Kamron Batman
368160144b
fix: Codegens games (#1058) 2022-06-13 17:31:56 -07:00
Kamron Batman
864440a05e
fix: Source generates food. (#1054) 2022-06-13 01:48:27 -07:00
Kamron Batman
59e1793c2d
fix: Codegens fillable containers (#862)
- [X] Fillable containers now relock/retrap after respawn.
- [X] Optimized the lookup and serialization.
2022-06-13 01:13:59 -07:00
Kamron Batman
db20722711
fix: Simplifies OPL (#1051) 2022-06-12 21:27:16 -07:00
Kamron Batman
b74b47159f
fix: Fixes localization corner cases with OPL (#1050)
## Changes
- [X] Adds OPL convenience methods
    - `opl.Add(cliloc, value)` and `opl.Add(value)` - value as an integer or string works just like `opl.Add(cliloc, $"{value}")`
    - `opl.AddLocalized(cliloc, clilocValue)` - works the same as `opl.Add(cliloc, $"#{clilocValue}");`
- [X] Simplifies basic `list.Add()` situations
- [X] Changes cliloc as an argument so it works with custom IPropertyList implementations (HTML)
- [X] Fixes plants so they support the old localization and new (changed in 7.0.12.0+)
- [X] Exposes more methods to override for Item to make creating custom OPL possible.

## Important Notes
* Using a ternary as an argument, like this `opl.Add(number, showType ? $"{type}\t{value}" : $"{value}");` _will not use the correct string interpolation_. This means if you use a custom PropertyList (for HTML or some other purpose), the property list won't be localized properly.
* All localization values must be interpolated, even if they are literal strings, or integers. Example: `opl.Add(number, $"{"Charges"}\t{m_Charges}");` is correct. Using the following: `$"Charges\t{m_Charges}"` will not work for custom PropertyList implementations!
2022-06-12 21:17:42 -07:00
Kamron Batman
12404ba6f6
fix: Fixes linux not enumerating directories, and wrong spelling for migration files (#1049) 2022-06-12 09:59:23 -07:00
Kamron Batman
ff1b7aa994
fix: Updates serialization generator to add serial support (#1047) 2022-06-06 17:32:57 -07:00
Kamron Batman
6e69d25e33
fix: Fixes structured logging (#1043)
- [X] Fixes various bugs in logging.
2022-06-05 01:00:22 -07:00
Kamron Batman
ecbee17690
fix: Optimizes OPL using string interpolation (#1041)
## Breaking Changes (New API)
ObjectPropertyList supports the following API:
```cs
list.Add(500000);
list.Add(500001, stringArgument);
list.Add("Some text");
list.Add($"Some text with {argument}");
list.Add(500002, $"{arg1}\t{arg2}");
```

## Notes
1. All API uses that require a formatter like this:
    ```cs
    list.Add(500002, "{0}\t{1}", arg1, arg2);
    ```
    Should be changed to use string interpolation, for example:
    ```cs
    list.Add(500002, $"{arg1}\t{arg2}");
    ```
2. The following paradigm should no longer be used:
    ```cs
    list.Add(1061170, prop.ToString()); // strength requirement ~1_val~
    ```
    The new string interpolation API will avoid having to convert the argument to a string before writing it to the packet. Instead use the following:
    ```cs
    list.Add(1061170, $"{prop}"); // strength requirement ~1_val~
    ```

### Benchmarks
```cs
|                         Method |     Mean |   Error |  StdDev |  Gen 0 | Allocated |
|------------------------------- |---------:|--------:|--------:|-------:|----------:|
|                BenchmarkOldOPL | 241.0 ns | 0.56 ns | 0.47 ns | 0.0105 |      88 B |
| BenchmarkStringInterpolatedOPL | 199.9 ns | 2.44 ns | 2.39 ns |      - |         - |
```

### Changes
- [X] Removes crash in STArray.Return when array is null.
- [X] Fixes NPE in OPL when entity is null. Serial in packet will be 0 when entity is null.
- [X] Fixes NPE in AosAttributes when Parent is null.
- [X] Changes OPL to use string interpolation.
- [X] Introduces `IPropertyList` to allow extending PropertyList for other uses.
2022-06-02 10:09:53 -07:00
Kamron Batman
98a74a89c7
fix: Fixes drag drop bounce issue (#1040) 2022-05-30 15:47:06 -07:00