[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
This commit is contained in:
1 parent
7121d98480
commit
af2d5e3fd4
7 files changed
+61
-32
No files matched your search
+5
-4
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user