示例#1
0
        /// <summary>
        ///   Sets a totem bar slot to the specified totem!.
        /// </summary>
        /// <remarks>
        ///   Created 3/26/2011.
        /// </remarks>
        /// <param name = "slot">The slot.</param>
        /// <param name = "totem">The totem.</param>
        public static void SetTotemBarSlot(MultiCastSlot slot, WoWTotem totem)
        {
            // Make sure we have the totem bars to set. Highest first kthx
            if (slot >= MultiCastSlot.SpiritsFire && !SpellManager.HasSpell("Call of the Spirits"))
            {
                return;
            }
            if (slot >= MultiCastSlot.AncestorsFire && !SpellManager.HasSpell("Call of the Ancestors"))
            {
                return;
            }
            if (!SpellManager.HasSpell("Call of the Elements"))
            {
                return;
            }

            if (LastSetTotems.ContainsKey(slot) && LastSetTotems[slot] == totem)
            {
                return;
            }

            if (!LastSetTotems.ContainsKey(slot))
            {
                LastSetTotems.Add(slot, totem);
            }
            else
            {
                LastSetTotems[slot] = totem;
            }

            Logger.Write("Setting totem slot Call of the" + slot.ToString().CamelToSpaced() + " to " + totem.ToString().CamelToSpaced());

            Lua.DoString("SetMultiCastSpell({0}, {1})", (int)slot, totem.GetTotemSpellId());
        }
示例#2
0
 public static bool TotemIsKnown(WoWTotem totem)
 {
     return(SpellManager.HasSpell(totem.GetTotemSpellId()));
 }
示例#3
0
 public static bool TotemIsKnown(WoWTotem totem)
 {
     return SpellManager.HasSpell(totem.GetTotemSpellId());
 }
示例#4
0
        /// <summary>
        ///   Sets a totem bar slot to the specified totem!.
        /// </summary>
        /// <remarks>
        ///   Created 3/26/2011.
        /// </remarks>
        /// <param name = "slot">The slot.</param>
        /// <param name = "totem">The totem.</param>
        public static void SetTotemBarSlot(MultiCastSlot slot, WoWTotem totem)
        {
            // Make sure we have the totem bars to set. Highest first kthx
            if (slot >= MultiCastSlot.SpiritsFire && !SpellManager.HasSpell("Call of the Spirits"))
            {
                return;
            }
            if (slot >= MultiCastSlot.AncestorsFire && !SpellManager.HasSpell("Call of the Ancestors"))
            {
                return;
            }
            if (!SpellManager.HasSpell("Call of the Elements"))
            {
                return;
            }

            if (LastSetTotems.ContainsKey(slot) && LastSetTotems[slot] == totem)
            {
                return;
            }

            if (!LastSetTotems.ContainsKey(slot))
            {
                LastSetTotems.Add(slot, totem);
            }
            else
            {
                LastSetTotems[slot] = totem;
            }

            Logger.Write("Setting totem slot Call of the" + slot.ToString().CamelToSpaced() + " to " + totem.ToString().CamelToSpaced());

            Lua.DoString("SetMultiCastSpell({0}, {1})", (int)slot, totem.GetTotemSpellId());
        }
示例#5
0
 public static bool CanPlaceTotem(WoWTotem totem)
 {
     var spell = totem.GetTotemSpellId();
     return StyxWoW.Me.GetTotemBarSpells((int)totem.GetTotemType() - 1).Any(s => s.Id == spell);
 }
示例#6
0
        public static bool CanPlaceTotem(WoWTotem totem)
        {
            var spell = totem.GetTotemSpellId();

            return(StyxWoW.Me.GetTotemBarSpells((int)totem.GetTotemType() - 1).Any(s => s.Id == spell));
        }