Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Linq;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.yin
- {
- public class TriuneWillBuffPlugin : BasePlugin, IInGameWorldPainter
- {
- public WorldDecoratorCollection BlueDecorator { get; set; }
- public WorldDecoratorCollection TealDecorator { get; set; }
- public WorldDecoratorCollection PurpleDecorator { get; set; }
- public TriuneWillBuffPlugin()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- BlueDecorator = new WorldDecoratorCollection(
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 0, 254, 255, -2),
- Radius = 10.0f,
- },
- new GroundLabelDecorator(Hud)
- {
- CountDownFrom = 7,
- TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 0, 254, 255, true, false, 128, 0, 0, 0, true),
- },
- new GroundTimerDecorator(Hud)
- {
- CountDownFrom = 7,
- BackgroundBrushEmpty = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
- BackgroundBrushFill = Hud.Render.CreateBrush(200, 0, 254, 255, 0),
- Radius = 30,
- }
- );
- TealDecorator = new WorldDecoratorCollection(
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 204, 255, 51, -2),
- Radius = 10.0f,
- },
- new GroundLabelDecorator(Hud)
- {
- CountDownFrom = 7,
- TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 204, 255, 51, true, false, 128, 0, 0, 0, true),
- },
- new GroundTimerDecorator(Hud)
- {
- CountDownFrom = 7,
- BackgroundBrushEmpty = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
- BackgroundBrushFill = Hud.Render.CreateBrush(200, 204, 255, 51, 0),
- Radius = 30,
- }
- );
- PurpleDecorator = new WorldDecoratorCollection(
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 255, 102, 204, -2),
- Radius = 10.0f,
- },
- new GroundLabelDecorator(Hud)
- {
- CountDownFrom = 7,
- TextFont = Hud.Render.CreateFont("tahoma", 11, 255, 255, 102, 204, true, false, 128, 0, 0, 0, true),
- },
- new GroundTimerDecorator(Hud)
- {
- CountDownFrom = 7,
- BackgroundBrushEmpty = Hud.Render.CreateBrush(128, 0, 0, 0, 0),
- BackgroundBrushFill = Hud.Render.CreateBrush(200, 255, 102, 204, 0),
- Radius = 30,
- }
- );
- }
- public void PaintWorld(WorldLayer layer)
- {
- if (Hud.Game.IsInTown) return;
- if (PurpleDecorator != null){
- var PurpleActors = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._generic_proxy &&
- x.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_1_Visual_Effect_None, 483606) == 1);
- foreach (var actor in PurpleActors)
- {
- PurpleDecorator.Paint(layer, actor, actor.FloorCoordinate, string.Empty);
- }
- }
- if (TealDecorator != null)
- {
- var TealActors = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._generic_proxy &&
- x.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_6_Visual_Effect_None, 483606) == 1);
- foreach (var actor in TealActors)
- {
- TealDecorator.Paint(layer, actor, actor.FloorCoordinate, string.Empty);
- }
- }
- if (BlueDecorator != null){
- var BlueActors = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._generic_proxy &&
- x.GetAttributeValueAsInt(Hud.Sno.Attributes.Power_Buff_7_Visual_Effect_None, 483606) == 1);
- foreach (var actor in BlueActors)
- {
- BlueDecorator.Paint(layer, actor, actor.FloorCoordinate, string.Empty);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment