psychopyro212

Untitled

Feb 10th, 2017
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. namespace Turbo.Plugins.PsychosPlugins
  2.  
  3. {
  4.  
  5. using Turbo.Plugins.Default;
  6.  
  7. public class ClassMarkersPlugin : BasePlugin
  8.  
  9. {
  10.  
  11. public MapShapeDecorator BarbaianCircleDecorator, CrusaderCircleDecorator, DemonhunterCircleDecorator,
  12.  
  13. MonkCircleDecorator, WitchDoctorCircleDecorator, WizardCircleDecorator;
  14.  
  15. public GroundCircleDecorator BarbaianGroundCircleDecorator, CrusaderGroundCircleDecorator, DemonhunterGroundCircleDecorator,
  16.  
  17. MonkGroundCircleDecorator, WitchDoctorGroundCircleDecorator, WizardGroundCircleDecorator;
  18.  
  19.  
  20.  
  21. public ClassMarkersPlugin()
  22.  
  23. {
  24.  
  25. Enabled = true;
  26.  
  27. }
  28.  
  29. public override void Load(IController hud)
  30.  
  31. {
  32.  
  33. base.Load(hud);
  34.  
  35.  
  36.  
  37. BarbaianCircleDecorator = new MapShapeDecorator(Hud)
  38.  
  39. {
  40.  
  41. Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
  42.  
  43. ShapePainter = new CircleShapePainter(Hud),
  44.  
  45. Radius = 2f,
  46.  
  47. };
  48.  
  49. BarbaianGroundCircleDecorator = new GroundCircleDecorator(Hud)
  50.  
  51. {
  52.  
  53. Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
  54.  
  55. Radius = 4f,
  56.  
  57. };
  58.  
  59. CrusaderCircleDecorator = new MapShapeDecorator(Hud)
  60.  
  61. {
  62.  
  63. Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
  64.  
  65. ShapePainter = new CircleShapePainter(Hud),
  66.  
  67. Radius = 2f,
  68.  
  69. };
  70.  
  71. CrusaderGroundCircleDecorator = new GroundCircleDecorator(Hud)
  72.  
  73. {
  74.  
  75. Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
  76.  
  77. Radius = 4f
  78.  
  79. };
  80.  
  81. DemonhunterCircleDecorator = new MapShapeDecorator(Hud)
  82.  
  83. {
  84.  
  85. Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
  86.  
  87. ShapePainter = new CircleShapePainter(Hud),
  88.  
  89. Radius = 2f,
  90.  
  91. };
  92.  
  93. DemonhunterGroundCircleDecorator = new GroundCircleDecorator(Hud)
  94.  
  95. {
  96.  
  97. Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
  98.  
  99. Radius = 4f
  100.  
  101. };
  102.  
  103. MonkCircleDecorator = new MapShapeDecorator(Hud)
  104.  
  105. {
  106.  
  107. Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
  108.  
  109. ShapePainter = new CircleShapePainter(Hud),
  110.  
  111. Radius = 2f,
  112.  
  113. };
  114.  
  115. MonkGroundCircleDecorator = new GroundCircleDecorator(Hud)
  116.  
  117. {
  118.  
  119. Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
  120.  
  121. Radius = 4f
  122.  
  123. };
  124.  
  125. WitchDoctorCircleDecorator = new MapShapeDecorator(Hud)
  126.  
  127. {
  128.  
  129. Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
  130.  
  131. ShapePainter = new CircleShapePainter(Hud),
  132.  
  133. Radius = 2f,
  134.  
  135. };
  136.  
  137. WitchDoctorGroundCircleDecorator = new GroundCircleDecorator(Hud)
  138.  
  139. {
  140.  
  141. Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
  142.  
  143. Radius = 4f
  144.  
  145. };
  146.  
  147. WizardCircleDecorator = new MapShapeDecorator(Hud)
  148.  
  149. {
  150.  
  151. Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
  152.  
  153. ShapePainter = new CircleShapePainter(Hud),
  154.  
  155. Radius = 2f,
  156.  
  157. };
  158.  
  159. WizardGroundCircleDecorator = new GroundCircleDecorator(Hud)
  160.  
  161. {
  162.  
  163. Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
  164.  
  165. Radius = 4f
  166.  
  167. };
  168.  
  169. }
  170.  
  171.  
  172.  
  173. public override void Customize()
  174.  
  175. {
  176.  
  177. Hud.RunOnPlugin<OtherPlayersPlugin>(plugin =>
  178.  
  179. {
  180.  
  181. plugin.NameOffsetZ = 0;
  182.  
  183. plugin.DecoratorByClass[HeroClass.Barbarian].Decorators.Add(BarbaianCircleDecorator);
  184.  
  185. plugin.DecoratorByClass[HeroClass.Barbarian].Decorators.Add(BarbaianGroundCircleDecorator);
  186.  
  187. plugin.DecoratorByClass[HeroClass.Crusader].Decorators.Add(CrusaderCircleDecorator);
  188.  
  189. plugin.DecoratorByClass[HeroClass.Crusader].Decorators.Add(CrusaderGroundCircleDecorator);
  190.  
  191. plugin.DecoratorByClass[HeroClass.DemonHunter].Decorators.Add(DemonhunterCircleDecorator);
  192.  
  193. plugin.DecoratorByClass[HeroClass.DemonHunter].Decorators.Add(DemonhunterGroundCircleDecorator);
  194.  
  195. plugin.DecoratorByClass[HeroClass.Monk].Decorators.Add(MonkCircleDecorator);
  196.  
  197. plugin.DecoratorByClass[HeroClass.Monk].Decorators.Add(MonkGroundCircleDecorator);
  198.  
  199. plugin.DecoratorByClass[HeroClass.WitchDoctor].Decorators.Add(WitchDoctorCircleDecorator);
  200.  
  201. plugin.DecoratorByClass[HeroClass.WitchDoctor].Decorators.Add(WitchDoctorGroundCircleDecorator);
  202.  
  203. plugin.DecoratorByClass[HeroClass.Wizard].Decorators.Add(WizardCircleDecorator);
  204.  
  205. plugin.DecoratorByClass[HeroClass.Wizard].Decorators.Add(WizardGroundCircleDecorator);
  206.  
  207. });
  208.  
  209. }
  210.  
  211. public override void PaintWorld(WorldLayer layer)
  212.  
  213. {
  214.  
  215. Hud.RunOnPlugin<OtherPlayersPlugin>(plugin =>
  216.  
  217. {
  218.  
  219. plugin.DecoratorByClass[Hud.Game.Me.HeroClassDefinition.HeroClass].Paint(layer, Hud.Game.Me, Hud.Game.Me.FloorCoordinate, string.Empty);
  220.  
  221. });
  222.  
  223. }
  224.  
  225. }
  226.  
  227. }
Advertisement
Add Comment
Please, Sign In to add comment