private void AddonEdit() { string AddonName = ConfigFile.ReadValue("CloudMagic", "AddonName"); try { string addonlua = WoW.IO.File.ReadAllText("" + WoW.AddonPath + "\\" + AddonName + "\\" + AddonName + ".lua"); string modif = "if remainingTime > " + gcdTime + " then"; addonlua = addonlua.Replace("if remainingTime ~= 0 then", modif); WoW.IO.File.WriteAllText("" + WoW.AddonPath + "\\" + AddonName + "\\" + AddonName + ".lua", addonlua); Log.Write("Addon Editing in progress"); WoW.Reload(); while (WoW.HealthPercent == 0) { Thread.Sleep(25); } AddonEdited = true; } catch (Exception ex) { MessageBox.Show("" + ex, "CloudMagic", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public void AddonCreationPulse() { // Editing the addon if (AddonEdited == false) { Log.Write("Editing Addon"); AddonEdit(); Log.Write("Editing Addon Complete"); Thread.Sleep(2000); } if (AddonEmbeded == false) { Log.Write("embedingin rangecheck"); AddonEmbedEdit(); Log.Write("embedingin RangeCheck Complete"); Thread.Sleep(2000); } if (RangeLib == false) { RangeLibCopy(); WoW.Reload(); } Thread.Sleep(350); }