public static string GetClientNameBySpellName(List <string> spellList) { try { for (int i = (int)Memory.WowProcess.WowModule + (int)Addresses.BarManager.startBar; i <= (int)Memory.WowProcess.WowModule + (int)Addresses.BarManager.startBar + 0x11C; // To be updated. i = i + (int)Addresses.BarManager.nextSlot) { uint sIdt = Memory.WowMemory.Memory.ReadUInt((uint)i); if (sIdt != 0) { if (spellList.Contains(SpellListManager.SpellNameById(sIdt))) { return(SpellListManager.SpellNameByIdExperimental(sIdt)); } } } } catch (Exception exception) { Logging.WriteError("GetClientNameBySpellName(List<string> spellList): " + exception); } return(""); }
public static string GetClientNameBySpellName(List <string> spellList) { try { foreach (uint id in SpellBookID()) { string spellName = SpellListManager.SpellNameById(id); if (spellList.Contains(spellName)) { return(spellName); } } } catch (Exception exception) { Logging.WriteError("GetClientNameBySpellName(List<string> spellList): " + exception); } return(""); }
public static string GetSlotBarBySpellName(List <string> spellList) { try { for (int i = (int)Memory.WowProcess.WowModule + (int)Addresses.BarManager.startBar; i <= (int)Memory.WowProcess.WowModule + (int)Addresses.BarManager.startBar + 0x11C; // To be updated. i = i + (int)Addresses.BarManager.nextSlot) { uint sIdt = Memory.WowMemory.Memory.ReadUInt((uint)i); if (sIdt != 0) { if (spellList.Contains(SpellListManager.SpellNameById(sIdt))) { int j = ((i - ((int)Memory.WowProcess.WowModule + (int)Addresses.BarManager.startBar)) / (int)Addresses.BarManager.nextSlot); int k = 0; while (true) { if (j - 12 >= 0) { j = j - 12; k++; } else { return((k + 1) + ";" + (j + 1)); } } } } } } catch (Exception exception) { Logging.WriteError("GetSlotBarBySpellName(List<string> spellList): " + exception); } return(""); }