Hey, I want to send player a message when the player cast a spell and only if the target has a specific aura, but I want it with all ranks of the aura given, obviously using a switch or a if with all the ranks is not a good method, I know.
Maybe you can help me creating a function or something that looks for for all ranks of the spell (maybe it exists already but I didn't see it) .
For example something like:
but it doesn't work, my knowledges of loops are like -1 XD.
uint32 Spell::GetAllRanksOfSpell(uint32 spellId)
uint32 rankSpell = sSpellMgr->GetFirstSpellInChain(spellId);
rankSpell = sSpellMgr->GetNextSpellInChain(rankSpell);