Jump to content
  • Vanilla: ObjectManager.Me.GlobalCooldownEnabled always returns false


    Ordush
    • Version: All Product: WRobot General Type: Bug Status: Not a Bug

    I have long wondered why my fghtclasses spams spells.
    I just realized that ObjectManager.Me.GlobalCooldownEnabled  always returns false on vanilla. That explains it.
    Any way to fix this?



    User Feedback

    Recommended Comments

    Ordush

    Posted

    SpellManager.GlobalCooldownTimeLeft()

     always returns 0 as well

    skeletonboy360

    Posted

    I used aquatic form to check gcd on mine. Anything with 0 cd would work. 

    if (SpellManager.GetSpellCooldownTimeLeft(“Aquatic Form”) > 0)

    return. 

    Ordush

    Posted

    1 hour ago, skeletonboy360 said:

    I used aquatic form to check gcd on mine. Anything with 0 cd would work. 

    if (SpellManager.GetSpellCooldownTimeLeft(“Aquatic Form”) > 0)

    return. 

    Thanks for the tip.
    The issue with that is just that you need to have the spell on the action bar in vanilla for that to work. ?

    Matenia

    Posted

    @Ordush 

    @Droidz

    public static float GetGlobalCooldown()
        {
            string luaString = @"
            local i = 1
            while true do
                local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL);
                if not spellName or i >= 10 then
                    break;
                end
       
                local start, duration, enabled = GetSpellCooldown(i, BOOKTYPE_SPELL);
                if enabled == 1 and start > 0 and duration > 0 then
                    local cooldownLeft = duration - (GetTime() - start)
                    --DEFAULT_CHAT_FRAME:AddMessage('GCD check for ' .. spellName .. ' ' .. cooldownLeft);
                    if (cooldownLeft < 1500 and cooldownLeft ~= 0) then
                        return cooldownLeft / 1000;
                    end
                end
    
                i = i + 1;
            end
    
            return 0;
            ";
    
            return Lua.LuaDoString<float>(luaString);
        }

    Correct me if I'm wrong, but this should work (pure Lua, vanilla). Checks 10 first spells in spellbook for their cd. Rogues have 1 second GCD tho, so idk

    Ordush

    Posted

    3 hours ago, Matenia said:

    @Ordush 

    @Droidz

    
    public static float GetGlobalCooldown()
        {
            string luaString = @"
            local i = 1
            while true do
                local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL);
                if not spellName or i >= 10 then
                    break;
                end
       
                local start, duration, enabled = GetSpellCooldown(i, BOOKTYPE_SPELL);
                if enabled == 1 and start > 0 and duration > 0 then
                    local cooldownLeft = duration - (GetTime() - start)
                    --DEFAULT_CHAT_FRAME:AddMessage('GCD check for ' .. spellName .. ' ' .. cooldownLeft);
                    if (cooldownLeft < 1500 and cooldownLeft ~= 0) then
                        return cooldownLeft / 1000;
                    end
                end
    
                i = i + 1;
            end
    
            return 0;
            ";
    
            return Lua.LuaDoString<float>(luaString);
        }

    Correct me if I'm wrong, but this should work (pure Lua, vanilla). Checks 10 first spells in spellbook for their cd. Rogues have 1 second GCD tho, so idk

    Yep works. I already pointed Droidz towards your shit Schaka. ?

    Droidz

    Posted

    Yes I took note, I will add this code but I ignore when.



    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...