[9098] More correct targets selection for target pairs with TARGET_SELF2

* Many spell effects that have A target mode SELF2 expected applied to enemy
  target selected by targetmode B so we need skip SELF2 target mode.
* remove SEFL2 from explicit positive target modes.
This commit is contained in:
VladimirMangos 2010-01-01 21:09:10 +03:00
parent f9ec746123
commit c09ee423ba
3 changed files with 39 additions and 25 deletions

View file

@ -437,7 +437,6 @@ bool IsExplicitPositiveTarget(uint32 targetA)
case TARGET_CHAIN_HEAL:
case TARGET_SINGLE_FRIEND_2:
case TARGET_AREAEFFECT_PARTY_AND_CLASS:
case TARGET_SELF2:
return true;
default:
break;
@ -585,12 +584,14 @@ bool IsPositiveEffect(uint32 spellId, uint32 effIndex)
return false;
case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
// part of negative spell if casted at self (prevent cancel)
if(spellproto->EffectImplicitTargetA[effIndex] == TARGET_SELF)
if (spellproto->EffectImplicitTargetA[effIndex] == TARGET_SELF ||
spellproto->EffectImplicitTargetA[effIndex] == TARGET_SELF2)
return false;
break;
case SPELL_AURA_MOD_DECREASE_SPEED: // used in positive spells also
// part of positive spell if casted at self
if(spellproto->EffectImplicitTargetA[effIndex] != TARGET_SELF)
if (spellproto->EffectImplicitTargetA[effIndex] == TARGET_SELF ||
spellproto->EffectImplicitTargetA[effIndex] == TARGET_SELF2)
return false;
// but not this if this first effect (don't found batter check)
if(spellproto->Attributes & 0x4000000 && effIndex==0)