forked from ReClassNET/ReClass.NET
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClassPtrArrayNode.cs
More file actions
44 lines (35 loc) · 970 Bytes
/
Copy pathClassPtrArrayNode.cs
File metadata and controls
44 lines (35 loc) · 970 Bytes
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
using System;
using System.Drawing;
using ReClassNET.Memory;
using ReClassNET.UI;
namespace ReClassNET.Nodes
{
public class ClassPtrArrayNode : BaseArrayNode
{
private readonly MemoryBuffer memory = new MemoryBuffer();
public override int MemorySize => IntPtr.Size * Count;
public override bool PerformCycleCheck => false;
public override void Intialize()
{
var node = ClassNode.Create();
node.Intialize();
node.AddBytes(64);
InnerNode = node;
}
public override Size Draw(ViewInfo view, int x, int y)
{
return Draw(view, x, y, "PtrArray", HotSpotType.ChangeType);
}
protected override Size DrawChild(ViewInfo view, int x, int y)
{
var ptr = view.Memory.ReadIntPtr(Offset + IntPtr.Size * CurrentIndex);
memory.Size = InnerNode.MemorySize;
memory.Process = view.Memory.Process;
memory.Update(ptr);
var v = view.Clone();
v.Address = ptr;
v.Memory = memory;
return InnerNode.Draw(v, x, y);
}
}
}