This repository was archived by the owner on Oct 15, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMain.cs
More file actions
69 lines (55 loc) · 1.45 KB
/
Main.cs
File metadata and controls
69 lines (55 loc) · 1.45 KB
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
using System.Threading.Tasks;
using CharacterData.Export;
using CharacterData.Logic;
using CharacterData.Render;
using ExileCore;
using SharpDX;
using SQLitePCL;
namespace CharacterData;
public class Main : BaseSettingsPlugin<Settings>
{
public static Main Plugin;
public ExportManager ExportManager;
public Main()
{
Name = "Character Data";
}
public override bool Initialise()
{
Plugin = this;
Batteries_V2.Init();
ExportManager = new ExportManager();
ExportManager.Initialize();
PluginLogic.Initialise();
return true;
}
public override void OnPluginDestroyForHotReload()
{
base.OnPluginDestroyForHotReload();
ExportManager?.Dispose();
}
public override void Dispose()
{
base.Dispose();
ExportManager?.Dispose();
}
public override Job Tick()
{
PluginLogic.Update();
return null;
}
public override void AreaChange(AreaInstance area)
{
Task.Delay(75); // Experimenting with trying to reduce data anomalies, need to wait for either hud or client to change/read memory addresses?
PluginLogic.AreaChange(area);
}
public override void Render()
{
PluginRenderer.Render();
}
public void DebugLog(string text, int time = 5)
{
if (Settings.DebugLog)
LogMessage($"[CharacterData-Debug] {text}", time, Color.AliceBlue);
}
}