diff options
author | QAston <none@none> | 2009-05-24 22:54:13 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-05-24 22:54:13 +0200 |
commit | 1c505261bc13585924e553eeea7b7a14232eb08f (patch) | |
tree | 5cadb31ffd26cab61782ae8beccbf3ac9c9ebacc /src/game/SpellMgr.cpp | |
parent | db834e7c7d10b7738830c2c732414da9933e0ae6 (diff) |
*Remove auras with duration lower than 30 sec on arena start.
*Do not remove rougue poisons and dk runes on arena start.
*Apply healing bonus for healing stream totem.
*Do not duplicate damage bonus in code with the one in db for Seal of Vengenance/Corruption
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r-- | src/game/SpellMgr.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index bad3c94a034..0d39c6cf336 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -3432,6 +3432,40 @@ void SpellMgr::LoadSpellCustomAttr() CreatureAI::FillAISpellInfo(); } +// Fill custom data about enchancments +void SpellMgr::LoadEnchantCustomAttr() +{ + uint32 size = sSpellItemEnchantmentStore.GetNumRows(); + mEnchantCustomAttr.resize(size); + + for (uint32 i = 0;i<size; ++i) + mEnchantCustomAttr[i] = 0; + + for(uint32 i = 0; i < GetSpellStore()->GetNumRows(); ++i) + { + SpellEntry * spellInfo = (SpellEntry*)GetSpellStore()->LookupEntry(i); + if(!spellInfo) + continue; + + // TODO: find a better check + if (!(spellInfo->AttributesEx2 & SPELL_ATTR_EX2_UNK13) || !(spellInfo->Attributes & SPELL_ATTR_NOT_SHAPESHIFT)) + continue; + + for(uint32 j = 0; j < 3; ++j) + { + if(spellInfo->Effect[j] == SPELL_EFFECT_ENCHANT_ITEM_TEMPORARY) + { + uint32 enchId = spellInfo->EffectMiscValue[j]; + SpellItemEnchantmentEntry const *ench = sSpellItemEnchantmentStore.LookupEntry(enchId); + if (!enchId) + continue; + mEnchantCustomAttr[enchId] = true; + break; + } + } + } +} + bool SpellMgr::IsSkillTypeSpell(uint32 spellId, SkillType type) const { SkillLineAbilityMap::const_iterator lower = GetBeginSkillLineAbilityMap(spellId); @@ -3516,4 +3550,3 @@ void SpellMgr::LoadSpellLinked() sLog.outString(); sLog.outString( ">> Loaded %u linked spells", count ); } - |