psychopyro212

Untitled

Feb 11th, 2017
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 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. if (GaurdianIsAlive == false)
  40. {
  41. foreach (var monster in monsters)
  42. {
  43. if (monster.Rarity == ActorRarity.Boss)
  44. {
  45. GaurdianIsAlive = true;
  46. break;
  47. }
  48. }
  49. }
  50.  
  51. if (GaurdianIsAlive == true)
  52. {
  53. foreach (var monster in monsters)
  54. {
  55. if (monster.Rarity == ActorRarity.Boss) continue;
  56. RiftGaurdianAddDecorator.Paint(layer, monster, monster.FloorCoordinate, string.Empty);
  57. }
  58. }
  59. }
  60. }
  61. }
Advertisement
Add Comment
Please, Sign In to add comment