Jump to content
  • Add optional IsMine to UnitBuff wotlk+


    Ordush
    • Version: All Product: WRobot General Type: Suggestion Status: Not Added

    It would be awesome to have IsMine as optional for checking buffs in wotlk

    name, rank, icon, count, debuffType, duration, expirationTime, isMine, isStealable = UnitAura("unit", index or ["name", "rank"][, "filter"])

    Example:
    If (ObjectManager.Target.BuffTimeLeft("Vampiric Touch", true) < 1000)
    Where the true is isMine

    I know I can manually just make a lua function to check it myself, but it would be nice to have built into the api. ?



    User Feedback

    Recommended Comments

    TheSmokie

    Posted (edited)

    Wow, i am glad to see others working on Wrath of the lich king content. Good job!

     

    Ps : IsMine was changed to UnitCaster in patch 3.1.0

    Edited by Smokie
    added a PS
    Ordush

    Posted

    4 hours ago, Smokie said:

    Wow, i am glad to see others working on Wrath of the lich king content. Good job!

     

    Ps : IsMine was changed to UnitCaster in patch 3.1.0

    It was just an example, I'm  pretty sure that Droidz reads from memory instead of using the lua function. Was just to explain what I meant. ?

    TheSmokie

    Posted

    I know, just thought of adding a little info.

    Droidz

    Posted

    Hey,

    In Wotlk you have Aura.Owner.

    You can use it like:

    if (ObjectManager.Target.GetBuffs("Vampiric Touch").Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < 1000))

     

    Ordush

    Posted

    9 minutes ago, Droidz said:

    Hey,

    In Wotlk you have Aura.Owner.

    You can use it like:

    
    if (ObjectManager.Target.GetBuffs("Vampiric Touch").Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < 1000))

     

    Very nice!

    Ordush

    Posted (edited)

    On 5/8/2020 at 2:39 PM, Droidz said:

    Hey,

    In Wotlk you have Aura.Owner.

    You can use it like:

    
    if (ObjectManager.Target.GetBuffs("Vampiric Touch").Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < 1000))

     

    This returns false if the target doesn't have Vampiric Touch
    Have been trying to make a workaround without luck.
    if ((ObjectManager.Target.GetBuffs(_VampiricTouch.Name).Any(a => a.Owner == ObjectManager.Me.Guid && a.TimeLeft < (1000 + ObjectManager.Me.GlobalCooldownTimeLeft + 1500)) || ObjectManager.Me.Guid != ObjectManager.Target.BuffCastedBy(_VampiricTouch.Name)))

    Nevermind lol the last code line i wrote just here works.

    Edited by Ordush


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