/// <summary> /// Send the information for the given subscription. /// </summary> /// <param name="SubscriptionName">The type of subscription.</param> /// <param name="CurrentDay">The amount of days into the month.</param> /// <param name="ElapsedMonths">The amount of passed months.</param> /// <param name="PrepaidMonths">The amount of unused months.</param> /// <param name="IsActive">Is the subscription active?</param> public static void Send_SubscriptionInfo(this PacketSender PS, string SubscriptionName, byte CurrentDay, byte ElapsedMonths, byte PrepaidMonths, bool IsActive) { OutgoingMessage Message = new OutgoingMessage(7); // "@G" Message.AppendString(SubscriptionName); Message.AppendInt32(CurrentDay); Message.AppendInt32(ElapsedMonths); Message.AppendInt32(PrepaidMonths); Message.AppendBoolean(IsActive); }
public void Serialize(OutgoingMessage Message) { if (Message.ID != 12) { Message.AppendBoolean(false); // TODO: Find out what this does } Message.AppendUInt32(this.fUser.GetID()); // User ID Message.AppendString(this.fUser.GetUsername()); // Username Message.AppendBoolean(false); // Not sure what this does Message.AppendBoolean(this.fUser.IsLoggedIn()); // Logged In Message.AppendBoolean(this.fUser.GetRoom() != null); // In Room Message.AppendString(this.fUser.GetFigure()); // Figure Message.AppendUInt32(this.fLocalCategory); // Category ID if (this.fUser.IsLoggedIn()) { Message.AppendString(this.fUser.GetMotto()); // Motto Message.AppendString(""); // Last Access (N/A) } else { Message.AppendString("Offline"); // Motto ("Offline" in this case) Message.AppendString(this.fUser.GetLastAccess().ToString()); // Last Access } }
internal byte[] GetRawUpdate() { OutgoingMessage Message = new OutgoingMessage(); Message.AppendBoolean(true); // TODO: Find out what this does Message.AppendUInt32(this.fUser.GetID()); // User ID Message.AppendString(this.fUser.GetUsername()); // Username Message.AppendBoolean(true); // Not sure what this does Message.AppendBoolean(this.fUser.IsLoggedIn()); // Logged In Message.AppendBoolean(this.fUser.GetRoom() != null); // In Room Message.AppendString(this.fUser.GetFigure()); // Figure Message.AppendUInt32(this.fLocalCategory); // Category ID if (this.fUser.IsLoggedIn()) { Message.AppendString(this.fUser.GetMotto()); // Motto Message.AppendString(""); // Last Access (N/A) } else { Message.AppendString("Offline"); // Motto ("Offline" in this case) Message.AppendString(this.fUser.GetLastAccess().ToString()); // Last Access } return(Message.GetBytes()); }
public void Serialize(OutgoingMessage Message) { Message.AppendUInt32(this.fID); Message.AppendString(this.fName); }