mirror of
https://github.com/SteamAutoCracks/DepotDownloaderMod.git
synced 2026-02-10 12:00:53 +01:00
NHA: Fix being unable to find the body type for CS:GO GC messages
This commit is contained in:
@@ -16,6 +16,7 @@ namespace NetHookAnalyzer2
|
||||
Type[] eMsgEnums =
|
||||
{
|
||||
typeof( SteamKit2.GC.Dota.Internal.EDOTAGCMsg ),
|
||||
typeof( SteamKit2.GC.CSGO.Internal.ECsgoGCMsg ),
|
||||
typeof( SteamKit2.GC.Internal.EGCBaseMsg ),
|
||||
typeof( SteamKit2.GC.Internal.ESOMsg ),
|
||||
typeof( SteamKit2.GC.Internal.EGCSystemMsg ),
|
||||
|
||||
@@ -40,11 +40,11 @@ namespace NetHookAnalyzer2
|
||||
var gcMsgName = EMsgExtensions.GetGCMessageName(rawEMsg);
|
||||
|
||||
var typeMsgName = gcMsgName
|
||||
.Replace("GC", string.Empty)
|
||||
.Replace("k_", string.Empty)
|
||||
.Replace("ESOMsg", string.Empty)
|
||||
.TrimStart('_')
|
||||
.Replace("EMsg", string.Empty);
|
||||
.Replace("EMsg", string.Empty)
|
||||
.TrimStart("GC");
|
||||
|
||||
var possibleTypes = from type in typeof(CMClient).Assembly.GetTypes()
|
||||
from typePrefix in GetPossibleGCTypePrefixes(gcAppid)
|
||||
|
||||
@@ -67,6 +67,7 @@
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ProtoBufFieldReader.cs" />
|
||||
<Compile Include="SteamUtils.cs" />
|
||||
<Compile Include="StringExtensions.cs" />
|
||||
<Compile Include="TypeExtensions.cs" />
|
||||
<EmbeddedResource Include="MainForm.resx">
|
||||
<DependentUpon>MainForm.cs</DependentUpon>
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
namespace NetHookAnalyzer2
|
||||
{
|
||||
static class StringExtensions
|
||||
{
|
||||
public static string TrimStart(this string baseString, string startToTrim)
|
||||
{
|
||||
if (baseString.IndexOf(startToTrim) == 0)
|
||||
{
|
||||
return baseString.Substring(startToTrim.Length);
|
||||
}
|
||||
|
||||
return baseString;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user