mirror of
https://github.com/DorkSquadRR/DorkNet.git
synced 2026-10-25 15:08:47 -07:00
Import december-2020-12-18 from private repo (scrubbed 2026-05-27)
Targets Rec Room 2020.12.18 client.
Re-import after adding:
- DorkNet.ClientMod/dorknet-clientmod.json.template — config schema
the launcher's manifest-driven patcher renders into UserData/.
- tools/build-patcher-zip.ps1 — produces the dorknet-clientpatch-{key}.zip
Release asset the launcher fetches.
- .github/workflows/release.yml — auto-publishes both Release assets
on v1-december-* tag push.
Scrubbed via maintainer-side scrub-for-public.ps1: same drop rules as
the prior import, plus build-patcher-zip.ps1 added to the tools/
allow-list so it survives the scrub.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Auth;
|
||||
|
||||
/// <summary>
|
||||
/// Login.CachedLogin — dump.cs:578388, Deserialize at RVA 0x1447BD0.
|
||||
///
|
||||
/// Verified by disassembly: reads platform, platformId, accountId,
|
||||
/// lastLoginTime (DateTime), requirePassword (default false). The Account
|
||||
/// field on the C# class is NOT read from the JSON dict — it is set via
|
||||
/// SetAccount(Account) after the fact, so the JSON shape doesn't need it.
|
||||
///
|
||||
/// Returned by:
|
||||
/// GET auth.rec.net/cachedlogin/forplatformid/{platform}/{platformId}
|
||||
/// GET api.rec.net/api/platformlogin/cached
|
||||
/// GET accounts.rec.net/account/v1/savedlogins
|
||||
/// as a List<CachedLogin>. Empty list = no remembered accounts.
|
||||
/// </summary>
|
||||
public class CachedLogin
|
||||
{
|
||||
// PlatformManager.PlatformType (int)
|
||||
[JsonPropertyName("platform")]
|
||||
public int Platform { get; set; }
|
||||
|
||||
[JsonPropertyName("platformId")]
|
||||
public string PlatformId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("accountId")]
|
||||
public int AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("lastLoginTime")]
|
||||
public DateTime LastLoginTime { get; set; } = DateTime.UtcNow;
|
||||
|
||||
[JsonPropertyName("requirePassword")]
|
||||
public bool RequirePassword { get; set; } = false;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace DorkNet.Models.Auth;
|
||||
|
||||
public class LoginRequest
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
public long BuildTimestamp { get; set; }
|
||||
public int Platform { get; set; }
|
||||
public string? DeviceId { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Auth;
|
||||
|
||||
/// <summary>
|
||||
/// Login.LoginResponse — dump.cs:578473 (private nested class),
|
||||
/// Deserialize at RVA 0x1447D10.
|
||||
///
|
||||
/// Verified by disassembly: this is a standard OAuth 2.0 RFC 6749
|
||||
/// password-grant token response. The Deserialize body has two branches:
|
||||
///
|
||||
/// error = dict["error"];
|
||||
/// if (string.IsNullOrEmpty(error)) {
|
||||
/// this.AccessToken = dict["access_token"];
|
||||
/// this.RefreshToken = dict["refresh_token"];
|
||||
/// } else {
|
||||
/// this.ErrorDescription = dict["error_description"];
|
||||
/// }
|
||||
///
|
||||
/// Returned by api/platformlogin/v5 (the 2020 build's login endpoint)
|
||||
/// and api/platformlogin/refresh.
|
||||
///
|
||||
/// All four keys are snake_case, NOT PascalCase. This is the standard
|
||||
/// OAuth response format — Rec Room conforms to RFC 6749 here.
|
||||
/// </summary>
|
||||
public class LoginResponse
|
||||
{
|
||||
[JsonPropertyName("error")]
|
||||
public string? Error { get; set; }
|
||||
|
||||
[JsonPropertyName("error_description")]
|
||||
public string? ErrorDescription { get; set; }
|
||||
|
||||
[JsonPropertyName("access_token")]
|
||||
public string AccessToken { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("refresh_token")]
|
||||
public string RefreshToken { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,129 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Auth;
|
||||
|
||||
// =====================================================================
|
||||
// JSON keys verified by disassembling each .Deserialize method body
|
||||
// directly from GameAssembly.dll. Each key here is the literal string
|
||||
// passed to Util.GetKey / Util.GetKeyOrDefault inside the client. Util.GetKey
|
||||
// uses Dictionary<string,object>.TryGetValue, which is case-sensitive — so
|
||||
// the keys MUST match exactly.
|
||||
//
|
||||
// Convention summary (it's mixed):
|
||||
// RecNetResult lowercase "success", "error"
|
||||
// Account camelCase "accountId", "displayName", "isJunior"…
|
||||
// SelfAccount camelCase "email", "birthday", "juniorState"…
|
||||
// LoginResponse snake_case (OAuth) "access_token", "error_description"…
|
||||
// RefreshLoginResp. lowercase "token"
|
||||
// CachedLogin camelCase "platformId", "lastLoginTime"…
|
||||
// CreateAccountResp uses "value" as the wrapper key for the Account dict
|
||||
//
|
||||
// NOTE: TreatAsJunior on the C# side maps to JSON key "isJunior" — they
|
||||
// don't match. Account.Deserialize reads dict["isJunior"], not dict["treatAsJunior"].
|
||||
// =====================================================================
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.RecNetResult — dump.cs:584325, Deserialize at RVA 0x1146340.
|
||||
/// Reads "success" (required) and "error" (optional).
|
||||
/// </summary>
|
||||
public class RecNetResult
|
||||
{
|
||||
[JsonPropertyName("success")]
|
||||
public bool Success { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("error")]
|
||||
public string? Error { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.Account — dump.cs:567684, Deserialize at RVA 0xF9DE50.
|
||||
/// JSON keys verified in the current 2020 IL2CPP build. Account.Deserialize
|
||||
/// reads profileImage.
|
||||
/// Other keys: accountId, username, displayName, isJunior, platforms. The C# Account class also has
|
||||
/// RawUsername and HasBirthday properties but Deserialize does not read
|
||||
/// them from JSON (they're set via MakeNameAdhereToPlatformRequirements
|
||||
/// or other flows). We expose them with reasonable camelCase keys for
|
||||
/// other endpoints that may consume them.
|
||||
/// </summary>
|
||||
public class RecNetAccount
|
||||
{
|
||||
private string profileImage = string.Empty;
|
||||
|
||||
[JsonPropertyName("accountId")]
|
||||
public int AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("username")]
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("displayName")]
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("profileImage")]
|
||||
public string ProfileImage
|
||||
{
|
||||
get => profileImage;
|
||||
set => profileImage = value ?? string.Empty;
|
||||
}
|
||||
|
||||
// Account.Deserialize reads "isJunior" — NOT "treatAsJunior".
|
||||
// The C# property name and the JSON key name differ.
|
||||
[JsonPropertyName("isJunior")]
|
||||
public bool TreatAsJunior { get; set; } = false;
|
||||
|
||||
// PlatformManager.PlatformMask: Steam=1, Oculus=2, etc.
|
||||
[JsonPropertyName("platforms")]
|
||||
public int Platforms { get; set; } = 1;
|
||||
|
||||
// Not in Account.Deserialize body but kept for forward-compat.
|
||||
[JsonPropertyName("rawUsername")]
|
||||
public string RawUsername { get; set; } = string.Empty;
|
||||
|
||||
// Likewise.
|
||||
[JsonPropertyName("hasBirthday")]
|
||||
public bool HasBirthday { get; set; } = true;
|
||||
|
||||
// 2020.12 Account.Deserialize reads this key (verified via Cpp2IL ISIL
|
||||
// dump of CCEOLAOLEKJ.PPGFHEDFBEA — the obfuscated Account class). The
|
||||
// 2020.03 client doesn't read it, but emitting it is harmless there.
|
||||
// Missing → LitJson throws and 2020.12 surfaces "Malformed Response".
|
||||
[JsonPropertyName("createdAt")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.SelfAccount : Account — dump.cs:567797, Deserialize at RVA 0xAF4FB0.
|
||||
/// Calls base Account.Deserialize, then reads:
|
||||
/// email, phone, birthday, juniorState, parentAccountId.
|
||||
/// </summary>
|
||||
public class RecNetSelfAccount : RecNetAccount
|
||||
{
|
||||
[JsonPropertyName("email")]
|
||||
public string Email { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("phone")]
|
||||
public string Phone { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("birthday")]
|
||||
public DateTime? Birthday { get; set; } = new DateTime(2000, 1, 1);
|
||||
|
||||
// RecNet.JuniorState enum (int)
|
||||
[JsonPropertyName("juniorState")]
|
||||
public int JuniorState { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("parentAccountId")]
|
||||
public int? ParentAccountId { get; set; } = null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Accounts.CreateAccountResponse : RecNetResult — dump.cs:568167,
|
||||
/// Deserialize at RVA 0xFAA200.
|
||||
/// Calls base RecNetResult.Deserialize (reads "success", "error"),
|
||||
/// then reads the Account from dict["value"] — NOT dict["account"].
|
||||
/// Verified by disassembly: the only string literal after the base
|
||||
/// call is "value", passed to Util.GetObjectKey<object>.
|
||||
/// </summary>
|
||||
public class CreateAccountResponse : RecNetResult
|
||||
{
|
||||
[JsonPropertyName("value")]
|
||||
public RecNetAccount Account { get; set; } = new();
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Auth;
|
||||
|
||||
/// <summary>
|
||||
/// Login.RefreshLoginResponse — dump.cs:578533 (private nested class),
|
||||
/// Deserialize at RVA 0x145B1E0.
|
||||
///
|
||||
/// Verified by disassembly: reads exactly one key — lowercase "token" —
|
||||
/// via Util.GetKey<string>. Single-field response from
|
||||
/// POST api/platformlogin/refresh: the new (rotated) bearer access token.
|
||||
/// </summary>
|
||||
public class RefreshLoginResponse
|
||||
{
|
||||
[JsonPropertyName("token")]
|
||||
public string Token { get; set; } = string.Empty;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Avatar;
|
||||
|
||||
public class AvatarData
|
||||
{
|
||||
[JsonPropertyName("AccountId")]
|
||||
public long AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("AvatarItemInstances")]
|
||||
public List<AvatarItemInstance> AvatarItemInstances { get; set; } = [];
|
||||
}
|
||||
|
||||
public class AvatarItemInstance
|
||||
{
|
||||
[JsonPropertyName("Id")]
|
||||
public long Id { get; set; }
|
||||
|
||||
[JsonPropertyName("ItemId")]
|
||||
public long ItemId { get; set; }
|
||||
|
||||
[JsonPropertyName("IsEquipped")]
|
||||
public bool IsEquipped { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Avatar;
|
||||
|
||||
public class AvatarItem
|
||||
{
|
||||
[JsonPropertyName("ItemId")]
|
||||
public long ItemId { get; set; }
|
||||
|
||||
[JsonPropertyName("Name")]
|
||||
public string Name { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("Equipped")]
|
||||
public bool Equipped { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,174 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Config;
|
||||
|
||||
// Required keys per RecNet.RecRoomConfig.Deserialize disassembly (RVA 0x1146FA0).
|
||||
// Required-throw keys: ShareBaseUrl, LevelProgressionMaps[].Level, [].RequiredXp.
|
||||
// Required-object keys (GetObjectKey, accept null): ServerMaintenance,
|
||||
// AutoMicMutingConfig.
|
||||
//
|
||||
// NOTE: the level entry uses "RequiredXp" (lowercase 'p') per the IL string
|
||||
// literal — NOT "RequiredXP". A capital P here would throw KeyNotFoundException.
|
||||
public class RecRoomConfig
|
||||
{
|
||||
[JsonPropertyName("MessageOfTheDay")]
|
||||
public string MessageOfTheDay { get; set; } = "Welcome to the private server!";
|
||||
|
||||
[JsonPropertyName("CdnBaseUri")]
|
||||
public string CdnBaseUri { get; set; } = string.Empty;
|
||||
|
||||
// Required by client (string, GetKey). Used for share-link generation.
|
||||
[JsonPropertyName("ShareBaseUrl")]
|
||||
public string ShareBaseUrl { get; set; } = "https://rec.net/";
|
||||
|
||||
// GetObjectKey<ServerMaintenanceDTO>. Required key. The deserializer
|
||||
// accepts null without throwing, but the C# property getter on the
|
||||
// client doesn't null-check before use during boot. Send a real DTO
|
||||
// with StartsInMinutes far in the future = "no upcoming maintenance".
|
||||
[JsonPropertyName("ServerMaintenance")]
|
||||
public ServerMaintenanceDTO? ServerMaintenance { get; set; } = new();
|
||||
|
||||
// GetObjectKey<AutoMicMutingConfig>. Required by the client AND
|
||||
// dereferenced by AudioManager.Initialize during PostLogin boot —
|
||||
// null causes:
|
||||
// NullReferenceException at RecNet.Config.get_AutoMicMutingConfig
|
||||
// at AudioManager.Initialize
|
||||
// which kills the boot sequence with "Error initializing Core Systems".
|
||||
// Must be a real object with all 8 float fields populated.
|
||||
[JsonPropertyName("AutoMicMutingConfig")]
|
||||
public AutoMicMutingConfig AutoMicMutingConfig { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("PhotonConfig")]
|
||||
public PhotonConfig PhotonConfig { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("MatchmakingParams")]
|
||||
public MatchmakingParams MatchmakingParams { get; set; } = new();
|
||||
|
||||
[JsonPropertyName("LevelProgressionMaps")]
|
||||
public List<LevelProgressionEntry> LevelProgressionMaps { get; set; } = LevelProgressionEntry.Default();
|
||||
|
||||
[JsonPropertyName("DailyObjectives")]
|
||||
public List<List<DailyObjective>> DailyObjectives { get; set; } = DailyObjective.DefaultSets();
|
||||
|
||||
[JsonPropertyName("ConfigTable")]
|
||||
public Dictionary<string, string> ConfigTable { get; set; } = [];
|
||||
|
||||
[JsonPropertyName("ServiceUrls")]
|
||||
public Dictionary<string, string> ServiceUrls { get; set; } = [];
|
||||
}
|
||||
|
||||
public class PhotonConfig
|
||||
{
|
||||
[JsonPropertyName("AppId")]
|
||||
public string AppId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("VoiceAppId")]
|
||||
public string VoiceAppId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("CloudRegion")]
|
||||
public string CloudRegion { get; set; } = "us";
|
||||
|
||||
[JsonPropertyName("CrcCheckEnabled")]
|
||||
public bool CrcCheckEnabled { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("EnableServerTracingAfterDisconnect")]
|
||||
public bool EnableServerTracingAfterDisconnect { get; set; } = false;
|
||||
}
|
||||
|
||||
public class MatchmakingParams
|
||||
{
|
||||
[JsonPropertyName("MaxPlayersPerRoom")]
|
||||
public int MaxPlayersPerRoom { get; set; } = 8;
|
||||
|
||||
[JsonPropertyName("MinPlayersToStart")]
|
||||
public int MinPlayersToStart { get; set; } = 1;
|
||||
}
|
||||
|
||||
public class LevelProgressionEntry
|
||||
{
|
||||
[JsonPropertyName("Level")]
|
||||
public int Level { get; set; }
|
||||
|
||||
// Note the lowercase 'p' — the client's RecRoomConfig.Deserialize calls
|
||||
// Util.GetKey<int>("RequiredXp", ...). PascalCase XP would miss.
|
||||
[JsonPropertyName("RequiredXp")]
|
||||
public int RequiredXp { get; set; }
|
||||
|
||||
public static List<LevelProgressionEntry> Default()
|
||||
{
|
||||
var entries = new List<LevelProgressionEntry>();
|
||||
for (int i = 0; i <= 30; i++)
|
||||
entries.Add(new LevelProgressionEntry { Level = i, RequiredXp = i * 500 });
|
||||
return entries;
|
||||
}
|
||||
}
|
||||
|
||||
// Inner item shape for RecRoomConfig.DailyObjectives, verified by the
|
||||
// disassembled iteration body — only "type" and "score" are read. Other
|
||||
// fields the client doesn't read get ignored, so we only send these two.
|
||||
public class DailyObjective
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
public int Type { get; set; }
|
||||
|
||||
[JsonPropertyName("score")]
|
||||
public int Score { get; set; }
|
||||
|
||||
public static List<List<DailyObjective>> DefaultSets()
|
||||
{
|
||||
var sets = new List<List<DailyObjective>>();
|
||||
for (int day = 0; day < 7; day++)
|
||||
{
|
||||
sets.Add(
|
||||
[
|
||||
new DailyObjective { Type = 1, Score = 50 },
|
||||
new DailyObjective { Type = 2, Score = 30 },
|
||||
new DailyObjective { Type = 3, Score = 20 },
|
||||
]);
|
||||
}
|
||||
return sets;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.AutoMicMutingConfig — dump.cs class, Deserialize at RVA 0xFA3AE0.
|
||||
/// All 8 float fields are required (Util.GetKey<float>). Defaults are
|
||||
/// "feature effectively disabled" — high thresholds, no force-mute.
|
||||
/// </summary>
|
||||
public class AutoMicMutingConfig
|
||||
{
|
||||
[JsonPropertyName("MicSpamVolumeThreshold")]
|
||||
public float MicSpamVolumeThreshold { get; set; } = 1.0f;
|
||||
|
||||
[JsonPropertyName("MicVolumeSampleInterval")]
|
||||
public float MicVolumeSampleInterval { get; set; } = 0.1f;
|
||||
|
||||
[JsonPropertyName("MicVolumeSampleRollingWindowLength")]
|
||||
public float MicVolumeSampleRollingWindowLength { get; set; } = 5.0f;
|
||||
|
||||
[JsonPropertyName("MicSpamSamplePercentageForWarning")]
|
||||
public float MicSpamSamplePercentageForWarning { get; set; } = 1.0f;
|
||||
|
||||
[JsonPropertyName("MicSpamSamplePercentageForWarningToEnd")]
|
||||
public float MicSpamSamplePercentageForWarningToEnd { get; set; } = 0.5f;
|
||||
|
||||
[JsonPropertyName("MicSpamSamplePercentageForForceMute")]
|
||||
public float MicSpamSamplePercentageForForceMute { get; set; } = 1.0f;
|
||||
|
||||
[JsonPropertyName("MicSpamSamplePercentageForForceMuteToEnd")]
|
||||
public float MicSpamSamplePercentageForForceMuteToEnd { get; set; } = 0.5f;
|
||||
|
||||
[JsonPropertyName("MicSpamWarningStateVolumeMultiplier")]
|
||||
public float MicSpamWarningStateVolumeMultiplier { get; set; } = 1.0f;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.ServerMaintenanceDTO — dump.cs, Deserialize at RVA 0xAF5450.
|
||||
/// Single required key: StartsInMinutes (int). A large positive value
|
||||
/// means "maintenance window is far away" = effectively never.
|
||||
/// </summary>
|
||||
public class ServerMaintenanceDTO
|
||||
{
|
||||
[JsonPropertyName("StartsInMinutes")]
|
||||
public int StartsInMinutes { get; set; } = int.MaxValue;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,261 @@
|
||||
version=1
|
||||
|
||||
# This file caches language service data to improve the performance of C# Dev Kit.
|
||||
# It is not intended for manual editing. It can safely be deleted and will be
|
||||
# regenerated automatically. For more information, see https://aka.ms/lscache
|
||||
#
|
||||
# To control where cache files are stored, use the following VS Code setting:
|
||||
# "dotnet.projectsystem.cacheInProjectFolder": true
|
||||
|
||||
[project]
|
||||
language=C#
|
||||
primary
|
||||
lastDtbSucceeded
|
||||
|
||||
[properties]
|
||||
AssemblyName=DorkNet.Models
|
||||
CommandLineArgsForDesignTimeEvaluation=-langversion:13.0 -define:TRACE
|
||||
CompilerGeneratedFilesOutputPath=
|
||||
MaxSupportedLangVersion=13.0
|
||||
ProjectAssetsFile=<PATH>obj/project.assets.json
|
||||
RootNamespace=DorkNet.Models
|
||||
RunAnalyzers=
|
||||
RunAnalyzersDuringLiveAnalysis=
|
||||
SolutionPath=<PATH>../DorkNet.sln
|
||||
TargetFrameworkIdentifier=.NETCoreApp
|
||||
TargetPath=<PATH>bin/Debug/net9.0/DorkNet.Models.dll
|
||||
TargetRefPath=<PATH>obj/Debug/net9.0/ref/DorkNet.Models.dll
|
||||
TemporaryDependencyNodeTargetIdentifier=net9.0
|
||||
|
||||
[commandLineArguments]
|
||||
/noconfig
|
||||
/unsafe-
|
||||
/checked-
|
||||
/nowarn:1701,1702,1701,1702
|
||||
/fullpaths
|
||||
/nostdlib+
|
||||
/errorreport:prompt
|
||||
/warn:9
|
||||
/define:TRACE;DEBUG;NET;NET9_0;NETCOREAPP;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NET7_0_OR_GREATER;NET8_0_OR_GREATER;NET9_0_OR_GREATER;NETCOREAPP1_0_OR_GREATER;NETCOREAPP1_1_OR_GREATER;NETCOREAPP2_0_OR_GREATER;NETCOREAPP2_1_OR_GREATER;NETCOREAPP2_2_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER
|
||||
/highentropyva+
|
||||
/nullable:enable
|
||||
/debug+
|
||||
/debug:portable
|
||||
/filealign:512
|
||||
/optimize-
|
||||
/out:obj\Debug\net9.0\DorkNet.Models.dll
|
||||
/refout:obj\Debug\net9.0\refint\DorkNet.Models.dll
|
||||
/target:library
|
||||
/warnaserror-
|
||||
/utf8output
|
||||
/deterministic+
|
||||
/langversion:13.0
|
||||
/warnaserror+:NU1605,SYSLIB0011
|
||||
|
||||
[sourceFiles]
|
||||
Auth/
|
||||
CachedLogin.cs
|
||||
LoginRequest.cs
|
||||
LoginResponse.cs
|
||||
RecNetResult.cs
|
||||
RefreshLoginResponse.cs
|
||||
Avatar/
|
||||
AvatarData.cs
|
||||
AvatarItem.cs
|
||||
Config/RecRoomConfig.cs
|
||||
GameSessions/GameSession.cs
|
||||
Notification/PushNotification.cs
|
||||
obj/Debug/net9.0/
|
||||
.NETCoreApp,Version=v9.0.AssemblyAttributes.cs
|
||||
DorkNet.Models.AssemblyInfo.cs
|
||||
DorkNet.Models.GlobalUsings.g.cs
|
||||
Players/
|
||||
ModerationBlockDetail.cs
|
||||
PlayerProfile.cs
|
||||
Progression.cs
|
||||
Reputation.cs
|
||||
UpdateProfileRequest.cs
|
||||
Relationships/Relationship.cs
|
||||
|
||||
[metadataReferences]
|
||||
<DOTNET>/packs/Microsoft.NETCore.App.Ref/9.0.16/ref/net9.0/
|
||||
Microsoft.CSharp.dll
|
||||
Microsoft.VisualBasic.Core.dll
|
||||
Microsoft.VisualBasic.dll
|
||||
Microsoft.Win32.Primitives.dll
|
||||
Microsoft.Win32.Registry.dll
|
||||
mscorlib.dll
|
||||
netstandard.dll
|
||||
System.AppContext.dll
|
||||
System.Buffers.dll
|
||||
System.Collections.Concurrent.dll
|
||||
System.Collections.dll
|
||||
System.Collections.Immutable.dll
|
||||
System.Collections.NonGeneric.dll
|
||||
System.Collections.Specialized.dll
|
||||
System.ComponentModel.Annotations.dll
|
||||
System.ComponentModel.DataAnnotations.dll
|
||||
System.ComponentModel.dll
|
||||
System.ComponentModel.EventBasedAsync.dll
|
||||
System.ComponentModel.Primitives.dll
|
||||
System.ComponentModel.TypeConverter.dll
|
||||
System.Configuration.dll
|
||||
System.Console.dll
|
||||
System.Core.dll
|
||||
System.Data.Common.dll
|
||||
System.Data.DataSetExtensions.dll
|
||||
System.Data.dll
|
||||
System.Diagnostics.Contracts.dll
|
||||
System.Diagnostics.Debug.dll
|
||||
System.Diagnostics.DiagnosticSource.dll
|
||||
System.Diagnostics.FileVersionInfo.dll
|
||||
System.Diagnostics.Process.dll
|
||||
System.Diagnostics.StackTrace.dll
|
||||
System.Diagnostics.TextWriterTraceListener.dll
|
||||
System.Diagnostics.Tools.dll
|
||||
System.Diagnostics.TraceSource.dll
|
||||
System.Diagnostics.Tracing.dll
|
||||
System.dll
|
||||
System.Drawing.dll
|
||||
System.Drawing.Primitives.dll
|
||||
System.Dynamic.Runtime.dll
|
||||
System.Formats.Asn1.dll
|
||||
System.Formats.Tar.dll
|
||||
System.Globalization.Calendars.dll
|
||||
System.Globalization.dll
|
||||
System.Globalization.Extensions.dll
|
||||
System.IO.Compression.Brotli.dll
|
||||
System.IO.Compression.dll
|
||||
System.IO.Compression.FileSystem.dll
|
||||
System.IO.Compression.ZipFile.dll
|
||||
System.IO.dll
|
||||
System.IO.FileSystem.AccessControl.dll
|
||||
System.IO.FileSystem.dll
|
||||
System.IO.FileSystem.DriveInfo.dll
|
||||
System.IO.FileSystem.Primitives.dll
|
||||
System.IO.FileSystem.Watcher.dll
|
||||
System.IO.IsolatedStorage.dll
|
||||
System.IO.MemoryMappedFiles.dll
|
||||
System.IO.Pipelines.dll
|
||||
System.IO.Pipes.AccessControl.dll
|
||||
System.IO.Pipes.dll
|
||||
System.IO.UnmanagedMemoryStream.dll
|
||||
System.Linq.dll
|
||||
System.Linq.Expressions.dll
|
||||
System.Linq.Parallel.dll
|
||||
System.Linq.Queryable.dll
|
||||
System.Memory.dll
|
||||
System.Net.dll
|
||||
System.Net.Http.dll
|
||||
System.Net.Http.Json.dll
|
||||
System.Net.HttpListener.dll
|
||||
System.Net.Mail.dll
|
||||
System.Net.NameResolution.dll
|
||||
System.Net.NetworkInformation.dll
|
||||
System.Net.Ping.dll
|
||||
System.Net.Primitives.dll
|
||||
System.Net.Quic.dll
|
||||
System.Net.Requests.dll
|
||||
System.Net.Security.dll
|
||||
System.Net.ServicePoint.dll
|
||||
System.Net.Sockets.dll
|
||||
System.Net.WebClient.dll
|
||||
System.Net.WebHeaderCollection.dll
|
||||
System.Net.WebProxy.dll
|
||||
System.Net.WebSockets.Client.dll
|
||||
System.Net.WebSockets.dll
|
||||
System.Numerics.dll
|
||||
System.Numerics.Vectors.dll
|
||||
System.ObjectModel.dll
|
||||
System.Reflection.DispatchProxy.dll
|
||||
System.Reflection.dll
|
||||
System.Reflection.Emit.dll
|
||||
System.Reflection.Emit.ILGeneration.dll
|
||||
System.Reflection.Emit.Lightweight.dll
|
||||
System.Reflection.Extensions.dll
|
||||
System.Reflection.Metadata.dll
|
||||
System.Reflection.Primitives.dll
|
||||
System.Reflection.TypeExtensions.dll
|
||||
System.Resources.Reader.dll
|
||||
System.Resources.ResourceManager.dll
|
||||
System.Resources.Writer.dll
|
||||
System.Runtime.CompilerServices.Unsafe.dll
|
||||
System.Runtime.CompilerServices.VisualC.dll
|
||||
System.Runtime.dll
|
||||
System.Runtime.Extensions.dll
|
||||
System.Runtime.Handles.dll
|
||||
System.Runtime.InteropServices.dll
|
||||
System.Runtime.InteropServices.JavaScript.dll
|
||||
System.Runtime.InteropServices.RuntimeInformation.dll
|
||||
System.Runtime.Intrinsics.dll
|
||||
System.Runtime.Loader.dll
|
||||
System.Runtime.Numerics.dll
|
||||
System.Runtime.Serialization.dll
|
||||
System.Runtime.Serialization.Formatters.dll
|
||||
System.Runtime.Serialization.Json.dll
|
||||
System.Runtime.Serialization.Primitives.dll
|
||||
System.Runtime.Serialization.Xml.dll
|
||||
System.Security.AccessControl.dll
|
||||
System.Security.Claims.dll
|
||||
System.Security.Cryptography.Algorithms.dll
|
||||
System.Security.Cryptography.Cng.dll
|
||||
System.Security.Cryptography.Csp.dll
|
||||
System.Security.Cryptography.dll
|
||||
System.Security.Cryptography.Encoding.dll
|
||||
System.Security.Cryptography.OpenSsl.dll
|
||||
System.Security.Cryptography.Primitives.dll
|
||||
System.Security.Cryptography.X509Certificates.dll
|
||||
System.Security.dll
|
||||
System.Security.Principal.dll
|
||||
System.Security.Principal.Windows.dll
|
||||
System.Security.SecureString.dll
|
||||
System.ServiceModel.Web.dll
|
||||
System.ServiceProcess.dll
|
||||
System.Text.Encoding.CodePages.dll
|
||||
System.Text.Encoding.dll
|
||||
System.Text.Encoding.Extensions.dll
|
||||
System.Text.Encodings.Web.dll
|
||||
System.Text.Json.dll
|
||||
System.Text.RegularExpressions.dll
|
||||
System.Threading.Channels.dll
|
||||
System.Threading.dll
|
||||
System.Threading.Overlapped.dll
|
||||
System.Threading.Tasks.Dataflow.dll
|
||||
System.Threading.Tasks.dll
|
||||
System.Threading.Tasks.Extensions.dll
|
||||
System.Threading.Tasks.Parallel.dll
|
||||
System.Threading.Thread.dll
|
||||
System.Threading.ThreadPool.dll
|
||||
System.Threading.Timer.dll
|
||||
System.Transactions.dll
|
||||
System.Transactions.Local.dll
|
||||
System.ValueTuple.dll
|
||||
System.Web.dll
|
||||
System.Web.HttpUtility.dll
|
||||
System.Windows.dll
|
||||
System.Xml.dll
|
||||
System.Xml.Linq.dll
|
||||
System.Xml.ReaderWriter.dll
|
||||
System.Xml.Serialization.dll
|
||||
System.Xml.XDocument.dll
|
||||
System.Xml.XmlDocument.dll
|
||||
System.Xml.XmlSerializer.dll
|
||||
System.Xml.XPath.dll
|
||||
System.Xml.XPath.XDocument.dll
|
||||
WindowsBase.dll
|
||||
|
||||
[analyzerReferences]
|
||||
<DOTNET>/packs/Microsoft.NETCore.App.Ref/9.0.16/analyzers/dotnet/cs/
|
||||
Microsoft.Interop.ComInterfaceGenerator.dll
|
||||
Microsoft.Interop.JavaScript.JSImportGenerator.dll
|
||||
Microsoft.Interop.LibraryImportGenerator.dll
|
||||
Microsoft.Interop.SourceGeneration.dll
|
||||
System.Text.Json.SourceGeneration.dll
|
||||
System.Text.RegularExpressions.Generator.dll
|
||||
<DOTNET>/sdk/9.0.314/Sdks/Microsoft.NET.Sdk/analyzers/
|
||||
Microsoft.CodeAnalysis.CSharp.NetAnalyzers.dll
|
||||
Microsoft.CodeAnalysis.NetAnalyzers.dll
|
||||
|
||||
[analyzerConfigFiles]
|
||||
<DOTNET>/sdk/9.0.314/Sdks/Microsoft.NET.Sdk/analyzers/build/config/analysislevel_9_default.globalconfig
|
||||
obj/Debug/net9.0/DorkNet.Models.GeneratedMSBuildEditorConfig.editorconfig
|
||||
@@ -0,0 +1,73 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.GameSessions;
|
||||
|
||||
public class GameSession
|
||||
{
|
||||
[JsonPropertyName("GameSessionId")]
|
||||
public long GameSessionId { get; set; }
|
||||
|
||||
[JsonPropertyName("RegionId")]
|
||||
public string RegionId { get; set; } = "us";
|
||||
|
||||
[JsonPropertyName("RoomId")]
|
||||
public string RoomId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("RoomName")]
|
||||
public string RoomName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("ActivityLevelId")]
|
||||
public string ActivityLevelId { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("EventId")]
|
||||
public long? EventId { get; set; }
|
||||
|
||||
[JsonPropertyName("Private")]
|
||||
public bool Private { get; set; }
|
||||
|
||||
[JsonPropertyName("GameInProgress")]
|
||||
public bool GameInProgress { get; set; }
|
||||
|
||||
[JsonPropertyName("MaxCapacity")]
|
||||
public int MaxCapacity { get; set; } = 8;
|
||||
|
||||
[JsonPropertyName("IsFull")]
|
||||
public bool IsFull { get; set; }
|
||||
|
||||
[JsonPropertyName("PlayerCount")]
|
||||
public int PlayerCount { get; set; }
|
||||
|
||||
[JsonPropertyName("PhotonRoomName")]
|
||||
public string PhotonRoomName { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class JoinRandomGameSessionRequest
|
||||
{
|
||||
[JsonPropertyName("RoomId")]
|
||||
public string? RoomId { get; set; }
|
||||
|
||||
[JsonPropertyName("ActivityLevelId")]
|
||||
public string? ActivityLevelId { get; set; }
|
||||
|
||||
[JsonPropertyName("RegionId")]
|
||||
public string RegionId { get; set; } = "us";
|
||||
}
|
||||
|
||||
public class JoinGameSessionResponse
|
||||
{
|
||||
[JsonPropertyName("Result")]
|
||||
public JoinGameErrorCode Result { get; set; } = JoinGameErrorCode.Success;
|
||||
|
||||
[JsonPropertyName("GameSession")]
|
||||
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
|
||||
public GameSession? GameSession { get; set; }
|
||||
}
|
||||
|
||||
public enum JoinGameErrorCode
|
||||
{
|
||||
Success = 0,
|
||||
Full = 1,
|
||||
NotFound = 2,
|
||||
Banned = 3,
|
||||
Error = 4,
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Notification;
|
||||
|
||||
public class PushNotification
|
||||
{
|
||||
[JsonPropertyName("Id")]
|
||||
public PushNotificationId Id { get; set; }
|
||||
|
||||
[JsonPropertyName("Msg")]
|
||||
public object? Msg { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mirrors the client's <c>RecNet.Notifications+PushNotificationId</c>
|
||||
/// enum exactly (decompiled at
|
||||
/// <c>Cpp2IL_CS/.../RecNet/Notifications.cs:52-89</c>). Values are
|
||||
/// non-contiguous because the client allocates them in groups (1–6
|
||||
/// core; 11–15 subscriptions; 20–25 moderation; 30–31 gifts;
|
||||
/// 60–62 storefronts; 70–71 consumables; 80–85 events; 90 chat;
|
||||
/// 95–96 community board; 100 inventions).
|
||||
///
|
||||
/// Server <c>NotifyAsync(playerId, id)</c> pushes raise an event with
|
||||
/// this int value over the SignalR hub. If the value doesn't match
|
||||
/// what the client expects for a given concept, the push is silently
|
||||
/// dropped — match the client byte-for-byte.
|
||||
/// </summary>
|
||||
public enum PushNotificationId
|
||||
{
|
||||
RelationshipChanged = 1,
|
||||
MessageReceived = 2,
|
||||
MessageDeleted = 3,
|
||||
PresenceHeartbeatResponse = 4,
|
||||
RefreshLogin = 5,
|
||||
Logout = 6,
|
||||
SubscriptionUpdateProfile = 11,
|
||||
SubscriptionUpdatePresence = 12,
|
||||
SubscriptionUpdateGameSession = 13,
|
||||
SubscriptionUpdateRoom = 15,
|
||||
ModerationQuitGame = 20,
|
||||
ModerationUpdateRequired = 21,
|
||||
ModerationKick = 22,
|
||||
ModerationKickAttemptFailed = 23,
|
||||
ModerationRoomBan = 24,
|
||||
ServerMaintenance = 25,
|
||||
GiftPackageReceived = 30,
|
||||
GiftPackageReceivedImmediate = 31,
|
||||
ProfileJuniorStatusUpdate = 40,
|
||||
RelationshipsInvalid = 50,
|
||||
StorefrontBalanceAdd = 60,
|
||||
StorefrontBalanceUpdate = 61,
|
||||
StorefrontBalancePurchase = 62,
|
||||
ConsumableMappingAdded = 70,
|
||||
ConsumableMappingRemoved = 71,
|
||||
PlayerEventCreated = 80,
|
||||
PlayerEventUpdated = 81,
|
||||
PlayerEventDeleted = 82,
|
||||
PlayerEventResponseChanged = 83,
|
||||
PlayerEventResponseDeleted = 84,
|
||||
PlayerEventStateChanged = 85,
|
||||
ChatMessageReceived = 90,
|
||||
CommunityBoardUpdate = 95,
|
||||
CommunityBoardAnnouncementUpdate = 96,
|
||||
InventionModerationStateChanged = 100,
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Players;
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.ModerationBlockDetail — dump.cs:583626, Deserialize at RVA 0x1450830.
|
||||
///
|
||||
/// Verified by disassembly. Required keys (Util.GetKey, throws if missing):
|
||||
/// ReportCategory (int), Duration (int), GameSessionId (long), Message (string).
|
||||
/// Optional keys (Util.GetKeyOrDefault):
|
||||
/// IsHostKick (bool, default false), IsBan (bool, default false),
|
||||
/// PlayerIdReporter (Nullable<int>, default null).
|
||||
///
|
||||
/// Returned by:
|
||||
/// GET api.rec.net/api/PlayerReporting/v1/moderationBlockDetails
|
||||
/// (Single object, NOT a list — the client method GetModerationBlockDetails
|
||||
/// returns IPromise<ModerationBlockDetail>.)
|
||||
///
|
||||
/// To indicate "user is not blocked": ReportCategory=0, Duration=0,
|
||||
/// GameSessionId=0, Message="", IsBan=false, IsHostKick=false,
|
||||
/// PlayerIdReporter=null.
|
||||
/// </summary>
|
||||
public class ModerationBlockDetail
|
||||
{
|
||||
// PlayerReporting.ReportCategory enum (int)
|
||||
[JsonPropertyName("ReportCategory")]
|
||||
public int ReportCategory { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("Duration")]
|
||||
public int Duration { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("GameSessionId")]
|
||||
public long GameSessionId { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("Message")]
|
||||
public string Message { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("IsHostKick")]
|
||||
public bool IsHostKick { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("PlayerIdReporter")]
|
||||
public int? PlayerIdReporter { get; set; } = null;
|
||||
|
||||
[JsonPropertyName("IsBan")]
|
||||
public bool IsBan { get; set; } = false;
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Players;
|
||||
|
||||
public class PlayerProfile
|
||||
{
|
||||
private string? profileImage;
|
||||
|
||||
[JsonPropertyName("AccountId")]
|
||||
public long AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("Username")]
|
||||
public string Username { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("DisplayName")]
|
||||
public string DisplayName { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("ProfileImage")]
|
||||
public string? ProfileImage
|
||||
{
|
||||
get => profileImage;
|
||||
set => profileImage = value;
|
||||
}
|
||||
|
||||
[JsonPropertyName("ProfileImageName")]
|
||||
public string? ProfileImageName
|
||||
{
|
||||
get => profileImage;
|
||||
set => profileImage = value;
|
||||
}
|
||||
|
||||
[JsonPropertyName("BannerImage")]
|
||||
public string? BannerImage { get; set; }
|
||||
|
||||
[JsonPropertyName("IsJunior")]
|
||||
public bool IsJunior { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("Level")]
|
||||
public int Level { get; set; } = 1;
|
||||
|
||||
[JsonPropertyName("XP")]
|
||||
public int XP { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("Reputation")]
|
||||
public int Reputation { get; set; } = 0;
|
||||
|
||||
[JsonPropertyName("Bio")]
|
||||
public string Bio { get; set; } = string.Empty;
|
||||
|
||||
[JsonPropertyName("IsVerified")]
|
||||
public bool IsVerified { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("IsDeveloper")]
|
||||
public bool IsDeveloper { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("IsCommunityTeam")]
|
||||
public bool IsCommunityTeam { get; set; } = false;
|
||||
|
||||
[JsonPropertyName("CanReceiveInvites")]
|
||||
public bool CanReceiveInvites { get; set; } = true;
|
||||
|
||||
[JsonPropertyName("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Players;
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.Progression — dump.cs:582273, Deserialize at RVA 0x1142BB0.
|
||||
///
|
||||
/// Verified by disassembly: reads "PlayerId", "Level", "XP" via
|
||||
/// Util.GetKey<int>. All three keys are required (non-default) — missing
|
||||
/// any of them throws KeyNotFoundException at the client.
|
||||
///
|
||||
/// Note: the JSON uses "PlayerId" not "AccountId" even though the C# property
|
||||
/// is AccountId on most other types. Returned by:
|
||||
/// GET api.rec.net/api/players/v1/progression/{accountId}
|
||||
/// </summary>
|
||||
public class Progression
|
||||
{
|
||||
[JsonPropertyName("PlayerId")]
|
||||
public int PlayerId { get; set; }
|
||||
|
||||
[JsonPropertyName("Level")]
|
||||
public int Level { get; set; } = 1;
|
||||
|
||||
[JsonPropertyName("XP")]
|
||||
public int XP { get; set; } = 0;
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Players;
|
||||
|
||||
/// <summary>
|
||||
/// RecNet.Reputation — dump.cs:584087, Deserialize at RVA 0x114A830.
|
||||
///
|
||||
/// Verified by disassembly. ALL Cheer*/Subscriber* keys are required
|
||||
/// (Util.GetKey<int>), missing any throws KeyNotFoundException.
|
||||
/// "SelectedCheer" is the only optional one (Util.GetKeyOrDefault<Nullable<int>>).
|
||||
///
|
||||
/// CRITICAL TYPO: the JSON key is "Noteriety" — the dev mistyped "Notoriety".
|
||||
/// The C# property is named Notoriety in dump.cs (line 584117) but the dict
|
||||
/// lookup uses "Noteriety". Server response MUST match the typo.
|
||||
///
|
||||
/// Returned by:
|
||||
/// GET api.rec.net/api/playerReputation/v1/{accountId}
|
||||
/// </summary>
|
||||
public class Reputation
|
||||
{
|
||||
[JsonPropertyName("AccountId")]
|
||||
public int AccountId { get; set; }
|
||||
|
||||
// sic: see class XML doc — typo in the binary's Util.GetKey call.
|
||||
[JsonPropertyName("Noteriety")]
|
||||
public float Notoriety { get; set; } = 0f;
|
||||
|
||||
[JsonPropertyName("CheerGeneral")]
|
||||
public int CheerGeneral { get; set; }
|
||||
|
||||
[JsonPropertyName("CheerHelpful")]
|
||||
public int CheerHelpful { get; set; }
|
||||
|
||||
[JsonPropertyName("CheerGreatHost")]
|
||||
public int CheerGreatHost { get; set; }
|
||||
|
||||
[JsonPropertyName("CheerSportsman")]
|
||||
public int CheerSportsman { get; set; }
|
||||
|
||||
[JsonPropertyName("CheerCreative")]
|
||||
public int CheerCreative { get; set; }
|
||||
|
||||
[JsonPropertyName("CheerCredit")]
|
||||
public int CheerCredit { get; set; }
|
||||
|
||||
[JsonPropertyName("SubscriberCount")]
|
||||
public int SubscriberCount { get; set; }
|
||||
|
||||
[JsonPropertyName("SubscribedCount")]
|
||||
public int SubscribedCount { get; set; }
|
||||
|
||||
// PlayerCheering.CheerCategory enum (int) — Nullable; null means "no
|
||||
// active cheer set". This is the only optional key.
|
||||
[JsonPropertyName("SelectedCheer")]
|
||||
public int? SelectedCheer { get; set; } = null;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Players;
|
||||
|
||||
public class UpdateProfileRequest
|
||||
{
|
||||
[JsonPropertyName("DisplayName")]
|
||||
public string? DisplayName { get; set; }
|
||||
|
||||
[JsonPropertyName("Bio")]
|
||||
public string? Bio { get; set; }
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace DorkNet.Models.Relationships;
|
||||
|
||||
public class RelationshipData
|
||||
{
|
||||
[JsonPropertyName("AccountId")]
|
||||
public long AccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("OtherAccountId")]
|
||||
public long OtherAccountId { get; set; }
|
||||
|
||||
[JsonPropertyName("Status")]
|
||||
public RelationshipStatus Status { get; set; }
|
||||
|
||||
[JsonPropertyName("CreatedAt")]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
}
|
||||
|
||||
public enum RelationshipStatus
|
||||
{
|
||||
None = 0,
|
||||
Friend = 1,
|
||||
PendingSent = 2,
|
||||
PendingReceived = 3,
|
||||
Blocked = 4,
|
||||
}
|
||||
Reference in New Issue
Block a user