public bool Validator(PlayerActionData data) { // TODO: validate category param is valid if (data.category > 0x1A) { return(false); } Logger.Success("we got 0x01A"); return(true); }
public bool Handler(Player player, byte[] bytes) { if (bytes.Length < MinSize || bytes.Length > MaxSize) { return(false); } PlayerActionData PlayerActionData = Utility.Deserialize <PlayerActionData>(bytes); if (Validator(PlayerActionData)) { // TODO: Handle the packet by moving the player and setting their updatemask for other client updates return(true); } return(false); }