Fixes packet length & PropertyList (#82)

This commit is contained in:
Kamron Batman 2020-01-21 21:00:56 -08:00 committed by GitHub
parent 1f1ceade8c
commit 27e8d823bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 251 additions and 225 deletions

View file

@ -567,7 +567,8 @@ namespace Server.Network
}
int count = pvSrc.ReadUInt16();
if (count < 100 && pvSrc.Length == 1 + 2 + 4 + 2 + count * 6)
if (count < 100 && pvSrc.Length == 4 + 2 + count * 6)
{
List<SellItemResponse> sellList = new List<SellItemResponse>(count);
@ -662,7 +663,7 @@ namespace Server.Network
huePicker.OnResponse(hue);
break;
}
}
}
public static void SystemInfo(NetState state, PacketReader pvSrc)
@ -1490,7 +1491,7 @@ namespace Server.Network
{
if (state.Mobile == null)
Console.WriteLine(
"Client: {0}: Sent ingame packet (0xBFx{1:X2}) before having been attached to a mobile", state,
"Client: {0}: Sent in-game packet (0xBFx{1:X2}) before having been attached to a mobile", state,
packetID);
state.Dispose();
}
@ -1556,7 +1557,7 @@ namespace Server.Network
Mobile from = state.Mobile;
long length = pvSrc.Length - 3;
long length = pvSrc.Length;
if (length < 0 || length % 4 != 0)
return;
@ -2122,7 +2123,7 @@ namespace Server.Network
name, female, hue,
str, dex, intl,
info[cityIndex],
new SkillNameValue[]
new[]
{
new SkillNameValue((SkillName)is1, vs1),
new SkillNameValue((SkillName)is2, vs2),
@ -2239,7 +2240,7 @@ namespace Server.Network
name, female, hue,
str, dex, intl,
info[cityIndex],
new SkillNameValue[]
new[]
{
new SkillNameValue((SkillName)is1, vs1),
new SkillNameValue((SkillName)is2, vs2),