Beispiel #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());
        }
Beispiel #2
0
        /// <summary>Clears the totem bar slot described by slot.</summary>
        /// <remarks>Created 3/26/2011.</remarks>
        /// <param name="slot">The slot.</param>
        public static void ClearTotemBarSlot(MultiCastSlot slot)
        {
            // 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;
            }

            Lua.DoString("SetMultiCastSpell({0})", (int)slot);
        }
        /// <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());
        }
Beispiel #4
0
 public static void SetTotemSlot(MultiCastSlot slot, Totem spellID)
 {
     WoWScript.ExecuteNoResults("SetMultiCastSpell(" + (int)slot + ", " + (int)spellID + ")");
 }
Beispiel #5
0
        /// <summary>Clears the totem bar slot described by slot.</summary>
        /// <remarks>Created 3/26/2011.</remarks>
        /// <param name="slot">The slot.</param>
        public static void ClearTotemBarSlot(MultiCastSlot slot)
        {
            // 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;

            Lua.DoString("SetMultiCastSpell({0})", (int)slot);
        }
Beispiel #6
0
 public static void SetTotemSlot(MultiCastSlot slot, Totem spellID)
 {
     WoWScript.ExecuteNoResults("SetMultiCastSpell(" + (int)slot + ", " + (int)spellID + ")");
 }