static TradeSkill() { ProcessModule mod = ObjectManager.WoWProcess.MainModule; var baseAddress = (uint)mod.BaseAddress; if (GlobalPBSettings.Instance.WowVersion != mod.FileVersionInfo.FileVersion || GlobalPBSettings.Instance.KnownSpellsPtr == 0) { Professionbuddy.Log("A new wow version has been detected\nScanning for new KnownSpellsPtr offset"); try { uint pointer = Util.FindPattern( "94 1E B3 00 8B CB 83 E1 1F B8 01 00 00 00 D3 E0 8B CB C1 E9 05 85 04 8A 0F 95 C0 84 C0 75", "????xxxxxxxxxxxxxxxxxxxxxxxxxx"); GlobalPBSettings.Instance.KnownSpellsPtr = ObjectManager.Wow.Read <uint>(baseAddress + pointer) - baseAddress; GlobalPBSettings.Instance.WowVersion = mod.FileVersionInfo.FileVersion; Professionbuddy.Log("Found KnownSpellsPtr offset for WoW Version {0} at offset 0x{1:X}", mod.FileVersionInfo.FileVersion, GlobalPBSettings.Instance.KnownSpellsPtr); GlobalPBSettings.Instance.Save(); } catch (InvalidDataException) { Professionbuddy.Log( "Unable to find KnownSpellsPtr offset for WoW Version {0}\nPlease notify the developer of this issue", mod.FileVersionInfo.FileVersion); } } }
static TradeSkillFrame() { ProcessModule mod = ObjectManager.WoWProcess.MainModule; uint baseAddress = (uint)mod.BaseAddress; if (ProfessionBuddySettings.Instance.WowVersion != mod.FileVersionInfo.FileVersion || ProfessionBuddySettings.Instance.TradeskillFrameOffset == 0) { Professionbuddy.Log("A new wow version has been detected\nScanning for new TradeskillFrame offset"); try { uint pointer = Util.FindPattern("89 0D 00 00 00 00 8B 50 04 8B 45 0C 53 33 DB 89 15 00 00 00 00 89 1D 00 00 00 00 8B 08 89 0D 00 00 00 00 8B 50 04 89 15", "xx????xxxxxxxxxxx????xx????xxxx????xxxxx") + 2; ProfessionBuddySettings.Instance.TradeskillFrameOffset = ObjectManager.Wow.Read <uint>(baseAddress + pointer) - baseAddress; ProfessionBuddySettings.Instance.WowVersion = mod.FileVersionInfo.FileVersion; Professionbuddy.Log("Found TradeskillFrame offset for WoW Version {0} at offset 0x{1:X}", mod.FileVersionInfo.FileVersion, ProfessionBuddySettings.Instance.TradeskillFrameOffset); ProfessionBuddySettings.Instance.Save(); } catch (InvalidDataException) { Professionbuddy.Log("Unable to find TradeskillFrame offset for WoW Version {0}\nPlease notify the developer of this issue", mod.FileVersionInfo.FileVersion); } } _baseAddress = (uint)ObjectManager.WoWProcess.MainModule.BaseAddress + ProfessionBuddySettings.Instance.TradeskillFrameOffset; }