*Temp fix for aura stack check.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-13 14:35:56 -06:00
parent 4b64670f70
commit 2725c555ea
+13 -9
View File
@@ -139,14 +139,15 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
{ {
//food/drink //food/drink
if (spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED) if (spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED)
for(int i = 0; i < 3; i++) {
if( spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_POWER_REGEN) for(int i = 0; i < 3; i++)
return SPELL_DRINK; if( spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_POWER_REGEN)
else if ( spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_REGEN) return SPELL_DRINK;
return SPELL_FOOD; else if ( spellInfo->EffectApplyAuraName[i]==SPELL_AURA_MOD_REGEN)
return SPELL_FOOD;
}
// this may be a hack // this may be a hack
if((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_FOOD) else if((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_FOOD)
&& !spellInfo->Category) && !spellInfo->Category)
return SPELL_WELL_FED; return SPELL_WELL_FED;
break; break;
@@ -1157,8 +1158,8 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
// return false; // return false;
//use data of highest rank spell(needed for spells which ranks have different effects) //use data of highest rank spell(needed for spells which ranks have different effects)
spellId_1=GetLastSpellInChain(spellId_1); //spellId_1=GetLastSpellInChain(spellId_1);
spellId_2=GetLastSpellInChain(spellId_2); //spellId_2=GetLastSpellInChain(spellId_2);
SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1); SpellEntry const *spellInfo_1 = sSpellStore.LookupEntry(spellId_1);
SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2); SpellEntry const *spellInfo_2 = sSpellStore.LookupEntry(spellId_2);
@@ -1216,6 +1217,9 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
} }
} }
if(spellInfo_1->SpellFamilyName && IsRankSpellDueToSpell(spellInfo_1, spellId_2))
return true;
//if spells have exactly the same effect they cannot stack //if spells have exactly the same effect they cannot stack
for(uint32 i = 0; i < 3; ++i) for(uint32 i = 0; i < 3; ++i)
if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i] if(spellInfo_1->Effect[i] != spellInfo_2->Effect[i]