Advertisement
s4000

DAV_NecroPetPlugin

Jul 17th, 2019
1,518
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 17.59 KB | None | 0 0
  1. using Turbo.Plugins.Default;
  2. using System;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Globalization;
  6. using System.Collections.Generic;
  7.  
  8. namespace Turbo.Plugins.DavPlayer
  9. {
  10.     public class DAV_NecroPetPlugin : BasePlugin, IInGameWorldPainter, IInGameTopPainter, INewAreaHandler, IItemLocationChangedHandler {
  11.         public float barW, barH, barX, barY;
  12.        
  13.         // Command Skeleton ~~~~~~~~~~
  14.         private static uint SkeletonSkillSNO = 453801;
  15.         public HashSet<ActorSnoEnum> SkeletonActorSNOs = new HashSet<ActorSnoEnum> {
  16.             ActorSnoEnum._p6_necro_commandskeletons_a, // Skeleton - No Rune
  17.             ActorSnoEnum._p6_necro_commandskeletons_b, // Skeleton - Dark Mending
  18.             ActorSnoEnum._p6_necro_commandskeletons_c, // Skeleton - Frenzy
  19.             ActorSnoEnum._p6_necro_commandskeletons_d, // Skeleton - Kill Command
  20.             ActorSnoEnum._p6_necro_commandskeletons_e, // Skeleton - Enforcer
  21.             ActorSnoEnum._p6_necro_commandskeletons_f  // Skeleton - Freezing Grasp
  22.         };
  23.         public WorldDecoratorCollection SkeletonDecorator { get; set; }
  24.         public WorldDecoratorCollection SkeletonActiveDecorator { get; set; }
  25.         public TopLabelDecorator SkeletonCountLabel { get; set; }  
  26.         public int SkeletonCount { get; set; } = 0;
  27.         public string Label_Skeleton { get; set; } = "";
  28.         public bool ShowSkeleton { get; set; } = true;
  29.        
  30.         // Command Skeleton Target ~~~~~~~~~~
  31.         public WorldDecoratorCollection SkeletonTargetDecorator { get; set; }
  32.         public WorldDecoratorCollection SkeletonTargetEliteDecorator { get; set; }
  33.         public bool TargetOnEliteOnly { get; set; } = false;
  34.        
  35.         // Command Skeleton of other players ~~~~~~~~~~
  36.         public WorldDecoratorCollection SkeletonOtherDecorator { get; set; }
  37.         public string Label_Others { get; set; } = "";
  38.         public bool ShowOthers { get; set; } = true;
  39.        
  40.         // Skeleton Mage ~~~~~~~~~~
  41.         private static uint MageSkillSNO = 462089;
  42.         public HashSet<ActorSnoEnum> MageActorSNOs = new HashSet<ActorSnoEnum> {
  43.             ActorSnoEnum._p6_necro_skeletonmage_a, // Skeleton Mage - No Rune
  44.             ActorSnoEnum._p6_necro_skeletonmage_b, // Skeleton Mage - Gift of Death
  45.             ActorSnoEnum._p6_necro_skeletonmage_c, // Skeleton Mage - Singularity
  46.             ActorSnoEnum._p6_necro_skeletonmage_d, // Skeleton Mage - Life Support
  47.             ActorSnoEnum._p6_necro_skeletonmage_e, // Skeleton Mage - Contamination
  48.             ActorSnoEnum._p6_necro_skeletonmage_f_archer // Skeleton Mage - Archer
  49.         };
  50.         public WorldDecoratorCollection MageDecorator { get; set; }
  51.         public TopLabelDecorator MageCountLabel { get; set; }
  52.         public int MageCount { get; set; } = 0;
  53.         public string Label_Mage { get; set; } = "";
  54.         public bool ShowMage { get; set; } = false;
  55.        
  56.         // Golem ~~~~~~~~~~
  57.         private static uint GolemSkillSNO = 451537;
  58.         public HashSet<ActorSnoEnum> GolemActorSNOs = new HashSet<ActorSnoEnum> {
  59.             ActorSnoEnum._p6_decaygolem, // No Rune & Flesh Golem Rune
  60.             ActorSnoEnum._p6_bonegolem, // Bone Golem Rune
  61.             ActorSnoEnum._p6_consumefleshgolem, // Decay Golem Rune
  62.             ActorSnoEnum._p6_icegolem, // Ice Golem Rune
  63.             ActorSnoEnum._p6_bloodgolem // Blood Golem Rune
  64.         };
  65.         public WorldDecoratorCollection GolemDecorator { get; set; }
  66.         public string Label_Golem { get; set; } = "";
  67.         public bool ShowGolem { get; set; } = false;
  68.        
  69.         // Revive ~~~~~~~~~~
  70.         private static uint ReviveSkillSNO = 462239;
  71.         public WorldDecoratorCollection ReviveDecorator { get; set; }
  72.         public TopLabelDecorator ReviveCountLabel { get; set; }
  73.         public int ReviveCount { get; set; } = 0;
  74.         public string Label_Revive { get; set; } = "";
  75.         public bool ShowRevive { get; set; } = false;
  76.  
  77.         // Ringer timer ~~~~~~~~~~
  78.         public IMonster ActiveTarget { get; set; }
  79.         public IFont ActiveFont { get; set; }
  80.         public IWatch ActiveTime { get; set; }
  81.         public IWatch ActiveTimeLong { get; set; }
  82.         public ITexture RingerTexture { get; set; }
  83.         private bool SkillPress { get; set; } = false;
  84.         public float Xpos { get; set; }
  85.         public float Ypos { get; set; }
  86.         public float texsize { get; set; }
  87.         public int legpower { get; set; } = 30;
  88.         public bool GRonly { get; set; } = false;
  89.         public bool Bossonly { get; set; } = false;
  90.         public bool showTimerShort { get; set; } = true;
  91.         public bool showTimerLong { get; set; } = true;
  92.        
  93.         public DAV_NecroPetPlugin() {
  94.             Enabled = true;
  95.         }
  96.  
  97.         public override void Load(IController hud) {
  98.             base.Load(hud);
  99.  
  100.             // Display coordinated for indicators
  101.             barW = Hud.Window.Size.Width * 0.012f;
  102.             barH = Hud.Window.Size.Height * 0.0175f;
  103.             barX = Hud.Window.Size.Width * 0.45f;
  104.             barY = Hud.Window.Size.Height * 0.62f;
  105.            
  106.             // Display Ringer Timer
  107.             Xpos = Hud.Window.Size.Width * 0.7f;
  108.             Ypos = Hud.Window.Size.Height * 0.7f;
  109.             texsize = Hud.Window.Size.Width * 0.025f;
  110.             ActiveFont = Hud.Render.CreateFont("tahoma", 10, 255, 51, 51, 51, false, false, 250, 255, 255, 255, true);
  111.             ActiveTarget = null;
  112.             ActiveTime = Hud.Time.CreateWatch();
  113.             ActiveTimeLong = Hud.Time.CreateWatch();
  114.             RingerTexture = Hud.Texture.GetItemTexture(Hud.Sno.SnoItems.P6_Unique_Phylactery_02);
  115.            
  116.             // Decorator Setting
  117.             var petsize = -1;
  118.  
  119.             SkeletonDecorator = new WorldDecoratorCollection(
  120.                 new GroundCircleDecorator(Hud) {
  121.                     Brush = Hud.Render.CreateBrush(240, 51, 255, 51, 3),
  122.                     Radius = petsize,
  123.                 },
  124.                 new GroundLabelDecorator(Hud) {
  125.                     BackgroundBrush = Hud.Render.CreateBrush(240, 51, 255, 51, 0),
  126.                     TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, true, false, false)
  127.                 }
  128.             );
  129.            
  130.             SkeletonOtherDecorator = new WorldDecoratorCollection(
  131.                 new GroundCircleDecorator(Hud) {
  132.                     Brush = Hud.Render.CreateBrush(240, 51, 255, 51, 3, SharpDX.Direct2D1.DashStyle.Dash),
  133.                     Radius = petsize,
  134.                 },
  135.                 new GroundLabelDecorator(Hud) {
  136.                     BackgroundBrush = Hud.Render.CreateBrush(240, 51, 255, 51, 0),
  137.                     TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, true, false, false)
  138.                 }
  139.             );
  140.            
  141.             SkeletonActiveDecorator = new WorldDecoratorCollection(
  142.                 new GroundCircleDecorator(Hud) {
  143.                     Brush = Hud.Render.CreateBrush(204, 255, 255, 153, 0),
  144.                     Radius = 0.8f,
  145.                 }
  146.             );
  147.  
  148.             SkeletonTargetEliteDecorator = new WorldDecoratorCollection(
  149.                 new GroundShapeDecorator(Hud) {
  150.                     Brush = Hud.Render.CreateBrush(204, 255, 102, 102, 3f),
  151.                     ShapePainter = WorldStarShapePainter.NewDoubleSquare(Hud),
  152.                     RotationTransformator = new CircularRotationTransformator(Hud, 30),
  153.                     Radius = 5f
  154.                 },
  155.                 new MapShapeDecorator(Hud) {
  156.                     Brush = Hud.Render.CreateBrush(255, 255, 255, 255, -1),
  157.                     ShapePainter = new LineFromMeShapePainter(Hud)
  158.                 }
  159.             );
  160.            
  161.             SkeletonTargetDecorator = new WorldDecoratorCollection(
  162.                 new GroundCircleDecorator(Hud) {
  163.                     Brush = Hud.Render.CreateBrush(180, 255, 0, 0, 6),
  164.                     Radius = 0.3f  
  165.                 },
  166.                 new GroundShapeDecorator(Hud) {
  167.                     Brush = Hud.Render.CreateBrush(204, 255, 102, 102, 3f),
  168.                     ShapePainter = WorldStarShapePainter.NewOctagon(Hud),
  169.                     RotationTransformator = new CircularRotationTransformator(Hud, 30),
  170.                     Radius = 5f
  171.                 }
  172.             );
  173.  
  174.             MageDecorator = new WorldDecoratorCollection(
  175.                 new GroundCircleDecorator(Hud) {
  176.                     Brush = Hud.Render.CreateBrush(240, 255, 153, 51, 3),
  177.                     Radius = petsize,
  178.                 },
  179.                 new GroundLabelDecorator(Hud) {
  180.                     BackgroundBrush = Hud.Render.CreateBrush(240, 255, 153, 51, 0),
  181.                     TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, true, false, false)
  182.                 }
  183.             );
  184.            
  185.             GolemDecorator = new WorldDecoratorCollection(
  186.                 new GroundCircleDecorator(Hud) {
  187.                     Brush = Hud.Render.CreateBrush(240, 51, 153, 255, 3),
  188.                     Radius = -1,
  189.                 },
  190.                 new GroundLabelDecorator(Hud) {
  191.                     BackgroundBrush = Hud.Render.CreateBrush(240, 51, 153, 255, 0),
  192.                     TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, true, false, false)
  193.                 }
  194.             );
  195.            
  196.             ReviveDecorator = new WorldDecoratorCollection(
  197.                 new GroundCircleDecorator(Hud) {
  198.                     Brush = Hud.Render.CreateBrush(240, 153, 51, 255, 3),
  199.                     Radius = -1,
  200.                 },
  201.                 new GroundLabelDecorator(Hud) {
  202.                     BackgroundBrush = Hud.Render.CreateBrush(240, 153, 51, 255, 0),
  203.                     TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 255, 255, true, false, false)
  204.                 }
  205.             );
  206.  
  207.             // Pet Number Count Label
  208.             SkeletonCountLabel = new TopLabelDecorator(Hud) {
  209.                 TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 240, 0, false, false, true),
  210.                 BackgroundTexture1 = Hud.Texture.ButtonTextureGray,
  211.                 BackgroundTexture2 = Hud.Texture.BackgroundTextureGreen,
  212.                 BackgroundTextureOpacity2 = 0.5f,
  213.                 TextFunc = () => SkeletonCount.ToString()
  214.             };
  215.  
  216.             MageCountLabel = new TopLabelDecorator(Hud) {
  217.                 TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 240, 0, false, false, true),
  218.                 BackgroundTexture1 = Hud.Texture.ButtonTextureOrange,
  219.                 BackgroundTexture2 = Hud.Texture.BackgroundTextureGreen,
  220.                 BackgroundTextureOpacity2 = 0.5f,
  221.                 TextFunc = () => MageCount.ToString()
  222.             };
  223.            
  224.             ReviveCountLabel = new TopLabelDecorator(Hud) {
  225.                 TextFont = Hud.Render.CreateFont("tahoma", 7, 255, 255, 240, 0, false, false, true),
  226.                 BackgroundTexture1 = Hud.Texture.ButtonTextureOrange,
  227.                 BackgroundTexture2 = Hud.Texture.BackgroundTextureGreen,
  228.                 BackgroundTextureOpacity2 = 0.5f,
  229.                 TextFunc = () => ReviveCount.ToString()
  230.             };
  231.         }
  232.  
  233.         public void PaintWorld(WorldLayer layer) {
  234.             if (ShowOthers) {
  235.                 var players = Hud.Game.Players.Where(player => !player.IsMe && player.HeroClassDefinition.HeroClass == HeroClass.Necromancer && player.CoordinateKnown && Hud.Game.Me.SnoArea.Sno == player.SnoArea.Sno && (player.HeadStone == null));
  236.                 var OtherActors = Hud.Game.Actors.Where(EachActor => EachActor.SummonerAcdDynamicId != Hud.Game.Me.SummonerId && SkeletonActorSNOs.Contains(EachActor.SnoActor.Sno));
  237.                
  238.                 foreach(var player in players) {
  239.                     var IsActive = player.Powers.BuffIsActive(SkeletonSkillSNO, 0);
  240.                     foreach (var OtherActor in OtherActors) {
  241.                         if (OtherActor.SummonerAcdDynamicId == player.SummonerId) {
  242.                             SkeletonOtherDecorator.Paint(layer, OtherActor, OtherActor.FloorCoordinate, Label_Others);
  243.                             if (IsActive)
  244.                                 SkeletonActiveDecorator.Paint(layer, OtherActor, OtherActor.FloorCoordinate, Label_Others);
  245.                         }
  246.                     }
  247.                 }
  248.             }
  249.            
  250.             if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Necromancer) return;
  251.  
  252.             // For Skeleton Melee, only when equipping the skill
  253.             var skill = Hud.Game.Me.Powers.UsedSkills.FirstOrDefault(s => s.SnoPower.Sno == Hud.Sno.SnoPowers.Necromancer_CommandSkeletons.Sno);
  254.             if (skill != null) {
  255.                 var activeSkeleton = Hud.Game.Me.Powers.BuffIsActive(SkeletonSkillSNO, 0);
  256.                 var SkeletonActors = Hud.Game.Actors.Where(EachActor => EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId && SkeletonActorSNOs.Contains(EachActor.SnoActor.Sno));
  257.                    
  258.                 if (ShowSkeleton) {
  259.                     SkeletonCount = SkeletonActors.Count();
  260.                     foreach (var EachActor in SkeletonActors) {
  261.                         SkeletonDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, null);
  262.                         if (activeSkeleton)
  263.                             SkeletonActiveDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, Label_Skeleton);
  264.                     }
  265.                 }
  266.  
  267.                 if (activeSkeleton || skill.Rune == 3) {
  268.                     IAttribute attr;
  269.                     switch (skill.Rune) {
  270.                         case 0: attr = Hud.Sno.Attributes.Power_Buff_4_Visual_Effect_A; break;
  271.                         case 1: attr = Hud.Sno.Attributes.Power_Buff_4_Visual_Effect_B; break;
  272.                         case 2: attr = Hud.Sno.Attributes.Power_Buff_4_Visual_Effect_C; break;
  273.                         case 3: attr = Hud.Sno.Attributes.Power_Buff_4_Visual_Effect_D; break;
  274.                         case 4: attr = Hud.Sno.Attributes.Power_Buff_4_Visual_Effect_E; break;
  275.                         default: attr = Hud.Sno.Attributes.Power_Buff_4_Visual_Effect_None; break;
  276.                     }
  277.            
  278.                     var TargetonScreen = false;
  279.                     foreach (IMonster monster in Hud.Game.AliveMonsters) {
  280.                         if (monster.GetAttributeValueAsUInt(attr, Hud.Sno.SnoPowers.Necromancer_CommandSkeletons.Sno, 2) == 1) {
  281.                             TargetonScreen = true;
  282.                            
  283.                             if (ActiveTarget == null) {
  284.                                 ActiveTarget = monster;
  285.                                 if (Hud.Game.Me.Powers.BuffIsActive(476584, 0)) {
  286.                                     ResetRinger(false);
  287.                                     StartRinger();
  288.                                 }
  289.                             }
  290.                             else if (ActiveTarget != monster) {
  291.                                 ActiveTarget = monster;
  292.                                 if (Hud.Game.Me.Powers.BuffIsActive(476584, 0)) {
  293.                                     ResetRinger(true);
  294.                                     StartRinger();
  295.                                 }
  296.                             }
  297.                            
  298.                             var TargetisElite = (monster.IsElite && monster.SummonerAcdDynamicId == 0 && monster.Rarity != ActorRarity.RareMinion);
  299.                             if (TargetisElite)
  300.                                 SkeletonTargetEliteDecorator.Paint(layer, null, monster.FloorCoordinate, null);
  301.                             else if (!TargetOnEliteOnly)
  302.                                 SkeletonTargetDecorator.Paint(layer, null, monster.FloorCoordinate, null);
  303.                            
  304.                             break;
  305.                         }
  306.                     }
  307.                        
  308.                     if (Hud.Game.Me.Powers.BuffIsActive(476584, 0)) {
  309.                         if (SkeletonCount == 0) {
  310.                             ResetRinger(true);
  311.                             StartRinger();
  312.                         }
  313.                         if (!TargetonScreen) {
  314.                             ActiveTarget = null;
  315.                             ResetRinger(false);
  316.                         }
  317.                     }
  318.                 }
  319.                 else {
  320.                     ResetRinger(true);
  321.                 }
  322.             }
  323.             else SkeletonCount = 0;
  324.  
  325.             // For Skeleton Mages, only when equipping the skill
  326.             if (ShowMage && Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == MageSkillSNO) != null) {
  327.                 var MageActors = Hud.Game.Actors.Where(EachActor => EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId && MageActorSNOs.Contains(EachActor.SnoActor.Sno));
  328.                 MageCount = MageActors.Count();
  329.  
  330.                 foreach (var EachActor in MageActors)
  331.                     MageDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, Label_Mage);
  332.             }
  333.             else MageCount = 0;
  334.                
  335.            
  336.             // For Golem, only when equipping the skill
  337.             if (ShowGolem && Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == GolemSkillSNO) != null) {
  338.                 var GolemActors = Hud.Game.Actors.Where(EachActor => EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId && GolemActorSNOs.Contains(EachActor.SnoActor.Sno));
  339.  
  340.                 foreach (var EachActor in GolemActors)
  341.                     GolemDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, Label_Golem);
  342.             }
  343.            
  344.             // For Revive, only when equipping the skill
  345.             if (ShowRevive && Hud.Game.Me.Powers.UsedSkills.Where(x => x.SnoPower.Sno == ReviveSkillSNO) != null) {
  346.                 var ReviveActors = Hud.Game.Actors.Where(EachActor => EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId && EachActor.SnoActor.Sno.ToString().Contains("_p6_necro_revive"));
  347.                 ReviveCount = ReviveActors.Count();
  348.  
  349.                 foreach (var EachActor in ReviveActors)
  350.                     ReviveDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, Label_Revive);
  351.             }
  352.             else ReviveCount = 0;
  353.         }
  354.  
  355.         public void PaintTopInGame(ClipState clipState) {
  356.             if (clipState != ClipState.BeforeClip) return;
  357.             if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Necromancer) return;
  358.  
  359.             if (SkeletonCount != 0) SkeletonCountLabel.Paint(barX, barY, barW, barH, HorizontalAlign.Center);
  360.             if (MageCount != 0) MageCountLabel.Paint(barX + 2*barW, barY, barW, barH, HorizontalAlign.Center);
  361.             if (ReviveCount != 0) ReviveCountLabel.Paint(barX + 4*barW, barY, barW, barH, HorizontalAlign.Center);
  362.            
  363.             if (ActiveTimeLong.IsRunning || ActiveTime.IsRunning) {
  364.                 RingerTexture.Draw(Xpos, Ypos, texsize, 2*texsize);
  365.  
  366.                 var text = "";
  367.                 if (showTimerShort) {
  368.                     var acctime1 = ActiveTime.ElapsedMilliseconds/1000;
  369.                     var accpower1 = (int) acctime1 * legpower;
  370.                     text += ValueToString(acctime1, ValueFormat.NormalNumberNoDecimal) + " sec +" + accpower1 + "%";
  371.                 }
  372.                 if (showTimerLong) {
  373.                     var acctime2 = ActiveTimeLong.ElapsedMilliseconds/1000;
  374.                     var accpower2 = (int) acctime2 * legpower;
  375.                     if (showTimerShort) text += "\n";
  376.                     text += ValueToString(acctime2, ValueFormat.NormalNumberNoDecimal) + " sec +" + accpower2 + "%";
  377.                 }
  378.  
  379.                 var textLayout = ActiveFont.GetTextLayout(text);
  380.                 ActiveFont.DrawText(textLayout, Xpos + texsize, Ypos + texsize - textLayout.Metrics.Height/2);
  381.             }
  382.         }
  383.        
  384.         public void OnNewArea(bool newGame, ISnoArea area) {
  385.             if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Necromancer) return;
  386.            
  387.             ActiveTarget = null;
  388.             ResetRinger(true);
  389.            
  390.             var items = Hud.Game.Items.Where(x => x.Location == ItemLocation.RightHand);
  391.             foreach (var item in items) {
  392.                 if (item.SnoItem.Sno != Hud.Sno.SnoItems.P6_Unique_Phylactery_02.Sno) continue;
  393.                
  394.                 foreach (var perfection in item.Perfections) {
  395.                     if (perfection.Attribute == Hud.Sno.Attributes.Item_Power_Passive) {
  396.                         legpower = (int) (perfection.Cur*100);
  397.                         return;
  398.                     }
  399.                 }
  400.             }
  401.         }
  402.        
  403.         public void OnItemLocationChanged(IItem item, ItemLocation from, ItemLocation to) {
  404.             if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Necromancer) return;
  405.             if (to != ItemLocation.RightHand) return;
  406.             if (item.SnoItem.Sno == Hud.Sno.SnoItems.P6_Unique_Phylactery_02.Sno) {
  407.                 foreach (var perfection in item.Perfections) {
  408.                     if (perfection.Attribute == Hud.Sno.Attributes.Item_Power_Passive) {
  409.                         legpower = (int) (perfection.Cur*100);
  410.                         ActiveTarget = null;
  411.                         ResetRinger(true);
  412.                         return;
  413.                     }
  414.                 }
  415.             }
  416.             else {
  417.                 ActiveTarget = null;
  418.                 ResetRinger(true);
  419.                 return;
  420.             }
  421.         }
  422.        
  423.         public void ResetRinger(bool resetAll) {
  424.             if (ActiveTime.IsRunning) {
  425.                 ActiveTime.Stop();
  426.                 ActiveTime.Reset();
  427.             }
  428.            
  429.             if (resetAll && ActiveTimeLong.IsRunning) {
  430.                 ActiveTimeLong.Stop();
  431.                 ActiveTimeLong.Reset();
  432.             }
  433.         }
  434.        
  435.         public void StartRinger() {
  436.             if (GRonly && Hud.Game.SpecialArea != SpecialArea.GreaterRift) return;
  437.             if (Bossonly && Hud.Game.RiftPercentage < 100) return;
  438.            
  439.             if (!ActiveTime.IsRunning)
  440.                 ActiveTime.Start();
  441.            
  442.             if (!ActiveTimeLong.IsRunning)
  443.                 ActiveTimeLong.Start();
  444.         }
  445.     }
  446. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement