Exemple #1
0
 public static void LaunchSpellById(UInt32 spellId)
 {
     try
     {
         string slotKeySpell = GetSlotBarBySpellId(spellId);
         if (slotKeySpell == "")
         {
             UInt32 spellIdTemps =
                 Memory.WowMemory.Memory.ReadUInt(Memory.WowProcess.WowModule +
                                                  (uint)Addresses.BarManager.startBar);
             Memory.WowMemory.Memory.WriteUInt(
                 Memory.WowProcess.WowModule + (uint)Addresses.BarManager.startBar, spellId);
             Keybindings.PressBarAndSlotKey("1;1");
             Memory.WowMemory.Memory.WriteUInt(
                 Memory.WowProcess.WowModule + (uint)Addresses.BarManager.startBar, spellIdTemps);
         }
         else
         {
             Keybindings.PressBarAndSlotKey(slotKeySpell);
         }
     }
     catch (Exception exception)
     {
         Logging.WriteError("LaunchSpellById(UInt32 spellId): " + exception);
     }
 }
Exemple #2
0
 public static void LaunchSpellByName(string spellName)
 {
     try
     {
         string slotKeySpell = GetSlotBarBySpellName(spellName);
         if (slotKeySpell == "")
         {
             CastSpellByNameLUA(spellName);
         }
         else
         {
             Keybindings.PressBarAndSlotKey(slotKeySpell);
         }
     }
     catch (Exception exception)
     {
         Logging.WriteError("LaunchSpellByName(string spellName): " + exception);
     }
 }