diff options
author | megamage <none@none> | 2009-07-23 09:30:05 +0800 |
---|---|---|
committer | megamage <none@none> | 2009-07-23 09:30:05 +0800 |
commit | f481e7b14db88700631c01c58b23a1a2f7f4efb6 (patch) | |
tree | a0f9d08fec1f7e2a69782d4902b378da7ffb3634 /src/game/SpellMgr.cpp | |
parent | e79656b75a3a4272f25457b11856f8ca9df29ba4 (diff) |
[8191] Drop code related to use long time empty `spell_affect` table. Author: XTZGZoReX
After switch to 3.x.x all data get explcitly from ClassMask fields in spell.dbc
and no need in custom values.
--HG--
branch : trunk
Diffstat (limited to 'src/game/SpellMgr.cpp')
-rw-r--r-- | src/game/SpellMgr.cpp | 72 |
1 files changed, 1 insertions, 71 deletions
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index eafda06077c..43268713b2e 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -1065,77 +1065,6 @@ void SpellMgr::LoadSpellTargetPositions() sLog.outString( ">> Loaded %u spell teleport coordinates", count ); } -void SpellMgr::LoadSpellAffects() -{ - mSpellAffectMap.clear(); // need for reload case - - uint32 count = 0; - - // 0 1 2 3 4 - QueryResult *result = WorldDatabase.Query("SELECT entry, effectId, SpellClassMask0, SpellClassMask1, SpellClassMask2 FROM spell_affect"); - if( !result ) - { - - barGoLink bar( 1 ); - - bar.step(); - - sLog.outString(); - sLog.outString( ">> Loaded %u spell affect definitions", count ); - return; - } - - barGoLink bar( result->GetRowCount() ); - - do - { - Field *fields = result->Fetch(); - - bar.step(); - - uint32 entry = fields[0].GetUInt32(); - uint8 effectId = fields[1].GetUInt8(); - - SpellEntry const* spellInfo = sSpellStore.LookupEntry(entry); - - if (!spellInfo) - { - sLog.outErrorDb("Spell %u listed in `spell_affect` does not exist", entry); - continue; - } - - if (effectId >= 3) - { - sLog.outErrorDb("Spell %u listed in `spell_affect` have invalid effect index (%u)", entry,effectId); - continue; - } - - flag96 affect(fields[2].GetUInt32(), fields[3].GetUInt32(), fields[4].GetUInt32()); - - // Spell.dbc have own data - if (effectId>3) - continue; - - flag96 dbc_affect; - dbc_affect = spellInfo->EffectSpellClassMask[effectId]; - if(dbc_affect[0] == affect[0] && dbc_affect[1] == affect[1] && dbc_affect[2] == affect[2]) - { - char text[]="ABC"; - sLog.outErrorDb("Spell %u listed in `spell_affect` have redundant (same with EffectSpellClassMask%c) data for effect index (%u) and not needed, skipped.", entry, text[effectId], effectId); - continue; - } - - mSpellAffectMap[(entry<<8) + effectId] = affect; - - ++count; - } while( result->NextRow() ); - - delete result; - - sLog.outString(); - sLog.outString( ">> Loaded %u custom spell affect definitions", count ); -} - bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod) const { // false for spellInfo == NULL @@ -3815,6 +3744,7 @@ void SpellMgr::LoadSpellCustomAttr() break; case 44544: // Fingers of Frost spellInfo->procCharges=2; + spellInfo->EffectSpellClassMask[0] = flag96(685904631,1151048,0); break; case 28200: // Ascendance (Talisman of Ascendance trinket) spellInfo->procCharges=6; |