[8399] Prevent stacking well fed buffs.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
nos4r2zod 2009-08-21 05:58:31 +04:00 committed by VladimirMangos
parent ab38b58b12
commit e07a0d9652
8 changed files with 53 additions and 8 deletions

View file

@ -135,6 +135,14 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
switch(spellInfo->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
{
// Well Fed buffs (must be exclusive with Food / Drink replenishment effects, or else Well Fed will cause them to be removed)
// SpellIcon 2560 is Spell 46687, does not have this flag
if ((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_FOOD_BUFF || spellInfo->SpellIconID == 2560) &&
!(spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED))
return SPELL_WELL_FED;
}
case SPELLFAMILY_MAGE:
{
// family flags 18(Molten), 25(Frost/Ice), 28(Mage)
@ -165,6 +173,15 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
break;
}
case SPELLFAMILY_PRIEST:
{
// "Well Fed" buff from Blessed Sunfruit, Blessed Sunfruit Juice, Alterac Spring Water
if ((spellInfo->Attributes & SPELL_ATTR_CASTABLE_WHILE_SITTING)==0 &&
(spellInfo->InterruptFlags & SPELL_INTERRUPT_FLAG_AUTOATTACK) &&
(spellInfo->SpellIconID == 52 || spellInfo->SpellIconID == 79))
return SPELL_WELL_FED;
break;
}
case SPELLFAMILY_HUNTER:
{
// only hunter stings have this
@ -242,6 +259,7 @@ bool IsSingleFromSpellSpecificPerCaster(SpellSpecific spellSpec1,SpellSpecific s
case SPELL_JUDGEMENT:
case SPELL_PRESENCE:
case SPELL_HAND:
case SPELL_WELL_FED:
return spellSpec1==spellSpec2;
case SPELL_BATTLE_ELIXIR:
return spellSpec2==SPELL_BATTLE_ELIXIR