Jump to content
  • [TBC] SpellManager.CastSpellByNameOn("name", "unit") breaks after a while

    • Product: WRobot General Type: Bug Status: Unconfirmed

    Hey @Droidz,


    I've noticed on TBC (Warmane) the above mentioned method breaks after a while and only keeps casting on enemies (with heals, that means you automatically cast on yourself instead of focus).
    Not using any addons and a "/reload" fixes this. I suppose this has to do with Warmane's Anti-Cheat measure or your protection against it.


    I cannot 100% reliably reproduce this and one user has reported that /reload does not fix this bug for him. Maybe when you hook CastSpellByName to prevent anti-cheat, you forgot to pass all argments to the hooked function and only use the first one?

    User Feedback

    Recommended Comments

    Would it be detectable, if I created a reference to the original function on startup (say, on /reload) and then only called that function directly through Lua (which would be unprotected Lua call)?

    If not, that's something I could do. 

    Basically like this:

    EventsLua.AttachEventLua(LuaEventsId.PLAYER_ENTERING_WORLD, context => Lua.LuaDoString(@"
    if not _CastSpellSafe then
    	_CastSpellSafe = CastSpellByName;
    Lua.LuaDoString("if not _CastSpellSafe then ReloadUI() end;");
    Lua.LuaDoString($"_CastSpellSafe('Polymorph', 'focus');");


    Link to comment
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Create New...