Skip to content

Commit 56691ec

Browse files
committed
chore: adjust protocol
1 parent f156ace commit 56691ec

File tree

6 files changed

+41
-1
lines changed

6 files changed

+41
-1
lines changed

src/OTAPI.UnifiedServerProcess/Core/Patching/FieldFilterPatching/ForceInstanceProcessor.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ public class ForceInstanceProcessor() : IFieldFilterArgProcessor
1616
"Terraria.Main.autoGen",
1717
"Terraria.Main.AutogenSeedName",
1818
"Terraria.Main.AutogenProgress",
19+
"Terraria.NPC.defaultMaxSpawns",
20+
"Terraria.NPC.defaultSpawnRate",
1921
};
2022
readonly static string[] types = new string[] {
2123
"Terraria.ObjectData.TileObjectData",
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace TrProtocol.Models
8+
{
9+
public enum DoorAction : byte
10+
{
11+
OpenDoor = 0,
12+
CloseDoor,
13+
OpenTrapdoor,
14+
CloseTrapdoor,
15+
OpenTallGate,
16+
CloseTallGate
17+
}
18+
}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
using Terraria.DataStructures;
2+
using TrProtocol.Models;
23

34
namespace TrProtocol.NetPackets;
45

56
public partial struct ChangeDoor : INetPacket
67
{
78
public readonly MessageID Type => MessageID.ChangeDoor;
8-
public bool ChangeType;
9+
public DoorAction ChangeType;
910
public Point16 Position;
1011
public byte Direction;
1112
}

src/TrProtocol/NetPackets/PaintTile.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ public partial struct PaintTile : INetPacket
77
public readonly MessageID Type => MessageID.PaintTile;
88
public Point16 Position;
99
public byte Color;
10+
public byte CoatPaint;
1011
}

src/TrProtocol/NetPackets/PaintWall.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ public partial struct PaintWall : INetPacket
77
public readonly MessageID Type => MessageID.PaintWall;
88
public Point16 Position;
99
public byte Color;
10+
public byte CoatPaint;
1011
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using TrProtocol.Models.Interfaces;
7+
8+
namespace TrProtocol.NetPackets
9+
{
10+
public partial struct UnusedStrikeNPC : INetPacket, INPCSlot, IPlayerSlot
11+
{
12+
public readonly MessageID Type => MessageID.UnusedStrikeNPC;
13+
14+
public short NPCSlot { get; set; }
15+
public byte PlayerSlot { get; set; }
16+
}
17+
}

0 commit comments

Comments
 (0)