aboutsummaryrefslogtreecommitdiff
path: root/src/game/Spell.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-07-30 11:37:08 +0800
committermegamage <none@none>2009-07-30 11:37:08 +0800
commitaf2d5e3fd4a57147280d265d1bc5ac1c2b70a3a3 (patch)
treeeddb20436980a4ce6be2d5d623fa25d2a653d653 /src/game/Spell.cpp
parent7121d98480d58a4214abcc2e22f678bad76cdecf (diff)
[8250] Cleanup code and data for `spell_threat` Author: nos4r2zod
* Load table data to std::map instead SQLStorage and add check loaded spell existance. * Drop from table not existed spells. --HG-- branch : trunk
Diffstat (limited to 'src/game/Spell.cpp')
-rw-r--r--src/game/Spell.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index f4e992b6a7b..5c1b2fc3687 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -4200,13 +4200,14 @@ void Spell::HandleThreatSpells(uint32 spellId)
if(!m_targets.getUnitTarget()->CanHaveThreatList())
return;
- SpellThreatEntry const *threatSpell = sSpellThreatStore.LookupEntry<SpellThreatEntry>(spellId);
- if(!threatSpell)
+ uint16 threat = spellmgr.GetSpellThreat(spellId);
+
+ if(!threat)
return;
- m_targets.getUnitTarget()->AddThreat(m_caster, float(threatSpell->threat));
+ m_targets.getUnitTarget()->AddThreat(m_caster, float(threat));
- DEBUG_LOG("Spell %u, rank %u, added an additional %i threat", spellId, spellmgr.GetSpellRank(spellId), threatSpell->threat);
+ DEBUG_LOG("Spell %u, rank %u, added an additional %i threat", spellId, spellmgr.GetSpellRank(spellId), threat);
}
void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTarget,uint32 i)