Advertisement
WindyForce

Untitled

Feb 19th, 2017
181
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 2.36 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using System.Linq;
  3. using Turbo.Plugins.Default;
  4.  
  5. namespace Turbo.Plugins.WindyForce
  6. {
  7.     public class GargsMasterPlugin : BasePlugin, IInGameWorldPainter
  8.     {
  9.         public WorldDecoratorCollection PlayerGargs { get; set; }
  10.         public WorldDecoratorCollection OtherPlayersGargs { get; set; }
  11.         public List<uint> GargSno = new List<uint>        
  12.         {
  13.             432690, 432691, 432692, 432693, 432694, 122305, 179776, 171491, 179778, 171501, 171502, 179780, 179779, 179772
  14.         };
  15.  
  16.         public GargsMasterPlugin()
  17.         {
  18.             Enabled = true;
  19.         }
  20.  
  21.         public override void Load(IController hud)
  22.         {
  23.             base.Load(hud);
  24.  
  25.             PlayerGargs = new WorldDecoratorCollection(
  26.                 new MapShapeDecorator(Hud)
  27.                 {
  28.                     Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 5),
  29.                     ShapePainter = new CircleShapePainter(Hud),
  30.                     Radius = 2f,
  31.                 },
  32.                 new GroundCircleDecorator(Hud)
  33.                 {
  34.                     Brush = Hud.Render.CreateBrush(255, 0, 255, 0, 5),
  35.                     Radius = 4f
  36.                 });
  37.  
  38.             OtherPlayersGargs = new WorldDecoratorCollection(
  39.                 new MapShapeDecorator(Hud)
  40.                 {
  41.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 5),
  42.                     ShapePainter = new CircleShapePainter(Hud),
  43.                     Radius = 2f,
  44.                 },
  45.                 new GroundCircleDecorator(Hud)
  46.                 {
  47.                     Brush = Hud.Render.CreateBrush(255, 255, 0, 0, 5),
  48.                     Radius = 4f
  49.                 });
  50.         }
  51.  
  52.         void IInGameWorldPainter.PaintWorld(WorldLayer layer)
  53.         {
  54.             var player = Hud.Game.Me;            
  55.             var actors = Hud.Game.Actors.Where(a => GargSno.Contains(a.SnoActor.Sno));
  56.  
  57.             foreach (var actor in actors)
  58.             {            
  59.                 if (actor.SummonerAcdDynamicId == player.SummonerId)                
  60.                     PlayerGargs.Paint(layer, actor, actor.FloorCoordinate, "");                
  61.                 else                
  62.                     OtherPlayersGargs.Paint(layer, actor, actor.FloorCoordinate, "");                
  63.             }
  64.         }
  65.     } // class
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement