Fixed player info packet
This commit is contained in:
parent
ceefbfdb03
commit
8f934c89dc
1 changed files with 4 additions and 3 deletions
|
|
@ -145,8 +145,9 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
byte playerid = args.Data.ReadInt8();
|
byte playerid = args.Data.ReadInt8();
|
||||||
byte hair = args.Data.ReadInt8();
|
byte hair = args.Data.ReadInt8();
|
||||||
|
byte male = args.Data.ReadInt8();
|
||||||
args.Data.Position += 21;
|
args.Data.Position += 21;
|
||||||
bool hardcore = args.Data.ReadBoolean();
|
bool difficulty = args.Data.ReadBoolean();
|
||||||
string name = Encoding.ASCII.GetString(args.Data.ReadBytes((int)(args.Data.Length - args.Data.Position - 1)));
|
string name = Encoding.ASCII.GetString(args.Data.ReadBytes((int)(args.Data.Length - args.Data.Position - 1)));
|
||||||
|
|
||||||
if (hair >= Main.maxHair)
|
if (hair >= Main.maxHair)
|
||||||
|
|
@ -179,11 +180,11 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
return Tools.HandleGriefer(args.Player, "Sent client info more than once");
|
return Tools.HandleGriefer(args.Player, "Sent client info more than once");
|
||||||
}
|
}
|
||||||
if (TShock.Config.HardcoreOnly && !hardcore)
|
/*if (TShock.Config.HardcoreOnly && !hardcore)
|
||||||
{
|
{
|
||||||
Tools.ForceKick(args.Player, "Server is set to hardcore characters only!");
|
Tools.ForceKick(args.Player, "Server is set to hardcore characters only!");
|
||||||
return true;
|
return true;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
args.Player.ReceivedInfo = true;
|
args.Player.ReceivedInfo = true;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue