WeakAuras

WeakAuras

200M Downloads

Cata Classic WA valor cap conditions

SultonMRP opened this issue ยท 18 comments

commented

Is there an existing issue for this?

  • I have searched the existing open and closed issues.

Description

i got list of text showing different currencies, one is valor points (cata classic), weekly cap is 1600, i got 720, i set conditions to
If: 'Capped at Weekly Max' 'true'
Then:
'color' red

Even if i set to "Quantity earned this week" ">=" "1600" it still trigger color change when my valor amount is 720 (haven't spend any yet)

WeakAuras Version

WeakAura 5.13.1

World of Warcraft Flavor

Cataclysm Classic

World of Warcraft Region

US/NA

Tested with only WeakAuras

I got this issue with only WeakAuras enabled

Lua Error

not using Lua coding

Reproduction Steps

see discription.

Last Good Version

No response

Screenshots

valor error

Export String

!WA:2!nBztVrXrAC8XQdbOdKygcgWgcZAcErHGX27ItWA5f3Mz8lm(f6PhBGnjZuD31mDB3txfvvTThFkAeczP90cN4WQinNIIYPr5dWk0EKv6rwr5dGvuoKJCGZPQUhEXoRb0QGe(q3v19JR6553))p10DmFAU957FW)s)dMUwA30URNztBcZfZmqol5YiuANgb(RTgI5MXIqce(u2QZwPchlM4FF3F6xprQuPy1F6dwlCXF(RtLQfk0XJWMJ4hkShl7mwznBLSQJrciSP6OJo0gkIfqpQNqq5JCUZTcQkPFFY5(S8ND8PUzjKld5i8jH8Hn5cetOBxXp0N7PBiVj0Biy(vRIz8U7J1E4DB6ITJQuXQofZMiB(5YvmVHqoXefXqd1GtXbbt6Y13KhzJxghkkiJ2F1wLgB0cwLkynQPLziQg(fIyogwgHzH5YMpVz8tSNaJceEgrYSWMgGQJz3lkSDkO)yz9IzHOG5LPMm7V)9qH(1qQczyyF5EigXXfemCyvH3UHdAescXB4ktpveLujlJJDiHU8gQqvLcCsJAi)WCqVY)b4KWhdNc6tEF)B)jgUyUdT3cEKv4zOkYZZqQKzzeZNeXZ4eXK7RJpM3uwDM4Qk4QBeqqU5SfOazT1LzTiP(QBirLtxWz1nDcqCUAKb3FnSAWg2TTfjcPMM2CAd0)5n5oYLqZorK9AMCpRBvm9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86wuUOi7AKXFtbEjwLCxbALey9JlR4ESgOaVupuS)ToWdrBL5Fx3D)QzEZjiHVGv34FAVN1x)FSvIVKx9vM70g)1Xnh(vtC5w86W77gZVdcFOcTkSlzUc29ahlg8TjRQevO12ywlRzN(1MVh(pc((oDi)Xdf5AxXszEB0BJKpqkJ87uLFrdSRo2MvDSQ8RkMC1PYxxbUPOhpM2JO32OpIE8bnJOBrcoRXi)oKME5F8g)2p

Bisector Report

No response

commented

What is the result of the command /dump GetCurrencyInfo(396)?

commented

@SultonMRP could you try an edit

open WeakAuras/GenericTrigger.lua at line 4725, or search with a text editor for Private.ExecEnv.GetCurrencyInfo

Then replace this block:

Private.ExecEnv.GetCurrencyInfo = function(id)
  if WeakAuras.IsRetail() then
    return C_CurrencyInfo.GetCurrencyInfo(id)
  elseif WeakAuras.IsCataClassic() then
    local name, currentAmount, texture, earnedThisWeek, weeklyMax, totalMax, isDiscovered, rarity = GetCurrencyInfo(id)
    local currencyInfo = {
      name = name,
      description = "",
      isHeader = false,
      isHeaderExpanded = false,
      isTypeUnused = false,
      isShowInBackpack = false,
      quantity = currentAmount,
      trackedQuantity = 0,
      iconFileID = texture,
      maxQuantity = totalMax,
      canEarnPerWeek = weeklyMax > 0,
      quantityEarnedThisWeek = earnedThisWeek,
      isTradeable = false,
      quality = rarity,
      maxWeeklyQuantity = weeklyMax,
      totalEarned = 0,
      discovered = isDiscovered,
      useTotalEarnedForMaxQty = false,
    }
    return currencyInfo
  end
end

with this:

Private.ExecEnv.GetCurrencyInfo = function(id)
  return C_CurrencyInfo.GetCurrencyInfo(id)
end

then /reload or restart game, and test if that solve your issue

commented

Dump: value=GetCurrencyInfo(396)
[1]="Valor Points",
[2]=960,
[3]=463447,
[4]=96000,
[5]=1600,
[6]=0,
[7]=true,
[8]=4

commented

[4]=96000, means that you earned 96000 this week, clearly the api returns bogus information.

How does the tooltip for valor look like in the currency tab?

commented

Weekly maximum: 960/1600

commented

Can you make a screenshot of that?

commented

edit done, will test once server mantaince is done

commented
commented

back still turns red using "Capped at weekly max" true then color red in conditions

commented

give me a few, my other 85 has not done a heroic this week, let me do a "quick" heroic RDF and ill give ya results

commented

currently this week earned on him is 0 since i haven't done any heroics this weak lets see what happens when I do one heroic

commented

can you do a /dump C_CurrencyInfo.GetCurrencyInfo(396)?

commented

Dump: value=C_CurrencyInfo.GetCurrencyInfo(396)
[1]={
canEarnPerWeek=false,
description="Earned for defeating the most recent raid bosses or completing heroic Dungeon Finder runs and used to purchase the most powerful PvE armor and weapons.",
isShowInBackpack=false,
iconFileID=463447,
isHeader=false,
isTypeUnused=false,
discovered=true,
quality=4,
quantityEarnedThisWeek=96000,
isHeaderExpanded=false,
isTradeable=false,
totalEarned=0,
quantity=960,
name="Valor Points",
maxWeeklyQuantity=1600,
useTotalEarnedForMaxQty=false,
maxQuantity=0,
trackedQuantity=0
}

commented

That value quantityEarnedThisWeek=96000 is strange. Do you have any other char that has valor on which you can run C_CurrencyInfo.GetCurrencyInfo(396) ?

commented

did a heroic should be 240 more valor...........but.......
Dump: value=C_CurrencyInfo.GetCurrencyInfo(396)
[1]={
canEarnPerWeek=false,
description="Earned for defeating the most recent raid bosses or completing heroic Dungeon Finder runs and used to purchase the most powerful PvE armor and weapons.",
isShowInBackpack=false,
iconFileID=463447,
isHeader=false,
isTypeUnused=false,
discovered=true,
quality=4,
quantityEarnedThisWeek=24000,
isHeaderExpanded=false,
isTradeable=false,
totalEarned=0,
quantity=720,
name="Valor Points",
maxWeeklyQuantity=1600,
useTotalEarnedForMaxQty=false,
maxQuantity=0,
trackedQuantity=0
}

commented

https://i.imgur.com/C2DsHCb.png
Basic text WA with simple currency player unit check

commented

is there a custom trigger i can use to do a divide by 10 until its fig out?