public bool Validator(SearchCommentData data) { if (data.empty != 0) { return(false); } Logger.Success("we got 0x0E0"); return(true); }
public bool Handler(Player player, byte[] bytes) { if (bytes.Length < MinSize || bytes.Length > MaxSize) { return(false); } SearchCommentData SearchCommentData = Utility.Deserialize <SearchCommentData>(bytes); if (Validator(SearchCommentData)) { // TODO: Handle the packet by updating the players search comment and flags return(true); } return(false); }