-
Notifications
You must be signed in to change notification settings - Fork 11
/
MarkedForDeathValleyOfDeathPlugin.cs
80 lines (71 loc) · 2.73 KB
/
MarkedForDeathValleyOfDeathPlugin.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
using Turbo.Plugins.Default;
namespace Turbo.Plugins.CB
{
public class MarkedForDeathValleyOfDeathPlugin : BasePlugin, IInGameWorldPainter
{
public WorldDecoratorCollection MarkedForDeathDecorator { get; set; }
public WorldDecoratorCollection CaltropsDecorator { get; set; }
public MarkedForDeathValleyOfDeathPlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
CaltropsDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(250, 255, 69, 69, 5),
Radius = 15,
},
new GroundLabelDecorator(Hud)
{
CountDownFrom = 30,
TextFont = Hud.Render.CreateFont("tahoma", 14, 255, 255, 255, 255, true, false, 128, 0, 0, 0, true),
},
new GroundTimerDecorator(Hud)
{
CountDownFrom = 30,
BackgroundBrushEmpty = Hud.Render.CreateBrush(64,0,0,0, 0),
BackgroundBrushFill = Hud.Render.CreateBrush(160,255,255,255, 0),
Radius = 35,
}
);
MarkedForDeathDecorator = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(250, 255, 69, 69, 5),
Radius = 15,
},
new GroundLabelDecorator(Hud)
{
CountDownFrom = 15,
TextFont = Hud.Render.CreateFont("tahoma", 14, 255, 255, 255, 255, true, false, 128, 0, 0, 0, true),
},
new GroundTimerDecorator(Hud)
{
CountDownFrom = 15,
BackgroundBrushEmpty = Hud.Render.CreateBrush(64,0,0,0, 0),
BackgroundBrushFill = Hud.Render.CreateBrush(160,255,255,255, 0),
Radius = 35,
}
);
}
public void PaintWorld(WorldLayer layer)
{
var actors = Hud.Game.Actors;
foreach (var actor in actors)
{
switch ((uint)actor.SnoActor.Sno)
{
case 230674:
MarkedForDeathDecorator.Paint(layer, actor, actor.FloorCoordinate, null);
break;
case 196030:
CaltropsDecorator.Paint(layer, actor, actor.FloorCoordinate, null);
break;
}
}
}
}
} //End