public bool Validator(ZoneConnectData data) { if (data.id > 65535) // TODO: validate player id exists and is currently logged in { return(false); } Logger.Success("we got 0x00A"); return(true); }
public bool Handler(Player player, byte[] bytes) { if (bytes.Length < MinSize || bytes.Length > MaxSize) { return(false); } ZoneConnectData zoneConnectData = Utility.Deserialize <ZoneConnectData>(bytes); if (Validator(zoneConnectData)) { // TODO: Handle the packet return(true); } return(false); }