Core/Auras: Fixed auras incorrectly stacking with different item casters introduced in r19f21916a940
Closes issue #5218. --HG-- branch : trunk
This commit is contained in:
1 parent
5180ed0383
commit
5809c1fa3b
4 files changed
+54
-23
No files matched your search
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "SpellMgr.h"
|
||||
#include "ObjectMgr.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellAuraDefines.h"
|
||||
#include "ProgressBar.h"
|
||||
#include "DBCStores.h"
|
||||
@@ -3142,8 +3143,10 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32
|
||||
|
||||
//-----------TRINITY-------------
|
||||
|
||||
bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *spellInfo_2, bool sameCaster) const
|
||||
bool SpellMgr::CanAurasStack(Aura const *aura1, Aura const *aura2, bool sameCaster) const
|
||||
{
|
||||
SpellEntry const *spellInfo_1 = aura1->GetSpellProto();
|
||||
SpellEntry const *spellInfo_2 = aura2->GetSpellProto();
|
||||
SpellSpecific spellSpec_1 = GetSpellSpecific(spellInfo_1);
|
||||
SpellSpecific spellSpec_2 = GetSpellSpecific(spellInfo_2);
|
||||
if (spellSpec_1 && spellSpec_2)
|
||||
@@ -3205,6 +3208,9 @@ bool SpellMgr::CanAurasStack(SpellEntry const *spellInfo_1, SpellEntry const *sp
|
||||
// Hack for Incanter's Absorption
|
||||
if (spellId_1 == 44413)
|
||||
return true;
|
||||
if (aura1->GetCastItemGUID() && aura2->GetCastItemGUID())
|
||||
if (aura1->GetCastItemGUID() != aura2->GetCastItemGUID() && (sSpellMgr.GetSpellCustomAttr(spellId_1) & SPELL_ATTR0_CU_ENCHANT_PROC))
|
||||
return true;
|
||||
// same spell with same caster should not stack
|
||||
return false;
|
||||
}
|
||||
@@ -4042,6 +4048,25 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
}
|
||||
}
|
||||
|
||||
for (uint32 i = 0; i < sSpellItemEnchantmentStore.GetNumRows(); ++i)
|
||||
{
|
||||
SpellItemEnchantmentEntry const *enchant = sSpellItemEnchantmentStore.LookupEntry(i);
|
||||
if (!enchant)
|
||||
continue;
|
||||
|
||||
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
|
||||
{
|
||||
if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
|
||||
continue;
|
||||
|
||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(enchant->spellid[s]);
|
||||
if (!spellInfo)
|
||||
continue;
|
||||
|
||||
mSpellCustomAttr[enchant->spellid[s]] |= SPELL_ATTR0_CU_ENCHANT_PROC;
|
||||
}
|
||||
}
|
||||
|
||||
SummonPropertiesEntry *properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(121));
|
||||
properties->Type = SUMMON_TYPE_TOTEM;
|
||||
properties = const_cast<SummonPropertiesEntry*>(sSummonPropertiesStore.LookupEntry(647)); // 52893
|
||||
|
||||
Reference in new issue
Block a user