public BarItem(int id, int bar, int key) { ItemId = id; Bar = bar; Key = key; _wrap = new KeyWrapper("Unkown item", "none", bar.ToString(), key.ToString()); }
/// <summary> /// Release a held key. /// </summary> /// <param name = "name"> /// Key name to release /// </param> public static void ReleaseKey(string name) { lock (_lock) { if (KeysList.ContainsKey(name)) { // Logging.Debug("ReleaseKey: " + name); KeyWrapper key = KeysList[name]; key.ReleaseKey(); } else { Logging.Write("The key " + name + " could not be send"); } } }
/// <summary> /// SendKey /// </summary> /// <param name = "name"> /// Key name to send /// </param> public static void SendKey(string name) { lock (_lock) { //LazyBot.Log.Debug("IsCasting spell: " + name); if (KeysList.ContainsKey(name)) { KeyWrapper key = KeysList[name]; key.SendKey(); } else { Logging.Write("Unknown key: " + name); } } }
/// <summary> /// Press and hold a key /// </summary> /// <param name = "name"> /// Key name to press and hold /// </param> public static void PressKey(string name) { lock (_lock) { if (KeysList.ContainsKey(name)) { // Logging.Debug("PressKey: " + name); KeyWrapper key = KeysList[name]; //Logging.Write(key.Bar + " " + key.Key); key.PressKey(); } else { Logging.Write("The key " + name + " could not be send"); } } }