[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 <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-03-07 21:35:30 +01:00
parent 6487c24f29
commit c5fc08934d
2 changed files with 3 additions and 2 deletions

View file

@ -6045,7 +6045,8 @@ bool Spell::CheckTarget( Unit* target, SpellEffectIndex eff )
// unselectable targets skipped in all cases except TARGET_SCRIPT targeting // unselectable targets skipped in all cases except TARGET_SCRIPT targeting
// in case TARGET_SCRIPT target selected by server always and can't be cheated // 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->EffectImplicitTargetA[eff] != TARGET_SCRIPT &&
m_spellInfo->EffectImplicitTargetB[eff] != TARGET_SCRIPT ) m_spellInfo->EffectImplicitTargetB[eff] != TARGET_SCRIPT )
return false; return false;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__ #ifndef __REVISION_NR_H__
#define __REVISION_NR_H__ #define __REVISION_NR_H__
#define REVISION_NR "9545" #define REVISION_NR "9546"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__