s4000

DAV_DHGoDLGenerator

Jul 2nd, 2020
513
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.48 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4. using Turbo.Plugins.Default;
  5.  
  6. namespace Turbo.Plugins.DAV
  7. {
  8.     public class DAV_DHGoDLGenerator : BasePlugin, IInGameWorldPainter {
  9.         public float xPos { get; set; }
  10.         public float yPos { get; set; }
  11.         public float iconSize { get; set; }
  12.  
  13.         private ITexture[] DHGenIcon { get; set; } = new ITexture[5];
  14.         private List<uint> DHGenList { get; set; } = new List<uint> { 86610, 77552, 129215, 361936, 377450 };
  15.  
  16.         public DAV_DHGoDLGenerator() {
  17.             Enabled = true;
  18.         }
  19.  
  20.         public override void Load(IController hud) {
  21.             base.Load(hud);
  22.  
  23.             xPos = 880 - 80;
  24.             yPos = 240;
  25.             iconSize = 40; // Hud.Window.Size.Height * 40 / 1080;
  26.  
  27.             DHGenIcon[0] = Hud.Texture.GetTexture(1572006581);
  28.             DHGenIcon[1] = Hud.Texture.GetTexture(2019650216);
  29.             DHGenIcon[2] = Hud.Texture.GetTexture(2579723070);
  30.             DHGenIcon[3] = Hud.Texture.GetTexture(2660331930);
  31.             DHGenIcon[4] = Hud.Texture.GetTexture(675448197);
  32.         }
  33.  
  34.         public void PaintWorld(WorldLayer layer) {
  35.             if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.DemonHunter) return;
  36.             if (!Hud.Game.Me.Powers.BuffIsActive(484290, 0)) return;
  37.  
  38.             if (Hud.Game.Me.Powers.UsedSkills.Count(x => DHGenList.Contains(x.SnoPower.Sno)) > 1) {
  39.                 var GodL2PC = Hud.Game.Me.Powers.GetBuff(484289);
  40.  
  41.                 for (var i = 2; i < 7; i++) {
  42.                     if (GodL2PC.IconCounts[i] > 0) {
  43.                         DHGenIcon[i - 2].Draw(xPos, yPos, iconSize, iconSize);
  44.                         break;
  45.                     }
  46.                 }
  47.             }
  48.         }
  49.     }
  50. }
Add Comment
Please, Sign In to add comment