public static uint Size(Nobility packet) { switch (packet.Type) { case NobilityAction.Info: return((uint)(40 + packet.String3.Length)); case NobilityAction.Donate: return(40); case NobilityAction.QueryRemainingSilver: return(40); case NobilityAction.List: var page = Managers.NobilityManager.GetPage((int)packet.Data1); if (page != null) { return((uint)(page.Length)); } else { return(60); } default: return(40); } }
public static Nobility UpdateIcon(Player user) { Nobility packet = new Nobility(); packet.Type = NobilityAction.Info; packet.Data1 = user.UID; packet.String3 = user.UID + " " + user.Donation + " " + (byte)user.NobilityMedal + " " + user.NobilityRank; //EXAMPLE STRING = user.UID + " " + 100000000 + " " + 12 + " " + 1; ID DONATION MEDAL RANK return(packet); }