cliaz / Titan-Panel-Classic-Reagent-Tracker

A continuation of the WoW Titan Panel Reagent Tracker addon by L'ombra.
0 stars 4 forks source link

Feature/janky multiple stacks #5

Closed cliaz closed 3 years ago

cliaz commented 3 years ago

added support for purchasing 3 stacks of:

Untested in live wow, use with caution. Will not buy too much or delete anything, might just simple not work with those 5 reagents.

panpaningame commented 3 years ago

I copied/pasted the files in my World of Warcraft_classic_\Interface\AddOns\TitanClassicReagentTracker folder I get the message error : ...terface\AddOns\TitanClassicReagentTracker\TitanClassicReagentTracker.lua:294: malformed number near '3StackVariableName' Time: Wed Jan Count: 3

I think a variable cannot begin by a number, I'll check.

panpaningame commented 3 years ago

After renamed "3StackVariableName" by "threeStackVariableName", I get the following message : Count: 1 Message: ...terface\AddOns\TitanClassicReagentTracker\TitanClassicReagentTracker.lua line 299: '=' expected near '==

I'll check later, got a meeting :)

cliaz commented 3 years ago

give 23fbfb8 a crack - and thanks for testing!

panpaningame commented 3 years ago

More testing : Always the error Message: ...terface\AddOns\TitanClassicReagentTracker\TitanClassicReagentTracker.lua line 299: '=' expected near '==

So I write this : if (reagent == "Arcane Powder") then info2.value = Buy3StacksArcanePowder threeStackVariableName = "Buy3StacksArcanePowder" end if (reagent == "Maple Seed") then info2.value = Buy3StacksMapleSeed threeStackVariableName = "Buy3StacksMapleSeed" end if (reagent == "Sacred Candle") then info2.value = Buy3StacksSacredCandle threeStackVariableName = "Buy3StacksSacredCandle" end if (reagent == "Symbol of Kings") then info2.value = Buy3StacksSymbolOfKings threeStackVariableName = "Buy3StacksSymbolOfKings" end if (reagent == "Wild Thornroot") then info2.value = Buy3StacksWildThornroot threeStackVariableName = "Buy3StacksWildThornroot" end

I don't know if I did right, i'm not familiar with the syntax (C++ team :D)

After that, no error, but the variable info2 has a nil value So next to info = {} I create a info2 = {}

No error now, I got the new button Option: Buy 3 stack of SacredCandle :)

But for now, it's not buying Candle.

I check only the 3 Buying stack option, I set debug to true I talk to a vendor, the addon detect Light Feather, Holy Candle et Sacred Candle, good (like before)

cliaz commented 3 years ago

fixed the else-if logic (this is painful using only vi), changed variable allocation order. commit cc0c95c

cliaz commented 3 years ago

Right, probably last commit before I'm back in a situation where I can test stuff myself.

cliaz commented 3 years ago

Closing this request as am implementing proper configurable logic