psychopyro212

Untitled

Feb 20th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.41 KB | None | 0 0
  1. using System.Linq;
  2. using Turbo.Plugins.Default;
  3. namespace Turbo.Plugins.Psycho
  4. {
  5.     public class RiftGuardianAddsMarkerPlugin : BasePlugin, IInGameWorldPainter
  6.     {
  7.         public WorldDecoratorCollection RiftGuardianAddDecorator { get; set; }
  8.  
  9.         private bool GuardianIsAlive { get { return riftQuest == null || riftQuest.QuestStepId == 16; } }
  10.         private IQuest riftQuest { get { return Hud.Game.Quests.FirstOrDefault(q => q.SnoQuest.Sno == 337492); } }
  11.  
  12.         public RiftGuardianAddsMarkerPlugin()
  13.         {
  14.             Enabled = true;
  15.         }
  16.  
  17.         public override void Load(IController hud)
  18.         {
  19.             base.Load(hud);
  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  void PaintWorld(WorldLayer layer)
  30.         {
  31.             if (Hud.Game.SpecialArea != SpecialArea.GreaterRift || !GuardianIsAlive) return;
  32.  
  33.             var monsters = Hud.Game.AliveMonsters.Where(m => m.Rarity != ActorRarity.Boss);
  34.             foreach (var monster in monsters)
  35.             {
  36.                 RiftGuardianAddDecorator.Paint(layer, monster, monster.FloorCoordinate, string.Empty);
  37.             }
  38.         }
  39.     }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment