Giter Site home page Giter Site logo

Comments (3)

Phanx avatar Phanx commented on September 24, 2024

Not sure what to tell you. oUF_Phanx just queries the standard UnitPower API function, and displays whatever number the game client returns. If you notice such a discrepancy again, run this command and report back with what it says in your chat frame:

/dump UnitPower("player")

Other than that, this could happen if something was causing an actual error (thus preventing the update function from completing) but I see a green BugSack icon in your screenshot (no errors) so that isn't happening here.

from ouf_phanx.

Pingumania avatar Pingumania commented on September 24, 2024

/dump UnitPower("player") shows always a different number than the playerframe.
I found out that if I hover over the playerframe the correct number shows up :S

So I looked in the Functions.lua and change line 302

from

self.value:SetFormattedText("%d|cff%02x%02x%02x|r", floor(UnitPower(unit) / UnitPowerMax(unit) * 100 + 0.5), color[1] * 255, color[2] * 255, color[3] * 255)

to

self.value:SetFormattedText("%d|cff%02x%02x%02x|r", si(UnitPower(unit)), color[1] * 255, color[2] * 255, color[3] * 255)

now the correct number shows all the time.

edit: maybe this is because my rage is increased by 10? so my max is 110.

from ouf_phanx.

Phanx avatar Phanx commented on September 24, 2024

Ah, I see where the confusion lies. The power text normally shows a %. In the past this was always the same as the current value for non-mana users, because the max value for rage/energy/focus was generally (if not always?) 100. It looks like you can now have up to 110 rage -- 20 / 110 = 18%, which is the 18 you were seeing (the actual % symbol was hidden) -- and some of the new non-mana power types have max values other than 100 too, so I should just switch those to show the current value instead of a percent.

from ouf_phanx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.