What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

Bug in Styx.WoWInternals.WoWObjects.WoWItem.Cooldown?

Gilderoy

New Member
Joined
May 10, 2010
Messages
761
Reaction score
16
Hello all,
is Styx.WoWInternals.WoWObjects.WoWItem.Cooldown broken?
If I call it on an item not in cooldown it return 0 and that's fine.
If i call it on an item IN cooldown it return a random float, always the same float no matter how much cooldown left (for example always 48890.64) until the cooldown end and then start to give 0 again.
the code I'm using is this
Code:
var Trinket1 = ObjectManager.GetObjectsOfType Styx.WoWInternals.WoWObjects.WoWItem <>(false).FirstOrDefault(i => i.Name == name);
if (Trinket1 != null){slog("ID1 {0} CD1 {1}", Trinket1.Entry, Trinket1.Cooldown);}
with the <> in the right places
 
an item cooldown is not the same thing as an spell cooldown thats attached to an item.
 
sure thing and so? if I call this on a trinket with an on use cooldown of 2 minutes it should give 0 if the trinket is ready, 119 one second after usage 118 2 secon later and so on, instead of a random float, right?
 
sure thing and so? if I call this on a trinket with an on use cooldown of 2 minutes it should give 0 if the trinket is ready, 119 one second after usage 118 2 secon later and so on, instead of a random float, right?
i just dont think your pulling it right.

try,
WoWItem.ItemInfo.SpellCooldown

that should return that number you want.
 
Thanks for your help CodenameG, realy appreciated :)
But nope, that return the Max cooldown of the object (2 min) not the cooldown remaning.. will always return 120000 (couse it return in milliseconds) both if the trinked is in CD or is ready..
But thanks to you now i can make a function that knowing the max cooldown of th object check WoWItem.Cooldown every WoWItem.ItemInfo.SpellCooldown to see if it's ready ^__^
Not the best solution but will work, Thanks a lot!
 
Not exactly a bug per-se. It returns the time (Lua time) when the cooldown started.

Unfortunately, can't change the way it works, so I'll add another property to return a useful cooldown in our next release.


Thanks for pointing it out.
 
Thanks you Apoc! :) that's great news! can't wait for the next release then ^__^
Eh eh lol thanks CodenameG i love the features :P
 
Back
Top