nakx
-
Posts
3 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by nakx
-
-
Hello,
I was working with some SpellProcEvent and found something i think it may be wrong. The function called IsSpellProcEventCanTriggeredBy was supposed to verify if a SpellProcEvent is going to be triggered by the event that just happened.
The problem is with the code:
// spellFamilyName is Ok need check for spellFamilyMask if present if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2) { if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0 && (spellProcEvent->spellFamilyMask2 & procSpell->SpellFamilyFlags2) == 0) return false; active = true; // Spell added manualy -> so its active spell }
At this point it is going to check if the SpellFamilyMask and SpellFamilyMask2 matches with the spell that was casted.I believe, that even if only one mask Fail, the result should return false. But with this code, BOTH of the masks must fail to return false.
So i think that the code should be:
// spellFamilyName is Ok need check for spellFamilyMask if present if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2) { if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0 [b]||[/b] (spellProcEvent->spellFamilyMask2 & procSpell->SpellFamilyFlags2) == 0) return false; active = true; // Spell added manualy -> so its active spell }
I could have posted on patches, but im not sure if im right.
What do you think?
-
Disable the GridUnload feature and tell me if it worked =)
It worked for me at least =)
SpellProcEvent Handling
in OldGeneral discussion
Posted
Exactly, but if only one mask fit, the result wont be false. In other words, only one mask has to fit to return true.
It should be both of them should fit to return true ?