diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-07-09 18:44:21 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-07-09 18:44:21 +0200 |
commit | 14db2215d37c8081aff32a22b0e40b1cb8d6ec96 (patch) | |
tree | d190cf23e39a6a0fb42c401206bc974f0c6a4a77 /src | |
parent | 232628f0a63480d07d28dcf12a7f6445ca07ab43 (diff) |
Core/Spells: Don't select corpses for spell targets that expect to hit units
Closes #24980
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/Spell.cpp | 8 | ||||
-rw-r--r-- | src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp | 6 |
2 files changed, 2 insertions, 12 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp index 668b951eb2d..c63299f2c81 100644 --- a/src/server/game/Spells/Spell.cpp +++ b/src/server/game/Spells/Spell.cpp @@ -1796,12 +1796,8 @@ uint32 Spell::GetSearcherTypeMask(SpellTargetObjectTypes objType, ConditionConta { case TARGET_OBJECT_TYPE_UNIT: case TARGET_OBJECT_TYPE_UNIT_AND_DEST: - if (!m_spellInfo->HasAttribute(SPELL_ATTR2_CAN_TARGET_DEAD)) - { - retMask &= GRID_MAP_TYPE_MASK_PLAYER | GRID_MAP_TYPE_MASK_CREATURE; - break; - } - /* fallthrough */ + retMask &= GRID_MAP_TYPE_MASK_PLAYER | GRID_MAP_TYPE_MASK_CREATURE; + break; case TARGET_OBJECT_TYPE_CORPSE: case TARGET_OBJECT_TYPE_CORPSE_ENEMY: case TARGET_OBJECT_TYPE_CORPSE_ALLY: diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp index 290710745fb..4d27facd77b 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_the_lich_king.cpp @@ -3205,11 +3205,6 @@ class spell_the_lich_king_jump_remove_aura : public SpellScriptLoader { PrepareSpellScript(spell_the_lich_king_jump_SpellScript); - void FilterTargets(std::list<WorldObject*>& targets) - { - targets.remove_if([](WorldObject const* target) { return target->IsCorpse(); }); - } - void HandleScript(SpellEffIndex effIndex) { PreventHitDefaultEffect(effIndex); @@ -3218,7 +3213,6 @@ class spell_the_lich_king_jump_remove_aura : public SpellScriptLoader void Register() override { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_the_lich_king_jump_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); OnEffectHitTarget += SpellEffectFn(spell_the_lich_king_jump_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); } }; |