Commit graph

1531 commits

Author SHA1 Message Date
Kamron Batman
c50322c0e3
fix(network): Adds UOG & Fixes ConnectUO packet (#552)
- [X] Adds UOG Extended and Compact (0xF1 0x51 packet)
- [X] Fixes ConnectUO bad length
2021-03-15 16:18:28 -07:00
Kamron Batman
5e3b42bf9c
fix(network): Adds ConnectUO (#551)
- [X] Adds ability to create new protocol extension packets
- [X] Adds freeshard protocol extension support (packet 0xF1)
- [X] Adds ConnectUO support
- [X] Adds arbitrary read for `CircularBufferReader` and `SpanReader`
2021-03-15 14:14:33 -07:00
Kamron Batman
76970325a3
fix(core): Fixes date time uses by using stop watch (#549)
- [X] Replaces measurements with stop watch
- [X] Some cleanup
2021-03-13 12:39:30 -08:00
Kamron Batman
6c4308bce6
fix(core): Caches DateTime.NowUtc (#548)
- [X] Caches DateTime.NowUtc on the game loop (not other threads)
- [X] Replaces all locations where it makes sense
- [X] Adds Min/Max for `IComparable` (TimeSpan, DateTimes, etc)

Closes #261
2021-03-13 01:32:04 -08:00
Kamron Batman
5de6edbeb8
fix(workflow): Fixes azure pipelines (#546)
Fixes azure pipelines not running on merge to main.
2021-03-09 23:53:08 -08:00
Kamron Batman
1ed23459bb
fix(core): Adds priority support for GenericPersistence (#545) 2021-03-09 23:49:19 -08:00
Kamron Batman
432f8d2b70
fix(core): Fixes generic persistence (#544)
- [X] Fixes generic persistence, making the API for writing from a static class much easier.

Example:
```cs
namespace Server
{
    public static class ExampleSystem
    {
        public static void Configure()
        {
            GenericPersistence.Register("ExampleSystem", Serialize, Deserialize);
        }
        
        public static void Serialize(IGenericWriter writer)
        {
            // Do serialization here
            writer.WriteEncodedInt(0); // version
        }

        public static void Deserialize(IGenericReader reader)
        {
            // Do deserialization here
            var version = reader.ReadEncodedInt();
        }
    }
}
```
2021-03-09 23:41:54 -08:00
Kamron Batman
3c88331607
fix(core): Fixes map packet length (#543) 2021-03-06 18:21:58 -08:00
Kamron Batman
73ea81052a
fix(core): Old client login flow (#542) 2021-03-06 17:45:00 -08:00
Kamron Batman
ec1cc10821
fix(network): Converts House Design Detailed Packet (#538)
- [X] Converts design state detailed packet
- [X] Removes `Packet` class
- [X] Removes `Send(Packet)` function signatures
- [X] Removes `PacketWriter` class
- [X] Updates dependencies.
2021-03-03 02:09:15 -08:00
Kamron Batman
0a435644eb
feat(spawners): Adds Respawn, EditSpawner, and SpawnProps commands (#532)
- [X] Adds `Respawn` command
- [X] Adds `EditSpawner` command
  - Usage: `[global editspawner <type> <arguments> set <properties>`
  - This command replaces the arguments (optional) and properties of the affected spawners for that type
- [X] Adds `SpawnProps` command
  - Usage: `[area spawnprops`
  - This command brings up a gump to modify targeted spawners based on the targeted entity.
  - To do this, the props/values are copied and then used to construct a properties list for the spawner entry.

Closes #531
2021-02-28 22:49:52 -08:00
Kamron Batman
af021f748a
fix(workflow): Updates workflow for docs (#528) 2021-02-27 20:14:19 -08:00
Tyler Mills
ab4294f4d6
fix(docs): Fixes UI (#527) 2021-02-27 20:02:44 -08:00
Kamron Batman
06d5cdf593
fix(serialization): Adds missing newline (#526) 2021-02-26 19:29:23 -08:00
Karol
8811c40637
fix(core): Changes GetTimestamp to not use illegal path characters (#525) 2021-02-26 11:32:23 -08:00
Kamron Batman
f1c5a098fc
fix(serialization): Skip backups on first save. Fixes timestamp format (#522) 2021-02-25 10:31:08 -08:00
Kamron Batman
8d54d273a4
fix(serialization): Updates serialization flow & fixes serializing accounts (#521) 2021-02-24 22:14:15 -08:00
Karol
78e3450671
fix(docs): Modified quick-start to correctly invoke dotnet in *Nix (#518) 2021-02-24 15:22:22 -08:00
Kamron Batman
0e79a3d3c4
fix(core): Fixes guild serialization (#517) 2021-02-23 09:35:07 -08:00
Kamron Batman
f3e8f25c42
fix(core): Fixes error with pipe reader closing. (#516) 2021-02-23 09:03:36 -08:00
Kamron Batman
da01f5b8a5
fix(core): Fixes flow for saves, adds logging and configurations (#513)
- [X] Adds better diagnostics for world saves.
- [X] Adds world save stats.
- [X] World now saves to a temporary folder.
- [X] Backups are now stored by timestamp.
- [X] Backup is now made after the world save.
- [X] "Saves" folder is now configurable.
- [X] Temporary folder is now configurable.
- [X] Backups folder is now configurable.
2021-02-20 19:32:08 -08:00
Kamron Batman
6f5312cb89
fix(core): Changes invalid gump response to write to network errors. (#510) 2021-02-15 08:31:53 -08:00
Kamron Batman
8006fa20df
fix(core): Fixes errors from missing files (#511) 2021-02-14 18:30:53 -08:00
Kamron Batman
ea5d09a7d7
fix(core): Fixes map issues at New Haven (#509)
- [X] Fixes map issues at New Haven by turning off static diffs
- [X] Some code cleanup and reformatting of tile matrix, tile matrix patch, and tile data
- [X] Adds NetState.Flush for generating spawners so it doesn't feel like the server is frozen
- [X] Reverts NativeReader changes from a while back.
- [X] Adds more string reading for BufferReader.


Notes:
BufferReader is still `little endian` compared to `SpanReader` which is `big endian` (for packets). To that end, the RunUO deserialization `ReadString()` was made obsolete since it is ambiguous, and contains extra fields other than simply reading a string. Furthermore, we shouldn't be using UTF8 (for now) since it is slow.
2021-02-14 16:06:49 -08:00
Kamron Batman
d070efeab3
fix(houses): Converts house packets (1 of 2) (#502)
- [X] Adds `ToSpan()` for SpanWriter.
- [X] Moves house files to UOContent/Multis/Houses
- [X] Adds house packets

### SpanWriter.ToSpan()
`ToSpan()` returns an `SpanOwner` struct which allows access to the buffer as a Span by calling `Span`.

Example:
```cs
public SpanOwner CreatePacket()
{
  var writer = new SpanWriter(0x400);
  // write some stuff
  return writer.ToSpan();
}
```
In this example, we are creating a packet and returning the `SpanOwner` for caching. This means in the future we can do something like this:
```cs
ns.Send(_cachedPacket.Span);
```
Where `_cachedPacket` is the `SpanOwner`

Notes:
Do not use a SpanWriter, or attempt to dispose of it after calling `ToSpan()`. Doing so will probably cause an NPE.
2021-02-13 09:18:12 -08:00
Kamron Batman
952a3e0265
fix(core): Handles a rare NPE with LoginTimer (#508) 2021-02-11 23:47:02 -08:00
Kamron Batman
b8a625dcd3
fix(network): Removes error messages for socket exceptions (#503) 2021-02-09 10:37:38 -08:00
Kamron Batman
6a80dfea00
fix(workflow): Fixes wrong branch (#505) 2021-02-09 10:32:39 -08:00
Kamron Batman
517190b820
fix(workflows): Deletes sonar cloud (#504) 2021-02-09 10:23:13 -08:00
Kamron Batman
d61f07abd5
fix(releases): Uses an access token for checkout (#501) 2021-02-08 16:33:50 -08:00
Kamron Batman
f1065b119d
fix(releases): Fixes broken merge (#500) 2021-02-08 16:24:32 -08:00
Kamron Batman
0895d43624
fix(releases): Adds git credentials (#499) 2021-02-08 16:21:03 -08:00
Kamron Batman
47dd962725
fix(releases): More cleanup (#498) 2021-02-08 15:54:48 -08:00
Kamron Batman
f107c96065
fix(releases): Add missing token for fake release tag (#497) 2021-02-08 15:51:58 -08:00
Kamron Batman
4bf8447530
fix(core): Fixes release token use (#496) 2021-02-08 15:37:00 -08:00
Kamron Batman
db76c941e6
fix(releases): Do not update tags remotely (#495) 2021-02-08 15:29:00 -08:00
Kamron Batman
ecf5a4f048
fix(release): Fixes error in syntax (#494) 2021-02-08 13:54:16 -08:00
Kamron Batman
e7f01c1326
fix(releases): Fix create release and remove old tag (#493) 2021-02-08 13:51:42 -08:00
Kamron Batman
6753822cd9
fix(releases): Adds fake release message (#492) 2021-02-08 13:43:39 -08:00
Kamron Batman
f43b1e1d4e
fix(releases): Fixes fake tag failing (#491) 2021-02-08 13:41:13 -08:00
Kamron Batman
c502af274e
fix(core): Tightens the netstate connection (#490)
- [X] Tightens TCP Server rejection/limiting
- [X] Relaxes receive task erroring so it doesn't spam on debug
- [X] Fixes off-by-one with number of netstates connected
- [X] Moves NetState start() to after it is attached to the Instances list.

Notes:
- In debug mode you may get socket exceptions related to the RecvTask or SendTask attempting to send/receive from a dead/broken socket. This can happen naturally in situations where the client is having trouble maintaining the connection, or abruptly disconnects.
2021-02-08 13:33:36 -08:00
Kamron Batman
1fd60c6f9f
fix(core): Fixes connecting with CUO/Orion (#489)
- [X] Fixes connecting with CUO/Orion.
- [X] Adds the ability to be strict with the protocol by passing STRICT_UO_PROTOCOL to the build process.
2021-02-08 11:57:00 -08:00
Kamron Batman
b9cb85855b
fix(releases): Fixes release deletion (#488) 2021-02-08 00:55:06 -08:00
Kamron Batman
17d8620cd1
fix(releases): Removes .NET 5 from releases workflow and fixes checkout tags (#487) 2021-02-08 00:51:43 -08:00
Kamron Batman
1cdd70ed46
fix(releases): Attempts to fix release tags (#486) 2021-02-08 00:45:17 -08:00
Kamron Batman
da00aef735
fix(releases): Fixes version detection (#485) 2021-02-07 23:50:07 -08:00
Kamron Batman
e75f92879f
fix(releases): Fixes version tagging (#484) 2021-02-07 23:44:29 -08:00
Kamron Batman
30dff3959a
fix(releases): Fixes release count (#483) 2021-02-07 23:35:38 -08:00
Kamron Batman
8903028b5f
fix(core): Tightens the network stack (#479)
- [X] Removes network pause/resume
- [X] Adds back packet profiler
- [X] Adds state machine to keep track and trace netstates
- [X] Changes NetState.Running back to using an interlock exchange
- [X] Adds preliminary packet throttling support


### Packet Throttling
- `[GetThrottle <packetId>` to get the delay in milliseconds for that packet
- `[SetThrottle <packetId> <delay>` to set the delay in milliseconds for that packet
The settings are saved to `Configuration/throttles.json`
2021-02-07 23:30:56 -08:00
Kamron Batman
1736469ac0
fix(releases): Updates release flow. Fixes windows builds (#482) 2021-02-07 23:30:11 -08:00