diff options
| author | Shauren <shauren.trinity@gmail.com> | 2020-06-12 01:29:18 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2020-06-12 01:29:18 +0200 |
| commit | c7306439e7004288fb85890d6a5f730cf1761d71 (patch) | |
| tree | a1b6fd4af385923f321ff24ef4d66d09374397b9 /src/server/game/Entities/GameObject | |
| parent | 1cdd1d0249ad49c860e117e1e39d451e1a3fbe43 (diff) | |
Core/Spells: Implement using different difficulty data from all spell related db2s, not just SpellEffect and SpellPower
Diffstat (limited to 'src/server/game/Entities/GameObject')
| -rw-r--r-- | src/server/game/Entities/GameObject/GameObject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 8cb05644006..4059e6e72d6 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -1331,7 +1331,7 @@ void GameObject::TriggeringLinkedGameObject(uint32 trapEntry, Unit* target) if (!trapInfo || trapInfo->type != GAMEOBJECT_TYPE_TRAP) return; - SpellInfo const* trapSpell = sSpellMgr->GetSpellInfo(trapInfo->trap.spell); + SpellInfo const* trapSpell = sSpellMgr->GetSpellInfo(trapInfo->trap.spell, GetMap()->GetDifficultyID()); if (!trapSpell) // checked at load already return; @@ -2053,7 +2053,7 @@ void GameObject::Use(Unit* user) if (!spellId) return; - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId, GetMap()->GetDifficultyID()); if (!spellInfo) { if (user->GetTypeId() != TYPEID_PLAYER || !sOutdoorPvPMgr->HandleCustomSpell(user->ToPlayer(), spellId, this)) @@ -2079,12 +2079,12 @@ void GameObject::CastSpell(Unit* target, uint32 spellId, bool triggered /* = tru void GameObject::CastSpell(Unit* target, uint32 spellId, TriggerCastFlags triggered) { - SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId); + SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(spellId, GetMap()->GetDifficultyID()); if (!spellInfo) return; bool self = false; - for (SpellEffectInfo const* effect : spellInfo->GetEffectsForDifficulty(GetMap()->GetDifficultyID())) + for (SpellEffectInfo const* effect : spellInfo->GetEffects()) { if (effect && effect->TargetA.GetTarget() == TARGET_UNIT_CASTER) { |
