Skip to content

Commit

Permalink
CheckCanEnter for OpenTeam
Browse files Browse the repository at this point in the history
  • Loading branch information
Lightczx committed Dec 13, 2024
1 parent a5b01f3 commit 86ff069
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ public class UnlockerIslandFunctionOffsetTest
[TestMethod]
public void GenerateJson()
{
// FunctionOffsetMickeyWonderMethod:
// MickeyWonderMethod:
// public static byte[] AnonymousMethod43(int nType) -> jmp xxxxxxxx -> another xref to xxxxxxxx
// FunctionOffsetMickeyWonderMethodPartner:
// MickeyWonderMethodPartner:
// public static string get_unityVersion() -> jmp
// FunctionOffsetMickeyWonderMethodPartner2:
// MickeyWonderMethodPartner2:
// "4C 8B 05 ?? ?? ?? ?? 4C 89 F1 48 89 FA E8 ?? ?? ?? ?? 90 48 83 C4 28 5B 5F 5E 41 5E C3"
// FunctionOffsetSetFieldOfView:
// SetFieldOfView:
// Camera: public void set_fieldOfView(float value) -> jmp xxxxxxxx
// FunctionOffsetSetTargetFrameRate:
// SetTargetFrameRate:
// public static void set_targetFrameRate(int value) -> jmp xxxxxxxxx (to the end)
// FunctionOffsetSetEnableFogRendering:
// SetEnableFogRendering:
// public static void set_enableFogRendering(bool value) -> jmp xxxxxxxxx (to the end)
// FunctionOffsetOpenTeam: FunctionOffsetOpenTeamPageAccordingly: GOD HELP US
// OpenTeam: OpenTeamPageAccordingly: CheckCanEnter GOD HELP US
UnlockerIslandConfigurationWrapper wrapper = new()
{
Chinese = new()
Expand All @@ -39,6 +39,7 @@ public void GenerateJson()
SetEnableFogRendering = 0x013F6B00,
OpenTeam = 0x08699B90,
OpenTeamPageAccordingly = 0x08695AE0,
CheckCanEnter = 0x0724A030
},
Oversea = new()
{
Expand All @@ -50,6 +51,7 @@ public void GenerateJson()
SetEnableFogRendering = 0x013FBA20,
OpenTeam = 0x086A32A0,
OpenTeamPageAccordingly = 0x086A4C60,
CheckCanEnter = 0x0711ED60
},
};

Expand Down Expand Up @@ -80,5 +82,7 @@ private sealed class UnlockerIslandFunctionOffset
public required uint OpenTeam { get; set; }

public required uint OpenTeamPageAccordingly { get; set; }

public required uint CheckCanEnter { get; set; }
}
}
4 changes: 2 additions & 2 deletions src/Snap.Hutao/Snap.Hutao/Model/Calculable/CalculableSkill.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static CalculableSkill From(SkillView source, SkillType type)
return new(source, type);
}

[MethodImpl(methodImplOptions: MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string SettingKeyCurrentFromSkillType(SkillType type)
{
return type switch
Expand All @@ -87,7 +87,7 @@ private static string SettingKeyCurrentFromSkillType(SkillType type)
};
}

[MethodImpl(methodImplOptions: MethodImplOptions.AggressiveInlining)]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static string SettingKeyTargetFromSkillType(SkillType type)
{
return type switch
Expand Down
8 changes: 0 additions & 8 deletions src/Snap.Hutao/Snap.Hutao/Service/Feature/FeatureService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,6 @@ internal sealed partial class FeatureService : IFeatureService
{
using (IServiceScope scope = serviceScopeFactory.CreateScope())
{
#if DEBUG || IS_ALPHA_BUILD
// TODO: Remove this code block when we have a completed plan.
if (!scope.ServiceProvider.GetRequiredService<HutaoUserOptions>().IsLicensedDeveloper)
{
return null;
}
#endif

IHttpClientFactory httpClientFactory = scope.ServiceProvider.GetRequiredService<IHttpClientFactory>();
using (HttpClient httpClient = httpClientFactory.CreateClient(nameof(FeatureService)))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ internal struct IslandFunctionOffsets
public uint OpenTeam;
[JsonInclude]
public uint OpenTeamPageAccordingly;
[JsonInclude]
public uint CheckCanEnter;
}
2 changes: 1 addition & 1 deletion src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Snap.Hutao.UnlockerIsland" Version="1.1.24">
<PackageReference Include="Snap.Hutao.UnlockerIsland" Version="1.1.25">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down

0 comments on commit 86ff069

Please sign in to comment.