Skip to content

Instantly share code, notes, and snippets.

@jbclements
Created May 18, 2012 23:05
Show Gist options
  • Save jbclements/2728028 to your computer and use it in GitHub Desktop.
Save jbclements/2728028 to your computer and use it in GitHub Desktop.
Excerpt from mangos SpellMgr.cpp
bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2) const
{
SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1);
SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
if (!spellInfo_1 || !spellInfo_2)
return false;
if (spellId_1 == spellId_2)
return false;
// Resurrection sickness
if ((spellInfo_1->Id == SPELL_ID_PASSIVE_RESURRECTION_SICKNESS) != (spellInfo_2->Id==SPELL_ID_PASSIVE_RESURRECTION_SICKNESS))
return false;
// Allow stack passive and not passive spells
if (spellInfo_1->HasAttribute(SPELL_ATTR_PASSIVE) != spellInfo_2->HasAttribute(SPELL_ATTR_PASSIVE))
return false;
// Specific spell family spells
switch(spellInfo_1->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
switch(spellInfo_2->SpellFamilyName)
{
case SPELLFAMILY_GENERIC: // same family case
{
// Thunderfury
if ((spellInfo_1->Id == 21992 && spellInfo_2->Id == 27648) ||
(spellInfo_2->Id == 21992 && spellInfo_1->Id == 27648))
return false;
// Lightning Speed (Mongoose) and Fury of the Crashing Waves (Tsunami Talisman)
if ((spellInfo_1->Id == 28093 && spellInfo_2->Id == 42084) ||
(spellInfo_2->Id == 28093 && spellInfo_1->Id == 42084))
return false;
// Soulstone Resurrection and Twisting Nether (resurrector)
if (spellInfo_1->SpellIconID == 92 && spellInfo_2->SpellIconID == 92 && (
(spellInfo_1->SpellVisual[0] == 99 && spellInfo_2->SpellVisual[0] == 0) ||
(spellInfo_2->SpellVisual[0] == 99 && spellInfo_1->SpellVisual[0] == 0)))
return false;
// Heart of the Wild, Agility and various Idol Triggers
if (spellInfo_1->SpellIconID == 240 && spellInfo_2->SpellIconID == 240)
return false;
// Personalized Weather (thunder effect should overwrite rainy aura)
if (spellInfo_1->SpellIconID == 2606 && spellInfo_2->SpellIconID == 2606)
return false;
// Mirrored Soul (FoS - Devourer) - and other Boss spells
if (spellInfo_1->SpellIconID == 3176 && spellInfo_2->SpellIconID == 3176)
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment