psychopyro212

Untitled

Feb 11th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.02 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3.     using Turbo.Plugins.Default;
  4.     using System.Collections.Generic;
  5.     using System.Linq;
  6.  
  7.     public class SKillRangePlugins : BasePlugin
  8.     {
  9.         public class ISkillList
  10.         {
  11.             public string Description;
  12.             public uint SNO;
  13.             public float Range;
  14.             public ISkillList(string inpDescription, uint inpSNO, float inpRange)
  15.             {
  16.                 this.Description = inpDescription;
  17.                 this.SNO = inpSNO;
  18.                 this.Range = inpRange;
  19.             }
  20.         }
  21.  
  22.         public List<ISkillList> SkillList { get; set; }
  23.         public WorldDecoratorCollection RangeDecorator { get; set; }
  24.  
  25.  
  26.         public SKillRangePlugins()
  27.         {
  28.             Enabled = true;
  29.             SkillList = new List<ISkillList>();
  30.         }
  31.  
  32.         public override void Load(IController hud)
  33.         {
  34.             base.Load(hud);
  35.  
  36.             RangeDecorator = new WorldDecoratorCollection(
  37.                 new GroundCircleDecorator(Hud)
  38.                 {
  39.                     Brush = Hud.Render.CreateBrush(150, 255, 0, 0, 2, SharpDX.Direct2D1.DashStyle.Dash),
  40.             });
  41.  
  42.             SkillList.Add(new ISkillList("Ignore Pain",79528,50f)); // Skill Name, SKillSNO, Range
  43.            
  44.         }
  45.  
  46.         public override void PaintWorld(WorldLayer layer)
  47.         {
  48.                 foreach (var Skill in SkillList)
  49.                 {
  50.                     var SkillLearned = Hud.Game.Me.Powers.SkillSlots.Where(x => x.SnoPower.Sno == Skill.SNO);
  51.  
  52.                     if (SkillLearned != null)
  53.                     {
  54.                         foreach (var subDecorator in RangeDecorator.GetDecorators<GroundCircleDecorator>())
  55.                         {
  56.                             subDecorator.Radius = Skill.Range;
  57.                         }
  58.  
  59.                         RangeDecorator.Paint(layer,Hud.Game.Me,Hud.Game.Me.FloorCoordinate,string.Empty);
  60.                     }
  61.  
  62.                 }
  63.         }
  64.     }
  65. }
Add Comment
Please, Sign In to add comment