Jump to content

[PATCH][7365] Potions cooldown


Auntie Mangos

Recommended Posts

Version: 7339

Bug Report: http://getmangos.eu/community/viewtopic.php?id=5238

Writer: miranda.conrado [miranda.conrado at gmail dot com]

What it does: implements potions cooldowns and blocking during combat.

Paste2 link:

http://paste2.org/p/155518

(anything wrong, just say, because it works well here)

Complete description:

It's kind of a workaround, but it is very clean.

Conditions:

1- drink potion not in combat: starts a 1min cooldown

2- drink potion in combat: cast Potion Sickness (53787), potions blocked until end of combat, then starts a 1min cooldown

3- enter in combat during potion cooldown: cooldown continues normally

UPDATE: checked with Elixirs

UPDATE2: changed to Category==4

Link to comment
Share on other sites

  • 39 years later...

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.

Link to comment
Share on other sites

Blizz changes the DBC.
Tha why it _must_ be used ;)

Category is field in spell.dbc and client using this data for select check what must be have cooldown if spell casted (potion used). So if we want that server will work in same way we _must_ used same data. In this case we have chance for example not chnage code if new potion spells will be added.

Link to comment
Share on other sites

Tha why it _must_ be used ;)

Category is field in spell.dbc and client using this data for select check what must be have cooldown if spell casted (potion used). So if we want that server will work in same way we _must_ used same data. In this case we have chance for example not chnage code if new potion spells will be added.

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.

Link to comment
Share on other sites

But, if add an 'abstraction layer' and use a SpellMgr function, then just the lowest function need to be changed
Agree. That why we have many functions in SpellMgr.h that hide low-level checks. Fo case if low-level check need replaced.

Just for note: i currently test highly rewrited (or maybe alternative, but anyway inspired by your patch) version of patch that i plan add in result in to mangos sources.

Link to comment
Share on other sites

Agree. That why we have many functions in SpellMgr.h that hide low-level checks. Fo case if low-level check need replaced.

Just for note: i currently test highly rewrited (or maybe alternative, but anyway inspired by your patch) version of patch that i plan add in result in to mangos sources.

But I think that having abstraction layers (as this one) and not use them is really... useless :P

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 :D

Link to comment
Share on other sites

Sorta. One potion until out of combat limitation is correct. if thats what potion sickness is used for.

but, the invisible debuff no icon, I've never seen or experienced. Its just , usable if its off cooldown, unusable if its on cooldown.

The picture in the link, shows a potion off cooldown, but being unable to be used because of potion sickness. I think that must have been in wotlk beta, because I've never seen anything about it on official. plus. The comments were from 2.4.3 using a screenshot from wotlk beta.

I don't think potion sickness exists on official when they are out of combat. The picture shows him in combat having no cooldown on potion but unable to use it. It should be usable.

Its just that part that's confusing me.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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