mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[8250] Cleanup code and data for spell_threat
* Load table data to std::map instead SQLStorage and add check loaded spell existance. * Drop from table not existed spells. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
13b709a10b
commit
fd2eb3cfee
9 changed files with 64 additions and 33 deletions
|
|
@ -3566,13 +3566,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, float DamageMultiplier)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue