public HostBanPlayerEventArgs(HMessage packet) { _packet = packet; Header = _packet.Header; PlayerId = _packet.ReadInt(0); RoomId = _packet.ReadInt(4); Ban = SKore.ToBan(_packet.ReadString(8)); }
/// <summary> /// Returns the primitive value for the specified <see cref="HBan"/>. /// </summary> /// <param name="ban">The <see cref="HBan"/> you wish to retrieve the primitive value from.</param> /// <returns></returns> public static string Juice(this HBan ban) { switch (ban) { default: case HBan.Day: return("RWUAM_BAN_USER_DAY"); case HBan.Hour: return("RWUAM_BAN_USER_HOUR"); case HBan.Permanent: return("RWUAM_BAN_USER_PERM"); } }