Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Turbo.Plugins.PsychosPlugins
- {
- using Turbo.Plugins.Default;
- public class ClassMarkersPlugin : BasePlugin
- {
- public WorldDecoratorCollection WizardDecorator { get; set; }
- public WorldDecoratorCollection WitchdoctorDecorator { get; set; }
- public WorldDecoratorCollection BarbarianDecorator { get; set; }
- public WorldDecoratorCollection MonkDecorator { get; set; }
- public WorldDecoratorCollection DemonhunterDecorator { get; set; }
- public WorldDecoratorCollection CrusaderDecorator { get; set; }
- public WorldDecoratorCollection FollowerDecorator { get; set; }
- public WorldDecoratorCollection GargantuanDecorator { get; set; }
- public ClassMarkersPlugin()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- WizardDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
- Radius = 4f
- }
- );
- WitchdoctorDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
- Radius = 4f
- }
- );
- BarbarianDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
- Radius = 4f
- }
- );
- MonkDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
- Radius = 4f
- }
- );
- DemonhunterDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
- Radius = 4f
- }
- );
- CrusaderDecorator = new WorldDecoratorCollection(
- new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- },
- new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
- Radius = 4f
- }
- );
- }
- public override void PaintWorld(WorldLayer layer)
- {
- var players = Hud.Game.Players;
- foreach (var player in players)
- {
- switch (player.Hero.ClassDefinition.HeroClass)
- {
- case HeroClass.Barbarian:
- BarbarianDecorator.Paint(layer, player, player.FloorCoordinate, "");
- break;
- case HeroClass.Wizard:
- WizardDecorator.Paint(layer, player, player.FloorCoordinate, "");
- break;
- case HeroClass.WitchDoctor:
- WitchdoctorDecorator.Paint(layer, player, player.FloorCoordinate, "");
- break;
- case HeroClass.Monk:
- MonkDecorator.Paint(layer, player, player.FloorCoordinate, "");
- break;
- case HeroClass.DemonHunter:
- DemonhunterDecorator.Paint(layer, player, player.FloorCoordinate, "");
- break;
- case HeroClass.Crusader:
- CrusaderDecorator.Paint(layer, player, player.FloorCoordinate, "");
- break;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment