psychopyro212

Untitled

Feb 9th, 2017
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.39 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2. {
  3. using Turbo.Plugins.Default;
  4.  
  5. public class ClassMarkersPlugin : BasePlugin
  6. {
  7.  
  8. public WorldDecoratorCollection WizardDecorator { get; set; }
  9.  
  10. public WorldDecoratorCollection WitchdoctorDecorator { get; set; }
  11.  
  12. public WorldDecoratorCollection BarbarianDecorator { get; set; }
  13.  
  14. public WorldDecoratorCollection MonkDecorator { get; set; }
  15.  
  16. public WorldDecoratorCollection DemonhunterDecorator { get; set; }
  17.  
  18. public WorldDecoratorCollection CrusaderDecorator { get; set; }
  19.  
  20. public WorldDecoratorCollection FollowerDecorator { get; set; }
  21.  
  22. public WorldDecoratorCollection GargantuanDecorator { get; set; }
  23.  
  24. public ClassMarkersPlugin()
  25. {
  26. Enabled = true;
  27. }
  28.  
  29. public override void Load(IController hud)
  30. {
  31. base.Load(hud);
  32.  
  33. WizardDecorator = new WorldDecoratorCollection(
  34. new MapShapeDecorator(Hud)
  35. {
  36. Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
  37. ShapePainter = new CircleShapePainter(Hud),
  38. Radius = 2f,
  39. },
  40. new GroundCircleDecorator(Hud)
  41. {
  42. Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
  43. Radius = 4f
  44. }
  45. );
  46.  
  47. WitchdoctorDecorator = new WorldDecoratorCollection(
  48. new MapShapeDecorator(Hud)
  49. {
  50. Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
  51. ShapePainter = new CircleShapePainter(Hud),
  52. Radius = 2f,
  53. },
  54. new GroundCircleDecorator(Hud)
  55. {
  56. Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
  57. Radius = 4f
  58. }
  59. );
  60.  
  61. BarbarianDecorator = new WorldDecoratorCollection(
  62. new MapShapeDecorator(Hud)
  63. {
  64. Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
  65. ShapePainter = new CircleShapePainter(Hud),
  66. Radius = 2f,
  67. },
  68. new GroundCircleDecorator(Hud)
  69. {
  70. Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
  71. Radius = 4f
  72. }
  73. );
  74.  
  75. MonkDecorator = new WorldDecoratorCollection(
  76. new MapShapeDecorator(Hud)
  77. {
  78. Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
  79. ShapePainter = new CircleShapePainter(Hud),
  80. Radius = 2f,
  81. },
  82. new GroundCircleDecorator(Hud)
  83. {
  84. Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
  85. Radius = 4f
  86. }
  87. );
  88.  
  89. DemonhunterDecorator = new WorldDecoratorCollection(
  90. new MapShapeDecorator(Hud)
  91. {
  92. Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
  93. ShapePainter = new CircleShapePainter(Hud),
  94. Radius = 2f,
  95. },
  96. new GroundCircleDecorator(Hud)
  97. {
  98. Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
  99. Radius = 4f
  100. }
  101. );
  102.  
  103. CrusaderDecorator = new WorldDecoratorCollection(
  104. new MapShapeDecorator(Hud)
  105. {
  106. Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
  107. ShapePainter = new CircleShapePainter(Hud),
  108. Radius = 2f,
  109. },
  110. new GroundCircleDecorator(Hud)
  111. {
  112. Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
  113. Radius = 4f
  114. }
  115. );
  116. }
  117.  
  118. public override void PaintWorld(WorldLayer layer)
  119. {
  120. var players = Hud.Game.Players;
  121. foreach (var player in players)
  122. {
  123. switch (player.Hero.ClassDefinition.HeroClass)
  124. {
  125. case HeroClass.Barbarian:
  126. BarbarianDecorator.Paint(layer, player, player.FloorCoordinate, "");
  127. break;
  128. case HeroClass.Wizard:
  129. WizardDecorator.Paint(layer, player, player.FloorCoordinate, "");
  130. break;
  131. case HeroClass.WitchDoctor:
  132. WitchdoctorDecorator.Paint(layer, player, player.FloorCoordinate, "");
  133. break;
  134. case HeroClass.Monk:
  135. MonkDecorator.Paint(layer, player, player.FloorCoordinate, "");
  136. break;
  137. case HeroClass.DemonHunter:
  138. DemonhunterDecorator.Paint(layer, player, player.FloorCoordinate, "");
  139. break;
  140. case HeroClass.Crusader:
  141. CrusaderDecorator.Paint(layer, player, player.FloorCoordinate, "");
  142. break;
  143. }
  144. }
  145. }
  146. }
  147. }
Advertisement
Add Comment
Please, Sign In to add comment