Thanks Mist, for all the options :D. I combined your file with some from Nirek's to add bag item cooldowns, however, there's an issue. I suppose this question pertains more to Nirek's part of the code, but when I switch in an item to my character that has a cooldown associated (say, 30 sec cooldown in on a use trinket switch in), it creates a bar twice. Any idea what kind of code to add in to fix this bug?
ok..
@Mist... get this.. (im no programmer so iam totally clueless)
ur core.lua file, when compiled in SciTE gives error
"C:\Program Files\SciTE-WOWInterface\bin\luac.exe: core.lua:655: unexpected symbol near `...'"
but doesn't error out in game, working as intended.
but when u add the Hourglass:ScanBags() calls & that actual function you took out when u modified the version that has the Pet/Bag CD's in them
in game it throws
[2007/07/03 02:44:54-575-x1]: Hourglass\core.lua:790: 'end' expected (to close 'for' at line 434) near '<eof>'
Thanks Mist, for all the options :D. I combined your file with some from Nirek's to add bag item cooldowns, however, there's an issue. I suppose this question pertains more to Nirek's part of the code, but when I switch in an item to my character that has a cooldown associated (say, 30 sec cooldown in on a use trinket switch in), it creates a bar twice. Any idea what kind of code to add in to fix this bug?
I had a quick look at the bag cooldowns code, and the only thing that crosses my mind is to remove the call to ScanBags() from the handler of UNIT_INVENTORY_CHANGED event. So this function will look like this:
function Hourglass:UNIT_INVENTORY_CHANGED(unit)
if unit == "player" then
self:ScanItems()
end
end
like in the original code.
I don't know if this works, I have very limited experience with WoW API and Lua, but hopefully it helps. :)
ok..
@Mist... get this.. (im no programmer so iam totally clueless)
ur core.lua file, when compiled in SciTE gives error
"C:\Program Files\SciTE-WOWInterface\bin\luac.exe: core.lua:655: unexpected symbol near `...'"
but doesn't error out in game, working as intended.
but when u add the Hourglass:ScanBags() calls & that actual function you took out when u modified the version that has the Pet/Bag CD's in them
in game it throws
[2007/07/03 02:44:54-575-x1]: Hourglass\core.lua:790: 'end' expected (to close 'for' at line 434) near '<eof>'
O.O
any ideas wtf happened there?
Well, I never used SciTe, I guess it doesn't find some Ace library and it fires an error. At least that's what happens with many WoW Lua files when trying to compile them using a standalone Lua compiler. But if it works in the game, that's all that matters. :)
Just a clarification here: I didn't take out any code, I only added. The first modified core.lua file I posted in this thread had pet cooldowns, and Nirek added bag cooldowns. I didn't add his code to my version simply because I didn't need bag cooldowns, and I tend to avoid bag scanning as much as possible.
As to why it doesn't work, I suppose you didn't copy&paste everything and that leads to syntax errors. Since SaxRussel managed to combine my additions with Nirek's, maybe he can post his core.lua here so people who want both can use that instead? Otherwise you can send me the file in a PM and I'll have a look to see if I can spot anything wrong.
it's rather petty that the author is selfish/rude about suggestions even when provided the source to just simply apply to the SVN.
The only petty/rude behaviour I see in this thread is people complaining when a mod author doesn't jump to meet their demands and add features he doesn't want to add to a mod he coded to meet HIS demands and is kind enough to allow others to use.
it's rather petty that the author is selfish/rude about suggestions even when provided the source to just simply apply to the SVN.
The only petty/rude behaviour I see in this thread is people complaining when a mod author doesn't jump to meet their demands and add features he doesn't want to add to a mod he coded to meet HIS demands and is kind enough to allow others to use.
I couldnt agree more.... the arrogance of some people is beyond me. Its free... use it or dont. Make suggestions, if Author disagrees, take his code (hes offered it up) and do something with it. If you don't have the skills (such as myself) the use it as it is.... or don't.
To summarize, the file attached to this post adds the following to the default Hourglass options:
- settings for bar width/height/scale
- pet cooldowns
- (togglable) announcement for cooldown expiry as SCT or MSBT messages
- (togglable) announcement for cooldown expiry as emphasized bars (like Bigwigs)
- (togglable) show a single bar when a certain magic school is locked
As far as I've seen, it works as intended, but if there are any issues, I will try my best to fix them.
Mist, your a champ.... the additions are very sweet indeed... the school locked changes appear to be working without a hitch, and the changes on the lock appear to all in check.
Something I did notice on my hunter (Ive got an army of alts), when growl cooldown shows up, his cower cooldown shows up as well. The hitch is, I always have cower off as I solo alot, and that boy is my tank.
Just an FYI, not expecting you to delve into this issue, as I understand you play a lock.
Mist, your a champ.... the additions are very sweet indeed... the school locked changes appear to be working without a hitch, and the changes on the lock appear to all in check.
Something I did notice on my hunter (Ive got an army of alts), when growl cooldown shows up, his cower cooldown shows up as well. The hitch is, I always have cower off as I solo alot, and that boy is my tank.
Just an FYI, not expecting you to delve into this issue, as I understand you play a lock.
Thanks again for all the nifty changes.
Thanks for you kind words. :)
Regarding the hunter pet issues you see, I've been scratching my head, and the only thing that I can think of is if Growl and Cower share cooldown. The warlock pet change I've made is not specific to warlocks, should work for all the pet classes. Though I have a number of alts myself, I don't have a hunter, so it's impossible to test, hence I have to ask you if those 2 abilities share cooldown?
hmmm... share a cooldown... I guess I don't really know, but I will do my best to look into it.
Were about to go see Transformers, so I will search around later when we get back.
function Hourglass:UNIT_INVENTORY_CHANGED(unit)
if unit == "player" then
self:ScanItems()
end
end
like in the original code.
I don't know if this works, I have very limited experience with WoW API and Lua, but hopefully it helps. :)
Yeah, I actually tried that at first, but then (almost as expected), it wouldn't grab cooldowns from bags anymore (potions, etc). Odds are my experience with these things is even more limited than yours, though =P
EDIT: To clarify a bit, it wouldn't create two bars anymore, however if you switched the trinket out, and back in again (as in, say, riding crop >> trinket >> mount again >> dismount), you'd have the original bar going at whatever time it had left, and then a new bar would come up. I suppose this solution would work if you could get rid of the old bar somehow?
Here's a screen of what I mean (I know my explanation was a bit of a mess =P)
The spawning multi bar thing has to do with how I originally implemented the bag code, it was seperate from all the other ones, so when you equipped it, it would hand it off to the item scanning code which would also spawn a bar, anyways, I completely rewrote it to use itemnames directly so it should only ever spawn one bar, I also merged in all the other stuff Mist was working on, test this out, it 'should' work from my basic testing.
Yeah, I actually tried that at first, but then (almost as expected), it wouldn't grab cooldowns from bags anymore (potions, etc). Odds are my experience with these things is even more limited than yours, though =P
This issue got me intrigued, so I decided to have a look at it. It seems like the way UNIT_INVENTORY_CHANGED and BAG_UPDATE_COOLDOWN events are fired is counterintuitive (at least for me :P). When you change the trinkets, BAG_UPDATE_COOLDOWN is fired first, and it still considers the trinket as being in your bags. Then UNIT_INVENTORY_CHANGED is fired. That's how I believe it is at least, based on some tests I did this evening.
Hourglass creates the bars for trinket slots with the name of the trinket slot, e.g. "Trinket0Slot", whereas the ScanBags() function creates the bars with the item name, e.g. "Icon of Silver Crescent". So they appear to be different things.
Anyway, a simple solution is to change in ScanItems() function so it creats the bars with the item name. Replace:
I've tested it a little and it seems to work. The drawback is if you have equip 2 trinkets with same name, you'll get weird cooldowns (I didn't have 2 trinkets with same name to test, but I imagine that's what happens).
Edit: ah well, Nirek beat me to it. :) Better use his file rather than hack into the Lua.
Hehe, well, I also cleaned up the table to use one table for everything, rather than having a seperate one just for bag items, so it should be a bit more efficent in general, and yes, it will pretty much never spawn 2 bars with the same name now, so 2 trinkets of the same name would act.. strange, but then again, every trinket I've ever seen that has a use action is unique anyway, or at the very least is on a shared cooldown with itself, so I don't think it matters.
ok, first Transformers was awesome..... Ya I got wood. And to help those of you out. My wife loved it, both my kids (girls) loved it, and my Father InLaw loved it (and he was skeptical because he aint all about Transformers).
Quote from Mist »
Though I have a number of alts myself, I don't have a hunter, so it's impossible to test, hence I have to ask you if those 2 abilities share cooldown?
now, I was unable to find any information via google about Growl and Cower sharing a cooldown.
But during a manual test... If I click cower, it causes a timer to show up on my boars Charge, but not the Growl. So it appears they dont actually share a cooldown... but this is just a manual check.... so I have no idea about what is actually going on with the inner workings of WoW API.
Nirek, thanks for combining all those features.... Both of yours and Mist's time is much appreciated.
EDIT::::::
The more I watch it.... it does seem they are on the same cool down..... they cycle together every single time... not really sure why it looked different earlier... (probably not enough rest, we been moving a family member for past few days).
So ya, Im going to go with they are on the same cooldown.
Update through WAU or get last version on some UI site
Copy our preferred core.lua to your directory
Profit
And repeat every time HG is updated.
An other way would be to update manually, of course.
I am only wondering (not begging, nor requiring) if making HG somehow modular would be possible.
That way the core of the addon would remain untouched, and people willing to go a bit further could do that easily.
But it is mostly for the sake of lazyness... and that may even stop some people for bitching around.
-ok so i need all the features from both revisions in this post... any ideas?
(Pet/Bag CD's + Bar Options. Could Care less bout SCT/Emphasis)
it's rather petty that the author is selfish/rude about suggestions even when provided the source to just simply apply to the SVN.
@ SaxRussel, it's prolly counting the Equip CD and Item CD as well
@Mist... get this.. (im no programmer so iam totally clueless)
ur core.lua file, when compiled in SciTE gives error
"C:\Program Files\SciTE-WOWInterface\bin\luac.exe: core.lua:655: unexpected symbol near `...'"
but doesn't error out in game, working as intended.
but when u add the Hourglass:ScanBags() calls & that actual function you took out when u modified the version that has the Pet/Bag CD's in them
in game it throws
[2007/07/03 02:44:54-575-x1]: Hourglass\core.lua:790: 'end' expected (to close 'for' at line 434) near '<eof>'
O.O
any ideas wtf happened there?
I had a quick look at the bag cooldowns code, and the only thing that crosses my mind is to remove the call to ScanBags() from the handler of UNIT_INVENTORY_CHANGED event. So this function will look like this:
like in the original code.
I don't know if this works, I have very limited experience with WoW API and Lua, but hopefully it helps. :)
Well, I never used SciTe, I guess it doesn't find some Ace library and it fires an error. At least that's what happens with many WoW Lua files when trying to compile them using a standalone Lua compiler. But if it works in the game, that's all that matters. :)
Just a clarification here: I didn't take out any code, I only added. The first modified core.lua file I posted in this thread had pet cooldowns, and Nirek added bag cooldowns. I didn't add his code to my version simply because I didn't need bag cooldowns, and I tend to avoid bag scanning as much as possible.
As to why it doesn't work, I suppose you didn't copy&paste everything and that leads to syntax errors. Since SaxRussel managed to combine my additions with Nirek's, maybe he can post his core.lua here so people who want both can use that instead? Otherwise you can send me the file in a PM and I'll have a look to see if I can spot anything wrong.
The only petty/rude behaviour I see in this thread is people complaining when a mod author doesn't jump to meet their demands and add features he doesn't want to add to a mod he coded to meet HIS demands and is kind enough to allow others to use.
I couldnt agree more.... the arrogance of some people is beyond me. Its free... use it or dont. Make suggestions, if Author disagrees, take his code (hes offered it up) and do something with it. If you don't have the skills (such as myself) the use it as it is.... or don't.
Mist, your a champ.... the additions are very sweet indeed... the school locked changes appear to be working without a hitch, and the changes on the lock appear to all in check.
Something I did notice on my hunter (Ive got an army of alts), when growl cooldown shows up, his cower cooldown shows up as well. The hitch is, I always have cower off as I solo alot, and that boy is my tank.
Just an FYI, not expecting you to delve into this issue, as I understand you play a lock.
Thanks again for all the nifty changes.
Thanks for you kind words. :)
Regarding the hunter pet issues you see, I've been scratching my head, and the only thing that I can think of is if Growl and Cower share cooldown. The warlock pet change I've made is not specific to warlocks, should work for all the pet classes. Though I have a number of alts myself, I don't have a hunter, so it's impossible to test, hence I have to ask you if those 2 abilities share cooldown?
Were about to go see Transformers, so I will search around later when we get back.
Yeah, I actually tried that at first, but then (almost as expected), it wouldn't grab cooldowns from bags anymore (potions, etc). Odds are my experience with these things is even more limited than yours, though =P
EDIT: To clarify a bit, it wouldn't create two bars anymore, however if you switched the trinket out, and back in again (as in, say, riding crop >> trinket >> mount again >> dismount), you'd have the original bar going at whatever time it had left, and then a new bar would come up. I suppose this solution would work if you could get rid of the old bar somehow?
Here's a screen of what I mean (I know my explanation was a bit of a mess =P)
This issue got me intrigued, so I decided to have a look at it. It seems like the way UNIT_INVENTORY_CHANGED and BAG_UPDATE_COOLDOWN events are fired is counterintuitive (at least for me :P). When you change the trinkets, BAG_UPDATE_COOLDOWN is fired first, and it still considers the trinket as being in your bags. Then UNIT_INVENTORY_CHANGED is fired. That's how I believe it is at least, based on some tests I did this evening.
Hourglass creates the bars for trinket slots with the name of the trinket slot, e.g. "Trinket0Slot", whereas the ScanBags() function creates the bars with the item name, e.g. "Icon of Silver Crescent". So they appear to be different things.
Anyway, a simple solution is to change in ScanItems() function so it creats the bars with the item name. Replace:
with:
I've tested it a little and it seems to work. The drawback is if you have equip 2 trinkets with same name, you'll get weird cooldowns (I didn't have 2 trinkets with same name to test, but I imagine that's what happens).
Edit: ah well, Nirek beat me to it. :) Better use his file rather than hack into the Lua.
now, I was unable to find any information via google about Growl and Cower sharing a cooldown.
But during a manual test... If I click cower, it causes a timer to show up on my boars Charge, but not the Growl. So it appears they dont actually share a cooldown... but this is just a manual check.... so I have no idea about what is actually going on with the inner workings of WoW API.
Nirek, thanks for combining all those features.... Both of yours and Mist's time is much appreciated.
EDIT::::::
The more I watch it.... it does seem they are on the same cool down..... they cycle together every single time... not really sure why it looked different earlier... (probably not enough rest, we been moving a family member for past few days).
So ya, Im going to go with they are on the same cooldown.
Though, as I understand it, the way it works is:
An other way would be to update manually, of course.
I am only wondering (not begging, nor requiring) if making HG somehow modular would be possible.
That way the core of the addon would remain untouched, and people willing to go a bit further could do that easily.
But it is mostly for the sake of lazyness... and that may even stop some people for bitching around.
I love HG anyway :]