[9949] Add target for TARGET_DUELVSPLAYER_COORDINATES only if not provided by another way.

This fix for exmple unexpected empry heal if targeted by spell 48438 and ranks.
This commit is contained in:
VladimirMangos 2010-05-22 10:16:28 +04:00
parent 7151b4e538
commit d740b2f167
2 changed files with 16 additions and 4 deletions

View file

@ -593,6 +593,21 @@ void Spell::FillTargetMap()
break; break;
} }
break; break;
case TARGET_DUELVSPLAYER_COORDINATES:
switch(m_spellInfo->EffectImplicitTargetB[i])
{
case 0:
case TARGET_EFFECT_SELECT:
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitMap);
if (Unit* currentTarget = m_targets.getUnitTarget())
tmpUnitMap.push_back(currentTarget);
break;
default:
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetA[i], tmpUnitMap);
SetTargetMap(SpellEffectIndex(i), m_spellInfo->EffectImplicitTargetB[i], tmpUnitMap);
break;
}
break;
default: default:
switch(m_spellInfo->EffectImplicitTargetB[i]) switch(m_spellInfo->EffectImplicitTargetB[i])
{ {
@ -1799,10 +1814,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
case TARGET_DUELVSPLAYER_COORDINATES: case TARGET_DUELVSPLAYER_COORDINATES:
{ {
if(Unit* currentTarget = m_targets.getUnitTarget()) if(Unit* currentTarget = m_targets.getUnitTarget())
{
m_targets.setDestination(currentTarget->GetPositionX(), currentTarget->GetPositionY(), currentTarget->GetPositionZ()); m_targets.setDestination(currentTarget->GetPositionX(), currentTarget->GetPositionY(), currentTarget->GetPositionZ());
targetUnitMap.push_back(currentTarget);
}
break; break;
} }
case TARGET_ALL_PARTY_AROUND_CASTER: case TARGET_ALL_PARTY_AROUND_CASTER:

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 "9948" #define REVISION_NR "9949"
#endif // __REVISION_NR_H__ #endif // __REVISION_NR_H__