Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
bug on MissingBuffs?
#1
i think there is a bug with the MissingBuffs, it always return true.
There is no documentation on the MissingBuffs, so i am assuming the 1st para is the player, 2nd para is the buff id and 3rd is the second left on the buff.

I was using the monk assister and i realise it always show Demolish.
so i did a check using either d( MissingBuffs(Player,"246",50)) and d( MissingBuffs(Player,"246",1)) it always return true, even when the buff has 20+ sec.

The funny thing is, it seem to be working with bard windbite and vem strike but not Monk Demolish..

Ah now i know why, is a bug on ace Assister, he written Player instead of target....

Well really need documentation on these kind of function u guys provide. really stupid posting this kind post zzz
Reply
#2
https://en.wikipedia.org/wiki/No_such_th...d_question

Keep that in mind ;) Esp. with no documentation.
Reply
#3
MissingBuffs is a lua function that we created, so the documentation is already pre-existing so to speak, as are most of our functions really. The API handles the basics, the lua API turns them into most of what you see being used.

In ffxiv_helpers.lua (currently line 1212):

Code:
function HasBuffs(entity, buffIDs, dura, ownerid)
    local duration = dura or 0
    local owner = ownerid or 0
    
    local buffs = entity.buffs
    if (buffs == nil or TableSize(buffs) == 0) then return false end
    for _orids in StringSplit(buffIDs,",") do
        local found = false
        for _andid in StringSplit(_orids,"+") do
            found = false
            for i, buff in pairs(buffs) do
                if (buff.id == tonumber(_andid)
                    and (duration == 0 or buff.duration > duration or HasInfiniteDuration(buff.id))
                    and (owner == 0 or buff.ownerid == owner))
                then
                    found = true
                end
            end
            if (not found) then
                break
            end
        end
        if (found) then
            return true
        end
    end
    return false
end

function MissingBuffs(entity, buffIDs, dura, ownerid)
    local duration = dura or 0
    local owner = ownerid or 0
    
    --If we have no buffs, we are missing everything.
    local buffs = entity.buffs
    if (buffs == nil or TableSize(buffs) == 0) then
        return true
    end
    
    --Start by assuming we have no buffs, so they are missing.
    local missing = true
    for _orids in StringSplit(buffIDs,",") do
        missing = true
        for _andid in StringSplit(_orids,"+") do
            for i, buff in pairs(buffs) do
                if (buff.id == tonumber(_andid)
                    and (duration == 0 or buff.duration > duration or HasInfiniteDuration(buff.id))
                    and (owner == 0 or buff.ownerid == owner))
                then
                    missing = false
                end
            end
            if (not missing) then
                break
            end
        end
        if (missing) then
            return true
        end
    end
    
    return false
end
Reply
 


Forum Jump:


Users browsing this thread: 2 Guest(s)

We help you win the game.

FFXIV Bot and More.

 

Products