Advertisement
Guest User

GLQ_CursorOnMonster.cs

a guest
May 10th, 2018
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.36 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2. namespace Turbo.Plugins.glq
  3. {
  4. public class GLQ_CursorOnMonster : BasePlugin, IInGameWorldPainter
  5. {
  6. public int Radius { get; set; }
  7. public WorldDecoratorCollection TrashDecorator { get; set; }
  8. public WorldDecoratorCollection ChampionDecorator { get; set; }
  9. public WorldDecoratorCollection RareMinionDecorator { get; set; }
  10. public WorldDecoratorCollection RareDecorator { get; set; }
  11. public WorldDecoratorCollection UniqueDecorator { get; set; }
  12. public WorldDecoratorCollection BossDecorator { get; set; }
  13. public GLQ_CursorOnMonster()
  14. {
  15. Enabled = true;
  16. Radius = - 1;
  17. }
  18. public override void Load(IController hud)
  19. {
  20. base.Load(hud);
  21. int Stroke = 0;
  22.  
  23. if (Radius == -1)
  24. {
  25. Stroke = 0;
  26. }
  27. else
  28. {
  29. Stroke = 5;
  30. }
  31. var TrashGroundBrush = Hud.Render.CreateBrush(255, 200, 200, 200, Stroke, SharpDX.Direct2D1.DashStyle.Dash);
  32. TrashDecorator = new WorldDecoratorCollection(
  33. new GroundCircleDecorator(Hud)
  34. {
  35. Brush = TrashGroundBrush,
  36. Radius = Radius,
  37. }
  38. );
  39.  
  40. var EliteChampionGroundBrush = Hud.Render.CreateBrush(255, 64, 128, 255, Stroke, SharpDX.Direct2D1.DashStyle.Dash);
  41. ChampionDecorator = new WorldDecoratorCollection(
  42. new GroundCircleDecorator(Hud)
  43. {
  44. Brush = EliteChampionGroundBrush,
  45. Radius = Radius,
  46. }
  47. );
  48. var EliteMinionGroundBrush = Hud.Render.CreateBrush(255, 255, 216, 160, Stroke, SharpDX.Direct2D1.DashStyle.Dash);
  49. RareMinionDecorator = new WorldDecoratorCollection(
  50. new GroundCircleDecorator(Hud)
  51. {
  52. Brush = EliteMinionGroundBrush,
  53. Radius = Radius,
  54. }
  55. );
  56. var EliteLeaderGroundBrush = Hud.Render.CreateBrush(255, 255, 148, 20, Stroke, SharpDX.Direct2D1.DashStyle.Dash);
  57. RareDecorator = new WorldDecoratorCollection(
  58. new GroundCircleDecorator(Hud)
  59. {
  60. Brush = EliteLeaderGroundBrush,
  61. Radius = Radius,
  62. }
  63. );
  64. var EliteUniqueGroundBrush = Hud.Render.CreateBrush(255, 255, 140, 255, Stroke, SharpDX.Direct2D1.DashStyle.Dash);
  65. UniqueDecorator = new WorldDecoratorCollection(
  66. new GroundCircleDecorator(Hud)
  67. {
  68. Brush = EliteUniqueGroundBrush,
  69. Radius = Radius,
  70. }
  71. );
  72. var BossGroundBrush = Hud.Render.CreateBrush(255, 255, 96, 0, Stroke, SharpDX.Direct2D1.DashStyle.Dash);
  73. BossDecorator = new WorldDecoratorCollection(
  74. new GroundCircleDecorator(Hud)
  75. {
  76. Brush = BossGroundBrush,
  77. Radius = Radius,
  78. }
  79. );
  80. }
  81. public void PaintWorld(WorldLayer layer)
  82. {
  83. var monster = Hud.Game.SelectedMonster2 ?? Hud.Game.SelectedMonster1;
  84. if (monster == null) return;
  85. if (monster.SummonerAcdDynamicId != 0 && monster.IsElite) return;
  86. if (!monster.Invisible && !monster.IsElite && (monster.SnoMonster.Priority != MonsterPriority.goblin) && (monster.SnoMonster.Priority != MonsterPriority.boss) && (monster.SnoMonster.Priority != MonsterPriority.keywarden))
  87. {
  88. TrashDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  89. }
  90. if (monster.Rarity == ActorRarity.Unique)
  91. {
  92. UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  93. }
  94. if (monster.SnoMonster.Priority == MonsterPriority.boss)
  95. {
  96. BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  97. }
  98. if (monster.Rarity == ActorRarity.Champion)
  99. {
  100. ChampionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  101. }
  102. if (monster.Rarity == ActorRarity.RareMinion)
  103. {
  104. RareMinionDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  105. }
  106. if (monster.Rarity == ActorRarity.Rare)
  107. {
  108. RareDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  109. }
  110. if ((monster.Rarity == ActorRarity.Unique) && (monster.SnoMonster.Priority < MonsterPriority.keywarden))
  111. {
  112. UniqueDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  113. }
  114. if (monster.SnoMonster.Priority == MonsterPriority.boss)
  115. {
  116. BossDecorator.Paint(layer, monster, monster.FloorCoordinate, monster.SnoMonster.NameLocalized);
  117. }
  118.  
  119. }
  120.  
  121. }
  122.  
  123. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement