using System.Collections.Generic;
using System.Linq;
using Turbo.Plugins.Default;
namespace Turbo.Plugins.BM
{
public class CommandSkeletonsMarkPlugin : BasePlugin, IInGameWorldPainter
{
public bool ShowInTown { get; set; }
public WorldDecoratorCollection PlayerGargs { get; set; }
public WorldDecoratorCollection OtherPlayersGargs { get; set; }
public HashSet<uint> GargSno = new HashSet<uint>
{
//Necromancer
//Command Skeletons P6_Necro_Trait_SkeletonSpawner ID:453793
473147, //No Rune
473428, //Enforcer Rune
473426, //Frenzy Rune
473420, //Dark Mending Rune
473417, //Freezing Grasps Rune
473418, //Kill Command Rune
};
public CommandSkeletonsMarkPlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
ShowInTown = false;
PlayerGargs = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 0, 0, 0, 0),
Radius = 0.5f
},
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 0),
Radius = 0.25f
});
OtherPlayersGargs = new WorldDecoratorCollection(
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 0, 0, 0, 0),
Radius = 0.5f
},
new GroundCircleDecorator(Hud)
{
Brush = Hud.Render.CreateBrush(255, 255, 255, 255, 0),
Radius = 0.25f
});
}
public void PaintWorld(WorldLayer layer)
{
if (Hud.Game.IsInGame && !(Hud.Game.Me.IsInTown && !ShowInTown))
{
var player = Hud.Game.Me;
var actors = Hud.Game.Actors.Where(a => GargSno.Contains(a.SnoActor.Sno));
foreach (var actor in actors)
{
if (actor.SummonerAcdDynamicId == player.SummonerId)
PlayerGargs.Paint(layer, actor, actor.FloorCoordinate, "");
else
OtherPlayersGargs.Paint(layer, actor, actor.FloorCoordinate, "");
}
}
}
} // class
}