psychopyro212

Untitled

Feb 17th, 2017
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.43 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3.     using Turbo.Plugins.Default;
  4.     using System.Linq;
  5.  
  6.     public class CursorMarkerPlugin : BasePlugin
  7.     {
  8.         //original idea from http://turbohud.freeforums.net/user/11902
  9.         public WorldDecoratorCollection CursorDecorator { get; set; }
  10.         public IScreenCoordinate CursorLocation {get; set; }
  11.         public bool InTownToggle { get; set; }
  12.         public CursorMarkerPlugin()
  13.         {
  14.             Enabled = true;
  15.             InTownToggle = false;
  16.         }
  17.  
  18.         public override void Load(IController hud)
  19.         {
  20.             base.Load(hud);
  21.  
  22.             CursorDecorator = new WorldDecoratorCollection(
  23.                 new GroundCircleDecorator(Hud)
  24.                 {
  25.                     Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 5),
  26.                     Radius = 14f
  27.                 });
  28.         }
  29.  
  30.         public override void PaintWorld(WorldLayer layer)
  31.         {
  32.             if (Hud.Game.IsInTown && InTownToggle == true) return;
  33.             if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Crusader) return;
  34.             if (!Hud.Game.Me.Powers.UsedSkills.Any(s => s.SnoPower.Sno == 239137)) return;
  35.  
  36.             CursorLocation = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX,Hud.Window.CursorY);
  37.             CursorDecorator.Paint(layer,null,CursorLocation.ToWorldCoordinate(),string.Empty);
  38.             }
  39.         }
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment