Hey! I'm just writing a shadow priest.cc and i'm not able to interrupt my mind flay cast. Code: .... SpellManager.Cast(spellName); //Mindflay while (Me.IsCasting){ // This check seems not to work, i never reach the logging underneath it, why? Logging.Write(Color.Lime, "Cancel Mindflay, need to dot!"); if (TargetDebuffTimeLeft("Vampiric Touch") < 3) { SpellManager.StopCasting(); Logging.Write(Color.Lime, "Cancel Mindflay, need to dot!111"); } } ... Is there any trick?
Found this one in singular Code: // are we casting or channeling ? if (Me.IsCasting || Me.ChanneledCastingSpellId != 0) { return false; } Try Me.ChanneledCastingSpellId maybe?
I think this should do the trick. Code: if ((!Me.CurrentTarget.HasAura("Vampiric Touch") || Me.CurrentTarget.Auras["Vampiric Touch"].TimeLeft.Seconds <= 3) && SpellManager.CanCast("Vampiric Touch")) { SpellManager.StopCasting(); Thread.Sleep(50); SpellManager.Cast("Vampiric Touch"); }
This hasnt worked for me either. Found a solution: Code: while (StyxWoW.Me.CurrentCastId != 0) { [B]ObjectManager.Update();[/B] if (TargetDebuffTimeLeft("Vampiric Touch") < 3) { SpellManager.StopCasting(); Thread.Sleep(50); SpellManager.Cast("Vampiric Touch"); } }