Example #1
0
 /// <summary>
 /// Updates AssignedSkills
 /// </summary>
 public static void Update()
 {
     if (GilesTrinity.PlayerStatus.ActorClass != ActorClass.Wizard && !GilesTrinity.GetHasBuff(SNOPower.Wizard_Archon) &&
         GilesTrinity.PlayerStatus.ActorClass != ActorClass.WitchDoctor && !GilesTrinity.GetHasBuff(SNOPower.Witchdoctor_Hex))
     {
         _assignedSkills.Clear();
         foreach (SNOPower p in GilesTrinity.Hotbar)
         {
             _assignedSkills.Add(new HotbarSkills()
             {
                 Power     = p,
                 Slot      = HotbarSkills.GetHotbarSlotFromPower(p),
                 RuneIndex = HotbarSkills.GetRuneIndexFromPower(p)
             });
         }
     }
 }
Example #2
0
        /// <summary>
        /// Re-reads the active assigned skills and runes from thoe hotbar
        /// </summary>
        internal static void RefreshHotbar()
        {
            using (new PerformanceLogger("RefreshHotbar"))
            {
                GilesTrinity.Hotbar = new HashSet <SNOPower>();
                for (int i = 0; i <= 5; i++)
                {
                    GilesTrinity.Hotbar.Add(ZetaDia.CPlayer.GetPowerForSlot((HotbarSlot)i));
                }
                GilesTrinity.HasMappedPlayerAbilities     = true;
                GilesTrinity.ShouldRefreshHotbarAbilities = false;
                GilesTrinity.HotbarRefreshTimer.Restart();

                HotbarSkills.Update();

                if (!GilesTrinity.GetHasBuff(SNOPower.Wizard_Archon) && !PlayerStatus.IsHidden)
                {
                    GilesTrinity.hashCachedPowerHotbarAbilities = new HashSet <SNOPower>(GilesTrinity.Hotbar);
                }
            }
        }