Advertisement
Guest User

Untitled

a guest
Jan 21st, 2022
508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. using System.Linq;
  2. using System.Collections.Generic;
  3. using Turbo.Plugins.Default;
  4.  
  5. namespace Turbo.Plugins.User.Dias
  6. {
  7.  
  8. public class MonkAllyMarker : BasePlugin, IInGameWorldPainter
  9. {
  10. public WorldDecoratorCollection AllyActive { get; set; }
  11. public WorldDecoratorCollection AllyNonActive { get; set; }
  12.  
  13.  
  14. public HashSet<uint> GargSnoActive = new HashSet<uint>
  15. {
  16. 367774 //Mystic Ally Active Fire
  17. };
  18.  
  19. public HashSet<uint> GargSnoNonActive = new HashSet<uint>
  20. {
  21. //168878 //Mystic Ally Fire Non Active
  22. };
  23.  
  24.  
  25. public MonkAllyMarker()
  26. {
  27. Enabled = true;
  28. }
  29.  
  30. public override void Load(IController hud)
  31. {
  32. base.Load(hud);
  33.  
  34. AllyActive = new WorldDecoratorCollection(
  35. new MapShapeDecorator(Hud),
  36. new GroundCircleDecorator(Hud)
  37. {
  38. Brush = Hud.Render.CreateBrush(255, 255, 0, 230, 3),
  39. Radius = 2f
  40. });
  41.  
  42.  
  43. AllyNonActive = new WorldDecoratorCollection(
  44. new MapShapeDecorator(Hud),
  45. new GroundCircleDecorator(Hud)
  46. {
  47. Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 1),
  48. Radius = 4f
  49. });
  50. }
  51.  
  52. public void PaintWorld(WorldLayer layer)
  53. {
  54. var player = Hud.Game.Me;
  55. var actorsActive = Hud.Game.Actors.Where(a => GargSnoActive.Contains((uint)a.SnoActor.Sno));
  56. var actorsNonActive = Hud.Game.Actors.Where(a => GargSnoNonActive.Contains((uint)a.SnoActor.Sno));
  57.  
  58. foreach (var actorActive in actorsActive)
  59. {
  60. if (actorActive.SummonerAcdDynamicId == player.SummonerId){
  61. AllyActive.Paint(layer, actorActive, actorActive.FloorCoordinate, "");
  62. }
  63. }
  64.  
  65. foreach (var actorNonActive in actorsNonActive)
  66. {
  67. if (actorNonActive.SummonerAcdDynamicId == player.SummonerId){
  68. AllyNonActive.Paint(layer, actorNonActive, actorNonActive.FloorCoordinate, "");
  69. }
  70. }
  71. }
  72. } // class
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement