Advertisement
Guest User

BlazingGuardianDecoratorPlugin

a guest
May 3rd, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.14 KB | None | 0 0
  1. /*Credits
  2.  * Thanks to Jacks' BossSkillsPlugin, i manage to create this using the very same template he created for adding my own Sno into this file.
  3.  * Hope you don't mind me using your code, Jack.
  4.  */
  5. using Turbo.Plugins.Default;
  6. using System.Collections.Generic;
  7. using System.Linq;
  8. using SharpDX.Direct2D1;
  9.  
  10. namespace Turbo.Plugins.Everknown
  11. {
  12.     public class BlazingGuardianDecoratorPlugin : BasePlugin, IInGameWorldPainter
  13.     {
  14.         public Dictionary<uint,WorldDecoratorCollection> SnoMapping { get; set; }
  15.  
  16.         public BlazingGuardianDecoratorPlugin()
  17.         {
  18.             Enabled = true;
  19.         }
  20.  
  21.         public override void Load(IController hud)
  22.         {
  23.             base.Load(hud);
  24.  
  25.             SnoMapping = new Dictionary<uint, WorldDecoratorCollection>();
  26.  
  27.             //Blazingpool snoID = 432 from Blazing Guardians
  28.             SnoMapping.Add(432, new WorldDecoratorCollection(
  29.                 new GroundCircleDecorator(Hud){
  30.                     //CreateBrush(R,G,B,?Opacity?,Stroke,Style)
  31.                     Brush = Hud.Render.CreateBrush(255, 0, 0, 0, 2, DashStyle.Dash),
  32.                     Radius = 5f
  33.                 }
  34.                 /*
  35.                 new GroundLabelDecorator(Hud)
  36.                 {
  37.                     CountDownFrom = 15,
  38.                     TextFont = Hud.Render.CreateFont("tahoma", 9, 255, 255, 200, 200, true, false, 128, 0, 0, 0, true)
  39.                 },
  40.  
  41.                 new GroundTimerDecorator(Hud)
  42.                 {
  43.                     CountDownFrom = 15,
  44.                     BackgroundBrushEmpty = hud.Render.CreateBrush(255,0,0,0,0),
  45.                     BackgroundBrushFill = hud.Render.CreateBrush(255,20,20,0,0),
  46.                     Radius = 5f
  47.                 }
  48.                 */
  49.             ));
  50.         }
  51.  
  52.         public void PaintWorld(WorldLayer layer)
  53.         {
  54.             var circleDecorator = Hud.Game.Actors.Where(a => SnoMapping.ContainsKey(a.SnoActor.Sno));
  55.             foreach(var sno in circleDecorator)
  56.             {
  57.                 SnoMapping[sno.SnoActor.Sno].Paint(layer, sno, sno.FloorCoordinate, string.Empty);
  58.             }
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement