diff options
-rw-r--r-- | src/game/DBCStores.cpp | 6 | ||||
-rw-r--r-- | src/game/SpellAuras.cpp | 3 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 4 |
3 files changed, 9 insertions, 4 deletions
diff --git a/src/game/DBCStores.cpp b/src/game/DBCStores.cpp index 0e3b82c02c3..e1fe1eba5e7 100644 --- a/src/game/DBCStores.cpp +++ b/src/game/DBCStores.cpp @@ -326,7 +326,7 @@ void LoadDBCStores(const std::string& dataPath) if(spellInfo && (spellInfo->Attributes & 0x1D0) == 0x1D0) { - for (unsigned int i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i) + for (uint32 i = 1; i < sCreatureFamilyStore.GetNumRows(); ++i) { CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(i); if(!cFamily) @@ -335,6 +335,10 @@ void LoadDBCStores(const std::string& dataPath) if(skillLine->skillId != cFamily->skillLine[0] && skillLine->skillId != cFamily->skillLine[1]) continue; + // Passive spell has to have spellfamilyflags if name present (need to not apply 20782) + if (spellInfo->Attributes & SPELL_ATTR_UNK18 && spellInfo->SpellFamilyName && !spellInfo->SpellFamilyFlags) + continue; + sPetFamilySpellsStore[i].insert(spellInfo->Id); } } diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index aace63d9d72..a5b2a429e27 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -2599,7 +2599,8 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real) return; // Not needed in 3.1 - m_amount /=GetParentAura()->GetStackAmount(); + if (GetParentAura() && GetParentAura()->GetStackAmount()!=0) + m_amount /= GetParentAura()->GetStackAmount(); // final heal if(m_target->IsInWorld()) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index d130d58f9fd..f21d8575b03 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -2533,8 +2533,8 @@ void SpellMgr::LoadPetLevelupSpellMap() if (creatureFamily->skillLine[j]!=skillLine->skillId) continue; SpellEntry const *spell = sSpellStore.LookupEntry(skillLine->spellId); - // not exist - if(!spell) + // not exist or passive (passives are handled elsewhere) + if(!spell || IsPassiveSpell(spell)) continue; // Make sure that triggered spells aren't learned if (!spell->SpellFamilyName && !spell->StartRecoveryCategory) |