Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Linq;
- using System.Collections.Generic;
- using Turbo.Plugins.Default;
- namespace Turbo.Plugins.DAV
- {
- public class DAV_DHGoDLGenerator : BasePlugin, IInGameWorldPainter {
- public float xPos { get; set; }
- public float yPos { get; set; }
- public float iconSize { get; set; }
- private ITexture[] DHGenIcon { get; set; } = new ITexture[5];
- private List<uint> DHGenList { get; set; } = new List<uint> { 86610, 77552, 129215, 361936, 377450 };
- public DAV_DHGoDLGenerator() {
- Enabled = true;
- }
- public override void Load(IController hud) {
- base.Load(hud);
- xPos = 880 - 80;
- yPos = 240;
- iconSize = 40; // Hud.Window.Size.Height * 40 / 1080;
- DHGenIcon[0] = Hud.Texture.GetTexture(1572006581);
- DHGenIcon[1] = Hud.Texture.GetTexture(2019650216);
- DHGenIcon[2] = Hud.Texture.GetTexture(2579723070);
- DHGenIcon[3] = Hud.Texture.GetTexture(2660331930);
- DHGenIcon[4] = Hud.Texture.GetTexture(675448197);
- }
- public void PaintWorld(WorldLayer layer) {
- if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.DemonHunter) return;
- if (!Hud.Game.Me.Powers.BuffIsActive(484290, 0)) return;
- if (Hud.Game.Me.Powers.UsedSkills.Count(x => DHGenList.Contains(x.SnoPower.Sno)) > 1) {
- var GodL2PC = Hud.Game.Me.Powers.GetBuff(484289);
- for (var i = 2; i < 7; i++) {
- if (GodL2PC.IconCounts[i] > 0) {
- DHGenIcon[i - 2].Draw(xPos, yPos, iconSize, iconSize);
- break;
- }
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment