psychopyro212

Untitled

Feb 11th, 2017
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.78 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3.     using Turbo.Plugins.Default;
  4.     public class RiftGuardianAddsMarkerPlugin : BasePlugin
  5.     {
  6.  
  7.         public WorldDecoratorCollection RiftGuardianAddDecorator { get; set; }
  8.         public bool GuardianIsAlive;
  9.  
  10.         public RiftGuardianAddsMarkerPlugin()
  11.         {
  12.             Enabled = true;
  13.         }
  14.  
  15.         public override void Load(IController hud)
  16.         {
  17.             base.Load(hud);
  18.  
  19.             GuardianIsAlive = false;
  20.  
  21.             RiftGuardianAddDecorator = new WorldDecoratorCollection(
  22.                 new GroundCircleDecorator(Hud)
  23.                 {
  24.                     Brush = Hud.Render.CreateBrush(200, 17, 255, 69, 2, SharpDX.Direct2D1.DashStyle.Dash),
  25.                     Radius = 4f,
  26.             });
  27.         }
  28.  
  29.         public override void PaintWorld(WorldLayer layer)
  30.         {
  31.             var monsters = Hud.Game.AliveMonsters;
  32.  
  33.             if (Hud.Game.SpecialArea != SpecialArea.GreaterRift)
  34.             {
  35.                 GuardianIsAlive = false;
  36.                 return;
  37.             }
  38.  
  39.             if (GuardianIsAlive == false)
  40.             {            
  41.                 foreach (var monster in monsters)
  42.                 {
  43.                     if (monster.Rarity == ActorRarity.Boss)
  44.                     {
  45.                         GuardianIsAlive = true;
  46.                         break;
  47.                     }
  48.                 }
  49.             }
  50.  
  51.             if (GuardianIsAlive == true)
  52.             {
  53.                 foreach (var monster in monsters)
  54.                 {
  55.                     if (monster.Rarity == ActorRarity.Boss) continue;
  56.                     RiftGuardianAddDecorator.Paint(layer, monster, monster.FloorCoordinate, string.Empty);
  57.                 }
  58.             }
  59.         }
  60.     }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment