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

Maybe I'm missing something...

Truman422

Member
Joined
Jan 10, 2011
Messages
198
Reaction score
14
But I would just use the new WoWSpell.CooldownTimeLeft just like it looks right? My Visual Studio isn't pulling it for me, and I can't get it to compile, what am I doing wrong? Could someone give me an example of how it would be used?
 
have you updated your refefrences to the new HB? if you did not your visual studio is using the old HB reference and so do not know that that new method exist.
Only working way i know to update referencis is delete them and add them again (the new one this time)
 
Yeah, I updated them the first thing I did, I can see it in the WoWSpell call, but I can't seem to get my code to call it... Not sure why cause I'm a noob programmer, taught from stuff I've seen here only.
 
can you post here the code that's not working and the error message? (or how you know is not working :)
 
Well, I know it's not working because when I type WoWSpell. CooldownTimeLeft isn't an option to select, that is why I'm hoping someone can give me an example of how it is used, so I can learn from that and go from there.
 
something like this?
Code:
if(SpellManager.Spells["Holy Shock"].CooldownTimeLeft.TotalSeconds<1){bla bla bla}
ofc you can change holy shock with whatever suits you
 
Ah hah! Beautiful, thank you, that is exactly what I was looking for. You're awesome Gilderoy. Thanks.
 
something like this?
Code:
if(SpellManager.Spells["Holy Shock"].CooldownTimeLeft.TotalSeconds<1){bla bla bla}
ofc you can change holy shock with whatever suits you

Sorry to hi-jack the thread, but think the OP is now sorted.

Beginner C# question

Could you tell me what the ["Holy Shock"] part of the above line of code is called so I can look it up please? I came accross this the other day whilst coding but I don't know how to use it. It looks to me like what you would use to reference an index of an array, so I thought it might be something to do with enumeration, but I've not been able to get a satisfactory description as I don't know what "words" I should use in my google search.

Thanks
 
that's the index of a dictionary.
Dictionary are a particular form of C# structur that associate to every memeber of the index another structur.
in this case SpellManager.Spells is a dictionary of String, WoWspell, this means that for every string you give as index you get a wowspell.
try to look for C# dictionary, I hope this will help you :)
 
Back
Top