psychopyro212

Untitled

Feb 11th, 2017
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3. using Turbo.Plugins.Default;
  4. public class RiftGaurdianAddsMarkerPlugin : BasePlugin
  5. {
  6.  
  7. public WorldDecoratorCollection RiftGaurdianAddDecorator { get; set; }
  8. public bool GaurdianIsAlive { get; set;}
  9.  
  10. public RiftGaurdianAddsMarkerPlugin()
  11. {
  12. Enabled = true;
  13. }
  14.  
  15. public override void Load(IController hud)
  16. {
  17. base.Load(hud);
  18.  
  19. GaurdianIsAlive = false;
  20.  
  21. RiftGaurdianAddDecorator = 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. GaurdianIsAlive = false;
  36. return;
  37. }
  38.  
  39. foreach (var monster in monsters)
  40. {
  41. if (monster.Rarity == ActorRarity.Boss)
  42. {
  43. GaurdianIsAlive = true;
  44. }
  45. if (GaurdianIsAlive == true)
  46. {
  47. if (monster.Rarity == ActorRarity.Boss) continue;
  48. RiftGaurdianAddDecorator.Paint(layer, monster, monster.FloorCoordinate, string.Empty);
  49. }
  50. }
  51. }
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment