[6996] Fixed 56 target mode work for 3.0.3. This fix for example warrior spell 6673 and ranks.

This commit is contained in:
VladimirMangos 2009-01-01 16:27:29 +03:00
parent 896b10e39a
commit f6bd9ef67a
4 changed files with 10 additions and 12 deletions

View file

@ -829,7 +829,7 @@ enum Targets
TARGET_SUMMON = 48,
TARGET_AREAEFFECT_CUSTOM_2 = 52,
TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented
TARGET_RANDOM_RAID_MEMBER = 56,
TARGET_ALL_RAID_AROUND_CASTER = 56,
TARGET_SINGLE_FRIEND_2 = 57,
TARGET_AREAEFFECT_PARTY_AND_CLASS = 61,
TARGET_DUELVSPLAYER_COORDINATES = 63,

View file

@ -411,7 +411,7 @@ void Spell::FillTargetMap()
case TARGET_ALL_AROUND_CASTER:
if( m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_PARTY ||
m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER ||
m_spellInfo->EffectImplicitTargetB[i]==TARGET_RANDOM_RAID_MEMBER )
m_spellInfo->EffectImplicitTargetB[i]==TARGET_ALL_RAID_AROUND_CASTER )
{
SetTargetMap(i,m_spellInfo->EffectImplicitTargetB[i],tmpUnitMap);
}
@ -1505,6 +1505,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
case TARGET_ALL_PARTY_AROUND_CASTER:
case TARGET_ALL_PARTY_AROUND_CASTER_2:
case TARGET_ALL_PARTY:
case TARGET_ALL_RAID_AROUND_CASTER:
{
Player *pTarget = m_caster->GetCharmerOrOwnerPlayerOrPlayerItself();
Group *pGroup = pTarget ? pTarget->GetGroup() : NULL;
@ -1518,7 +1519,9 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
Player* Target = itr->getSource();
// IsHostileTo check duel and controlled by enemy
if( Target && Target->GetSubGroup()==subgroup && !m_caster->IsHostileTo(Target) )
if( Target &&
(cur==TARGET_ALL_RAID_AROUND_CASTER || Target->GetSubGroup()==subgroup) &&
!m_caster->IsHostileTo(Target) )
{
if( m_caster->IsWithinDistInMap(Target, radius) )
TagUnitMap.push_back(Target);
@ -1539,12 +1542,6 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
TagUnitMap.push_back(pet);
}
}break;
case TARGET_RANDOM_RAID_MEMBER:
{
if (m_caster->GetTypeId() == TYPEID_PLAYER)
if(Player* target = ((Player*)m_caster)->GetNextRandomRaidMember(radius))
TagUnitMap.push_back(target);
}break;
case TARGET_SINGLE_FRIEND:
case TARGET_SINGLE_FRIEND_2:
{

View file

@ -362,15 +362,16 @@ inline bool IsAreaEffectTarget( Targets target )
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
case TARGET_ALL_PARTY_AROUND_CASTER:
case TARGET_ALL_AROUND_CASTER:
case TARGET_IN_FRONT_OF_CASTER:
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER:
case TARGET_ALL_FRIENDLY_UNITS_IN_AREA:
case TARGET_ALL_PARTY:
case TARGET_ALL_PARTY_AROUND_CASTER_2:
case TARGET_AREAEFFECT_PARTY:
case TARGET_AREAEFFECT_CUSTOM_2:
case TARGET_ALL_RAID_AROUND_CASTER:
case TARGET_AREAEFFECT_PARTY_AND_CLASS:
case TARGET_IN_FRONT_OF_CASTER:
case TARGET_ALL_FRIENDLY_UNITS_IN_AREA:
return true;
default:
break;

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6995"
#define REVISION_NR "6996"
#endif // __REVISION_NR_H__