-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathABigStick.cs
35 lines (32 loc) · 1022 Bytes
/
ABigStick.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.IO;
using Terraria;
using Terraria.ModLoader;
namespace ABigStick
{
public enum ABigStickMessageType
{
SyncABigPlayer
}
class ABigStick : Mod
{
public ABigStick()
{
this.ContentAutoloadingEnabled = true;
this.GoreAutoloadingEnabled = true;
this.MusicAutoloadingEnabled = true;
this.BackgroundAutoloadingEnabled = true;
}
public override void HandlePacket(BinaryReader reader, int whoAmI)
{
ABigStickMessageType msgType = (ABigStickMessageType)reader.ReadByte();
switch (msgType)
{
case ABigStickMessageType.SyncABigPlayer:
byte playernumber = reader.ReadByte();
ABigPlayer bigPlayer = Main.player[playernumber].GetModPlayer<ABigPlayer>();
bigPlayer.hasTearNet = reader.ReadBoolean();
break;
}
}
}
}