From 1cebc0a628e8e549684e09ace7c84e46be5c0d63 Mon Sep 17 00:00:00 2001 From: sagirilover Date: Thu, 30 Jul 2020 02:33:24 +0300 Subject: [PATCH] netvar fix --- AnimeSoftware/AnimeForm.cs | 4 +- AnimeSoftware/Objects/LocalPlayer.cs | 2 +- AnimeSoftware/Offsets/NetVarManager.cs | 84 +++++++++++++------------- 3 files changed, 45 insertions(+), 45 deletions(-) diff --git a/AnimeSoftware/AnimeForm.cs b/AnimeSoftware/AnimeForm.cs index f6045ad..eb6d8bb 100644 --- a/AnimeSoftware/AnimeForm.cs +++ b/AnimeSoftware/AnimeForm.cs @@ -53,8 +53,8 @@ namespace AnimeSoftware Properties.Settings.Default.namestealer = false; Properties.Settings.Default.Save(); Start(); - Log.Debug((IntPtr)(Offsets.netvars.m_Local + Offsets.netvars.m_aimPunchAngle)); - //Log.Debug((IntPtr)Offsets.signatures.dwClientState_ViewAngles); + Log.Debug((IntPtr)(Offsets.netvars.m_iItemDefinitionIndex)); + Log.Debug((IntPtr)(Offsets.netvars.m_iItemIDHigh)); } diff --git a/AnimeSoftware/Objects/LocalPlayer.cs b/AnimeSoftware/Objects/LocalPlayer.cs index 66178ad..a4626dd 100644 --- a/AnimeSoftware/Objects/LocalPlayer.cs +++ b/AnimeSoftware/Objects/LocalPlayer.cs @@ -274,7 +274,7 @@ namespace AnimeSoftware.Objects { get { - return Memory.Read(Ptr + netvars.m_Local + netvars.m_aimPunchAngle); + return Memory.Read(Ptr + netvars.m_aimPunchAngle); } } public static Vector LocalViewAngle diff --git a/AnimeSoftware/Offsets/NetVarManager.cs b/AnimeSoftware/Offsets/NetVarManager.cs index fb333a0..248aac4 100644 --- a/AnimeSoftware/Offsets/NetVarManager.cs +++ b/AnimeSoftware/Offsets/NetVarManager.cs @@ -29,7 +29,7 @@ namespace AnimeSoftware.Offsets } return hashtable; } - public unsafe static Hashtable DumpTable(RecvTable* table) + public unsafe static Hashtable DumpTable(RecvTable* table, int offset = 0) { Hashtable hashtable = new Hashtable(); for (int i = 0; i < table->GetPropsCount(); i++) @@ -42,11 +42,11 @@ namespace AnimeSoftware.Offsets continue; if (!hashtable.ContainsKey( prop->GetName())) - hashtable.Add(prop->GetName(), prop->GetOffset()); + hashtable.Add(prop->GetName(), prop->GetOffset() + offset); if (prop->GetDataTable() != null) { - foreach (DictionaryEntry entry in DumpTable(prop->GetDataTable())) + foreach (DictionaryEntry entry in DumpTable(prop->GetDataTable(), prop->GetOffset() + offset)) { if (!hashtable.ContainsKey(entry.Key)) hashtable.Add(entry.Key, entry.Value); @@ -58,45 +58,45 @@ namespace AnimeSoftware.Offsets #region Debug - public unsafe static void DumpTable(RecvTable* table, int depth) - { - for (int i = 0; i < table->GetPropsCount(); i++) - { - RecvProp* prop = (RecvProp*)((IntPtr)table->GetRecvProps() + i * sizeof(RecvProp)); - - try - { - if (prop == null) - continue; - if (prop->GetName().Contains("baseclass") || prop->GetName().StartsWith("0") || prop->GetName().StartsWith("1") || prop->GetName().StartsWith("2")) - continue; - - Console.WriteLine(new string(' ', depth * 2) + prop->GetName() + " 0x" + prop->GetOffset().ToString("X")); - - if (prop->GetDataTable() != null) - { - DumpTable(prop->GetDataTable(), depth + 1); - } - } - catch (Exception ex) - { - - Console.WriteLine(((IntPtr)prop).ToString("X")); - Console.WriteLine(ex.ToString()); - } - - } - } - public unsafe static void DebugFullDump() - { - for (ClientClass* i = (ClientClass*)(Memory.Client + signatures.dwGetAllClasses); i != null; i = i->Next()) - { - Console.WriteLine(i->GetName()); - Console.WriteLine("__" + i->GetRecvTable()->GetName()); - DumpTable(i->GetRecvTable(), 2); - - } - } + //public unsafe static void DumpTable(RecvTable* table, int depth) + //{ + // for (int i = 0; i < table->GetPropsCount(); i++) + // { + // RecvProp* prop = (RecvProp*)((IntPtr)table->GetRecvProps() + i * sizeof(RecvProp)); + // + // try + // { + // if (prop == null) + // continue; + // if (prop->GetName().Contains("baseclass") || prop->GetName().StartsWith("0") || prop->GetName().StartsWith("1") || prop->GetName().StartsWith("2")) + // continue; + // + // Console.WriteLine(new string(' ', depth * 2) + prop->GetName() + " 0x" + prop->GetOffset().ToString("X")); + // + // if (prop->GetDataTable() != null) + // { + // DumpTable(prop->GetDataTable(), depth + 1); + // } + // } + // catch (Exception ex) + // { + // + // Console.WriteLine(((IntPtr)prop).ToString("X")); + // Console.WriteLine(ex.ToString()); + // } + // + // } + //} + //public unsafe static void DebugFullDump() + //{ + // for (ClientClass* i = (ClientClass*)(Memory.Client + signatures.dwGetAllClasses); i != null; i = i->Next()) + // { + // Console.WriteLine(i->GetName()); + // Console.WriteLine("__" + i->GetRecvTable()->GetName()); + // DumpTable(i->GetRecvTable(), 2); + // + // } + //} #endregion }