From c5fc08934da7e61238fb049f182478b35cc1214f Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Sun, 7 Mar 2010 21:35:30 +0100 Subject: [PATCH] [9546] Less strict check in spell CheckTarget, and allow triggered spell. Unit may be not selectable, but spell may be expected to target this unit in any case. Mostly known problem with npc->npc spells and dummy/triggered spells from AI side. Signed-off-by: NoFantasy --- src/game/Spell.cpp | 3 ++- src/shared/revision_nr.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 0cda9dc86..a4a47b5e9 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -6045,7 +6045,8 @@ bool Spell::CheckTarget( Unit* target, SpellEffectIndex eff ) // unselectable targets skipped in all cases except TARGET_SCRIPT targeting // in case TARGET_SCRIPT target selected by server always and can't be cheated - if( target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE) && + if ((!m_IsTriggeredSpell || target != m_targets.getUnitTarget()) && + target->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE) && m_spellInfo->EffectImplicitTargetA[eff] != TARGET_SCRIPT && m_spellInfo->EffectImplicitTargetB[eff] != TARGET_SCRIPT ) return false; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 7e1edbdb4..f92d94fa6 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "9545" + #define REVISION_NR "9546" #endif // __REVISION_NR_H__