*Fix the bug that proc AOE buff does not work.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-23 20:19:40 -06:00
parent afc598bde2
commit c81299e653
2 changed files with 21 additions and 13 deletions

View File

@@ -1467,8 +1467,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
TagUnitMap.push_back(owner);
break;
case TARGET_UNIT_PET:
if(Pet* tmpUnit = m_caster->GetPet())
TagUnitMap.push_back(tmpUnit);
if(Pet* pet = m_caster->GetPet())
TagUnitMap.push_back(pet);
break;
case TARGET_UNIT_PARTY_CASTER:
m_caster->GetPartyMember(TagUnitMap, radius);
break;
}
}break;
@@ -1560,6 +1563,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
case TARGET_UNIT_AREA_ALLY:
SearchAreaTarget(TagUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_FRIENDLY);
break;
case TARGET_UNIT_AREA_PARTY_GROUND:
m_targets.m_targetMask |= TARGET_FLAG_DEST_LOCATION;
case TARGET_UNIT_AREA_PARTY:
m_caster->GetPartyMember(TagUnitMap, radius);
break;
case TARGET_UNIT_AREA_ENTRY_GROUND:
m_targets.m_targetMask |= TARGET_FLAG_DEST_LOCATION;
case TARGET_UNIT_AREA_ENTRY:
@@ -1752,12 +1760,6 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
break;
}
case TARGET_UNIT_AREA_PARTY_GROUND:
m_targets.m_targetMask |= TARGET_FLAG_DEST_LOCATION;
case TARGET_UNIT_PARTY_CASTER:
case TARGET_UNIT_AREA_PARTY:
m_caster->GetPartyMember(TagUnitMap, radius);
break;
case TARGET_RANDOM_RAID_MEMBER:
{
if (m_caster->GetTypeId() == TYPEID_PLAYER)

View File

@@ -80,6 +80,7 @@ SpellMgr::SpellMgr()
case TARGET_UNIT_CASTER_FISHING:
case TARGET_UNIT_MASTER:
case TARGET_UNIT_PET:
case TARGET_UNIT_PARTY_CASTER:
SpellTargetType[i] = TARGET_TYPE_UNIT_CASTER;
break;
case TARGET_UNIT_MINIPET:
@@ -102,6 +103,8 @@ SpellMgr::SpellMgr()
case TARGET_UNIT_AREA_ALLY:
case TARGET_UNIT_AREA_ENTRY_GROUND:
case TARGET_UNIT_AREA_ENTRY:
case TARGET_UNIT_AREA_PARTY_GROUND:
case TARGET_UNIT_AREA_PARTY:
case TARGET_UNIT_AREA_ENEMY_CHANNEL:
SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
break;
@@ -2001,11 +2004,14 @@ void SpellMgr::LoadSpellCustomAttr()
bool auraSpell = true;
for(uint32 j = 0; j < 3; ++j)
{
if(spellInfo->Effect[j] && spellInfo->Effect[j] != SPELL_EFFECT_APPLY_AURA)
{
auraSpell = false;
break;
}
if(spellInfo->Effect[j])
if(spellInfo->Effect[j] != SPELL_EFFECT_APPLY_AURA
|| SpellTargetType[spellInfo->EffectImplicitTargetA[j]] != TARGET_TYPE_UNIT_TARGET)
//ignore target party for now
{
auraSpell = false;
break;
}
}
if(auraSpell)
mSpellCustomAttr[i] |= SPELL_ATTR_CU_AURA_SPELL;