Guest User

EnemySkillCirclePlugin.cs

a guest
May 4th, 2017
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.87 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using Turbo.Plugins.Default;
  4.  
  5. ////////////////////////////////////////////////////////////////////////////////
  6. //Credits
  7. //
  8. //Thanks to Jacks' BossSkillsPlugin, i manage to create this using the very same template he created for adding my own Sno into this.
  9. //Hope you don't mind me using your code, Jack.
  10. ////////////////////////////////////////////////////////////////////////////////
  11.  
  12. namespace Turbo.Plugins.Everknown
  13. {
  14.     public class EnemySkillCirclePlugin : BasePlugin, IInGameWorldPainter
  15.     {
  16.         public Dictionary<uint, WorldDecoratorCollection> SnoMapping { get; set; }
  17.  
  18.         public EnemySkillCirclePlugin()
  19.         {
  20.             Enabled = true;
  21.         }
  22.  
  23.         public override void Load(IController hud)
  24.         {
  25.             base.Load(hud);
  26.  
  27.             SnoMapping = new Dictionary<uint, WorldDecoratorCollection>();
  28.  
  29.             //Orbiter Projectile SnoID = 343539
  30.             SnoMapping.Add(343539, new WorldDecoratorCollection(
  31.                 new GroundCircleDecorator(Hud)
  32.                 {
  33.                     Radius = 3,
  34.                     //CreateBrush(alpha value, R,G,B,Stroke,Style)
  35.                     Brush = Hud.Render.CreateBrush(255, 0, 0, 255, 2)
  36.                 }));
  37.             //Big Orbiter  SnoId = 343582
  38.             SnoMapping.Add(343582, new WorldDecoratorCollection(
  39.                 new GroundCircleDecorator(Hud)
  40.                 {
  41.                     Radius = 8,
  42.                     Brush = Hud.Render.CreateBrush(255, 0, 0, 255, 2)
  43.                 }));
  44.             //SpellCaster Meteor-Impact circle = 159368
  45.             SnoMapping.Add(159368, new WorldDecoratorCollection(
  46.                 new GroundCircleDecorator(Hud)
  47.                 {
  48.                     Radius = 16,
  49.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 2)
  50.                 }));
  51.             //SpellCaster Meteor- AfterBurn circle = 159367
  52.             SnoMapping.Add(159367, new WorldDecoratorCollection(
  53.                 new GroundCircleDecorator(Hud)
  54.                 {
  55.                     Radius = 16,
  56.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 2)
  57.                 }));
  58.             //Blazing Guardian & Smoldering Construct FirePool Sno = 432
  59.             SnoMapping.Add(432, new WorldDecoratorCollection(
  60.                 new GroundCircleDecorator(Hud)
  61.                 {
  62.                     Radius = 8,
  63.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 2)
  64.                 }));
  65.         }
  66.  
  67.         public void PaintWorld(WorldLayer layer)
  68.         {
  69.             var circles = Hud.Game.Actors.Where(a => SnoMapping.ContainsKey(a.SnoActor.Sno));
  70.             foreach (var circle in circles)
  71.             {
  72.                 SnoMapping[circle.SnoActor.Sno].Paint(layer, circle, circle.FloorCoordinate, null);
  73.             }
  74.         }
  75.     }
  76. }
Add Comment
Please, Sign In to add comment