Jump to content

miranda.conrado

Members
  • Posts

    7
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by miranda.conrado

  1. I hadn't read all the wowhead of Potion Sickness. Here is what looks like happens: Use a potion in a fight, no spell 53787, cooldown starts off, but when ended, can't use until out of combat. If someone could confirm that or explain what happens, it should be easy. For me, it's like a shot in the dark. And btw, the buff is just for aesthetics. It really doesn't do a thing.
  2. But I think that having abstraction layers (as this one) and not use them is really... useless Anyway, I was just wandering around bug report section as I do and I saw this 3 page topic. And I saw that nothing was done for this bug (which I think is a bad one). Anyway, doesn't matter who did it or how did it, just that it's done. I really didn't expect my patch to be used, as it creates new things and stuff that I don't know yet the best place to go. It is more like incentive
  3. That's why I think it shouldn't be like that. If they change the category from 4 to 5, for example, these will be 2 more places to change the code. And if noone remembers this, it will have a unknown behaviour. But, if add an 'abstraction layer' and use a SpellMgr function, then just the lowest function need to be changed, that is, the one that says 'Category 4 is SPELL_NORMAL'. (I know it really isn't like that, but just an example). The server being done like that is more structurated and malleable. It's just an opinion of an outside programmer. Changing to Category==4.
  4. I didn't know that. Vladimir: I explain what I did down here. Unfortunately, I don't know where to find infos like that Category 4 is for potions. I looked the places I thought might be. Also, by using a internal type like SpellSpecific, it don't need to be changed if, for a strange reason, Blizz changes the DBC. It's just I'm not used to hardcode things like this. If I'm wrong, np. Just add that and we all will be happy. EDIT: Found needed info in WoWWiki and SpellMgr.h Updated the first post. According to SpellMgr.h, GetSpellSpecific returns SPELL_NORMAL for potions and other things for Elixirs. Just added the check and tested with Elixir of Agility. Seems to work fine.
  5. I'm quite new to MaNGOS and what to learn more about its the struct, so I decided to get some TODOs done. But when I was looking at Master.cpp, I saw this note: // There is no Master anymore // TODO: clear the rest of the code What does that means? Should I put the functions in World (as the example change was replacing with World variables) or what? I think the ideia is to put in World, but not sure. Thanks.
  6. I didn't see your question, sorry. To make the value of nextid be saved, you can make it global or static. In both cases, it will be set to the default value of the compiler, which is ussualy 0 for int. Then, the value will me manteined between calls to the same function. static int nextid;
  7. The problem is here: if(nextid != 0) { QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` WHERE `id` = %u", nextid); } else { QueryResult *result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` ORDER BY RAND() LIMIT 1"); } When you declare the variable result in your code, its scope is limited to that block. That is, it only exists in that block. You can solve your problem with a code like this: QueryResult *result; if(nextid != 0) { result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` WHERE `id` = %u", nextid); } else { result = WorldDatabase.PQuery("SELECT `text`, `next` FROM `autobroadcast` ORDER BY RAND() LIMIT 1"); }
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use