psychopyro212

Untitled

Feb 10th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 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. RiftGaurdianAddDecorator = new WorldDecoratorCollection(
  20. new GroundCircleDecorator(Hud)
  21. {
  22. Brush = Hud.Render.CreateBrush(200, 17, 255, 69, 2, SharpDX.Direct2D1.DashStyle.Dash),
  23. Radius = 4f,
  24. });
  25. }
  26.  
  27. public override void PaintWorld(WorldLayer layer)
  28. {
  29. if (Hud.Game.SpecialArea != SpecialArea.GreaterRift)
  30. {
  31. GaurdianIsAlive = false;
  32. return;
  33. }
  34.  
  35. var monsters = Hud.Game.AliveMonsters;
  36.  
  37. foreach (var monster in monsters)
  38. {
  39. if (monster.Rarity == ActorRarity.Boss)
  40. {
  41. GaurdianIsAlive = true;
  42. }
  43. if (GaurdianIsAlive == true)
  44. {
  45. if (monster.Rarity == ActorRarity.Boss) continue;
  46. RiftGaurdianAddDecorator.Paint(layer, monster, monster.FloorCoordinate, string.Empty);
  47. }
  48. }
  49. }
  50. }
  51. }
Advertisement
Add Comment
Please, Sign In to add comment