Advertisement
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 MapShapeDecorator BarbaianCircleDecorator, CrusaderCircleDecorator, DemonhunterCircleDecorator,
- MonkCircleDecorator, WitchDoctorCircleDecorator, WizardCircleDecorator;
- public GroundCircleDecorator BarbaianGroundCircleDecorator, CrusaderGroundCircleDecorator, DemonhunterGroundCircleDecorator,
- MonkGroundCircleDecorator, WitchDoctorGroundCircleDecorator, WizardGroundCircleDecorator;
- public bool MyPlayerCircle, OtherPlayersCircles;
- public ClassMarkersPlugin()
- {
- Enabled = true;
- }
- public override void Load(IController hud)
- {
- base.Load(hud);
- MyPlayerCircle = true;
- OtherPlayersCircles = true;
- BarbaianCircleDecorator = new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- };
- BarbaianGroundCircleDecorator = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(200, 250, 10, 10, 5),
- Radius = 4f,
- };
- CrusaderCircleDecorator = new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- };
- CrusaderGroundCircleDecorator = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(240, 0, 200, 250, 5),
- Radius = 4f
- };
- DemonhunterCircleDecorator = new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- };
- DemonhunterGroundCircleDecorator = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 0, 0, 200, 5),
- Radius = 4f
- };
- MonkCircleDecorator = new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- };
- MonkGroundCircleDecorator = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(245, 120, 0, 200, 5),
- Radius = 4f
- };
- WitchDoctorCircleDecorator = new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- };
- WitchDoctorGroundCircleDecorator = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(155, 0, 155, 125, 5),
- Radius = 4f
- };
- WizardCircleDecorator = new MapShapeDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
- ShapePainter = new CircleShapePainter(Hud),
- Radius = 2f,
- };
- WizardGroundCircleDecorator = new GroundCircleDecorator(Hud)
- {
- Brush = Hud.Render.CreateBrush(255, 250, 50, 180, 5),
- Radius = 4f
- };
- }
- public override void Customize()
- {
- if (OtherPlayersCircles == true)
- {
- Hud.RunOnPlugin<OtherPlayersPlugin>(plugin =>
- {
- plugin.NameOffsetZ = 0;
- plugin.DecoratorByClass[HeroClass.Barbarian].Decorators.Add(BarbaianCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Barbarian].Decorators.Add(BarbaianGroundCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Crusader].Decorators.Add(CrusaderCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Crusader].Decorators.Add(CrusaderGroundCircleDecorator);
- plugin.DecoratorByClass[HeroClass.DemonHunter].Decorators.Add(DemonhunterCircleDecorator);
- plugin.DecoratorByClass[HeroClass.DemonHunter].Decorators.Add(DemonhunterGroundCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Monk].Decorators.Add(MonkCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Monk].Decorators.Add(MonkGroundCircleDecorator);
- plugin.DecoratorByClass[HeroClass.WitchDoctor].Decorators.Add(WitchDoctorCircleDecorator);
- plugin.DecoratorByClass[HeroClass.WitchDoctor].Decorators.Add(WitchDoctorGroundCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Wizard].Decorators.Add(WizardCircleDecorator);
- plugin.DecoratorByClass[HeroClass.Wizard].Decorators.Add(WizardGroundCircleDecorator);
- });
- }
- }
- public override void PaintWorld(WorldLayer layer)
- {
- if (MyPlayerCircle == true)
- {
- Hud.RunOnPlugin<OtherPlayersPlugin>(plugin =>
- {
- plugin.DecoratorByClass[Hud.Game.Me.HeroClassDefinition.HeroClass].Paint(layer, Hud.Game.Me, Hud.Game.Me.FloorCoordinate, string.Empty);
- });
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement