Hello, try to lock wow frame (you can do it only because you don't sleep thread, you will get better reactivity)
public void CombatRotation()
{
try
{
wManager.Wow.Memory.WowMemory.LockFrame();
// Fire Elemental Totem
if (burstMode && FireElementalTotem.IsSpellUsable)
{
SpellManager.CastSpellByNameLUA("Fire Elemental Totem");
return;
}
// Elemental Mastery
if (burstMode && ElementalMastery.IsSpellUsable)
{
SpellManager.CastSpellByNameLUA("Elemental Mastery");
return;
}
// Feral Spirit
if (burstMode && FeralSpirit.IsSpellUsable)
{
SpellManager.CastSpellByNameLUA("Feral Spirit");
return;
}
// Ascendance
if (burstMode && Ascendance.IsSpellUsable)
{
SpellManager.CastSpellByNameLUA("Ascendance");
return;
}
// Stormlash Totem
if (burstMode && StormlashTotem.IsSpellUsable)
{
SpellManager.CastSpellByNameLUA("Stormlash Totem");
return;
}
// Flame Shock
if (aoeMode && FlameShock.IsSpellUsable && FlameShock.IsDistanceGood && (ObjectManager.Target.BuffTimeLeft("Flame Shock") < 15000))
{
SpellManager.CastSpellByNameLUA("Flame Shock");
return;
}
// Fire Nova
if (aoeMode && FireNova.IsSpellUsable && (ObjectManager.Target.HaveBuff("Flame Shock")))
{
Lua.LuaDoString("CastSpellByName('Fire Nova')");
return;
}
// Searing Totem
if (SearingTotem.IsSpellUsable && !ObjectManager.Me.TotemExist(TotemType.Fire))
{
SpellManager.CastSpellByNameLUA("Searing Totem");
return;
}
// Chain Lightning - MW5
if (aoeMode && ChainLightning.IsSpellUsable && ChainLightning.IsDistanceGood && ObjectManager.Me.BuffStack("Maelstrom Weapon") == 5)
{
Lua.LuaDoString("CastSpellByName('Chain Lightning')");
return;
}
// Lightning Bolt - MW5
if (LightningBolt.IsSpellUsable && LightningBolt.IsDistanceGood && ObjectManager.Me.BuffStack("Maelstrom Weapon") == 5)
{
SpellManager.CastSpellByNameLUA("Lightning Bolt");
return;
}
//Stormstrike
if (Stormstrike.IsSpellUsable && Stormstrike.IsDistanceGood)
{
SpellManager.CastSpellByNameLUA("Stormstrike");
return;
}
// Flame Shock
if (FlameShock.IsSpellUsable && FlameShock.IsDistanceGood && (!ObjectManager.Target.HaveBuff("Flame Shock") || (ObjectManager.Target.BuffTimeLeft("Flame Shock") < 10000)))
{
SpellManager.CastSpellByNameLUA("Flame Shock");
return;
}
// Lava Lash
if (LavaLash.IsSpellUsable && LavaLash.IsDistanceGood)
{
SpellManager.CastSpellByNameLUA("Lava Lash");
return;
}
// Unleash Elements
if (UnleashElements.IsSpellUsable && UnleashElements.IsDistanceGood)
{
SpellManager.CastSpellByNameLUA("Unleash Elements");
return;
}
// Earth Shock
if (EarthShock.IsSpellUsable && EarthShock.IsDistanceGood && ((SpellManager.GetSpellCooldownTimeLeft("Stormstrike") > 1.5) || (SpellManager.GetSpellCooldownTimeLeft("Lava Lash") > 1.5)))
{
SpellManager.CastSpellByNameLUA("Earth Shock");
return;
}
}
catch (Exception e)
{
Logging.WriteError("Error: " + e);
}
finally
{
wManager.Wow.Memory.WowMemory.UnlockFrame();
}
}