[10332] Save cast item guid for auras also.

This must fix another way duplicate aura adding to DB error.
It also prevent wrong stacking work for weapon equip bufs
in cases when its allowed for both wepoan indepndently apply.
This commit is contained in:
VladimirMangos 2010-08-09 04:36:33 +04:00
parent 59e672f1bc
commit 779e40d5ff
11 changed files with 68 additions and 29 deletions

View file

@ -8092,6 +8092,10 @@ Unit* SpellAuraHolder::GetCaster() const
bool SpellAuraHolder::IsWeaponBuffCoexistableWith(SpellAuraHolder* ref)
{
// only item casted spells
if (!GetCastItemGUID())
return false;
// Exclude Debuffs
if (!IsPositive())
return false;
@ -8118,7 +8122,7 @@ bool SpellAuraHolder::IsWeaponBuffCoexistableWith(SpellAuraHolder* ref)
return false;
// form different weapons
return ref->GetCastItemGUID() != GetCastItemGUID();
return ref->GetCastItemGUID() && ref->GetCastItemGUID() != GetCastItemGUID();
}
bool SpellAuraHolder::IsNeedVisibleSlot(Unit const* caster) const