• 0

    posted a message on PitBull 4.0
    Quote from Shefki
    It should work then. What makes you think that the text is displaying the wrong power/health?


    That's a picture of my unitframes:



    At the bottom is my player frame, above my target frame.
    On the left health, on the right mana.

    As you can see the values for health are totally wrong and different from the ones in the target frame.

    But I don't know why and I can see no error in the lua code...
    Posted in: Unit Frames
  • 0

    posted a message on LuaTexts Official Thread
    Quote from Shefki
    Do you have the proper events selected. UNIT_HEALTH and UNIT_HEALTHMAX and then there's a whole bunch of events for the power bar like UNIT_MANA, UNIT_MANAMAX, UNIT_RAGE, UNIT_RAGEMAX etc



    For the health bar I have the events UNIT_AURA, UNIT_HEALTH and UNIT_HEALTHMAX selected and for the power bar UNIT_DISPLAYPOWER, UNIT_ENERGY, UNIT_FOCUS, UNIT_MANA, UNIT_MAXENERGY, UNIT_MAXFOCUS, UNIT_MAXMANA, UNIT_MAXRAGE, UNIT_MAXRUNIC_POWER, UNIT_RAGE and UNIT_RUNIC_POWER
    Posted in: Unit Frames
  • 0

    posted a message on LuaTexts Official Thread
    Hi there,

    I have this lua code in my pitbull4 for Health


    local s = Status(unit)
    if s then
    return s
    end
    local cur, max = HP(unit), MaxHP(unit)
    if UnitIsFriend(unit,"player") then
    local miss = max - cur
    if miss ~= 0 then
    return "|cffff7f7f%d|r",miss
    else
    return ''
    end
    else
    return "%s/%s",Short(cur,true),Short(max,true)
    end



    and this for my mana bar


    local max = MaxPower(unit)
    if max > 0 then
    return "%s/%s",Power(unit),max
    end


    but it shows wrong values for both health and mana ...
    is anybody here who can help me with that?

    Thank you <3
    Posted in: Unit Frames
  • To post a comment, please or register a new account.