*Do not allow persistant auras from the same caster stack on target.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-05-09 22:31:53 -05:00
parent 67876f9dfe
commit 883c2ef77d
5 changed files with 18 additions and 17 deletions

View File

@@ -13610,16 +13610,12 @@ void Unit::AddAura(uint32 spellId, Unit* target)
target->AddAura(Aur);
}
Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 * basePoints)
Aura * Unit::AddAuraEffect(const SpellEntry * spellInfo, uint8 effIndex, Unit* caster, int32 * basePoints)
{
SpellEntry const *spellInfo = sSpellStore.LookupEntry(spellId);
if(!spellInfo || !caster)
return NULL;
// can't do that for passive auras - they stack from same caster so there is no way to get exact aura which should get effect
//assert (!IsPassiveSpell(spellInfo));
Aura * aur = GetAura(spellId, caster->GetGUID());
Aura *aur = GetAura(spellInfo->Id, caster->GetGUID());
if (aur)
{
@@ -13636,10 +13632,10 @@ Aura * Unit::AddAuraEffect(uint32 spellId, uint8 effIndex, Unit* caster, int32 *
aur = new Aura(spellInfo, 1<<effIndex, amount, this ,caster);
}
else
{
aur = new Aura(spellInfo, 1<<effIndex, NULL, this ,caster);
}
AddAura(aur);
if(!AddAura(aur))
return NULL;
}
return aur;
}