-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathArcheAPI.cs
90 lines (74 loc) · 1.86 KB
/
ArcheAPI.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using GameAPI.Lua;
using Process.NET;
using Process.NET.Patterns;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace GameAPI
{
public class ArcheAPI
{
public static ArcheAPI Instance;
public ProcessSharp proc;
private Native.Native native;
private Hooks.Hooks hooks;
private LuaAPI lua;
private BotClasses.Auction auction;
public ArcheAPI()
{
proc = new ProcessSharp(System.Diagnostics.Process.GetCurrentProcess(), Process.NET.Memory.MemoryType.Local);
Instance = this;
}
public Native.Native Native
{
get
{
if(native == null)
{
native = new GameAPI.Native.Native();
}
return native;
}
}
public Hooks.Hooks Hooks
{
get
{
if (hooks == null)
{
hooks = new GameAPI.Hooks.Hooks();
}
return hooks;
}
}
public LuaAPI Lua
{
get
{
if (lua == null)
{
lua = new LuaAPI();
}
return lua;
}
}
public BotClasses.Auction Auction
{
get
{
if (auction == null)
{
auction = new BotClasses.Auction();
}
return auction;
}
}
public PatternScanResult Find(string moduleName, string pattern)
{
var scanner = new PatternScanner(proc[moduleName]);
return scanner.Find(new DwordPattern(pattern));
}
}
}