*Explicitly implement spell target 28 and 29.
--HG-- branch : trunk
This commit is contained in:
@@ -180,7 +180,7 @@ inline void Trinity::DynamicObjectUpdater::VisitHelper(Unit* target)
|
|||||||
|
|
||||||
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
SpellEntry const *spellInfo = sSpellStore.LookupEntry(i_dynobject.GetSpellId());
|
||||||
uint32 eff_index = i_dynobject.GetEffIndex();
|
uint32 eff_index = i_dynobject.GetEffIndex();
|
||||||
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_CHANNEL
|
if(spellInfo->EffectImplicitTargetB[eff_index] == TARGET_DEST_DYNOBJ_ALLY
|
||||||
|| spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_GROUND)
|
|| spellInfo->EffectImplicitTargetB[eff_index] == TARGET_UNIT_AREA_ALLY_GROUND)
|
||||||
{
|
{
|
||||||
if(!i_check->IsFriendlyTo(target))
|
if(!i_check->IsFriendlyTo(target))
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
|
|||||||
|
|
||||||
for(uint32 i = 0; i < 3;i++)
|
for(uint32 i = 0; i < 3;i++)
|
||||||
{
|
{
|
||||||
if(spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_CHANNELED)
|
if(spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA || spellInfo->EffectImplicitTargetA[i] == TARGET_ALL_ENEMY_IN_AREA_INSTANT || spellInfo->EffectImplicitTargetA[i] == TARGET_DEST_DYNOBJ_ENEMY)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -827,9 +827,8 @@ enum Targets
|
|||||||
TARGET_GAMEOBJECT_ITEM = 26,
|
TARGET_GAMEOBJECT_ITEM = 26,
|
||||||
//TARGET_OBJECT_ITEM_PICKLOCK
|
//TARGET_OBJECT_ITEM_PICKLOCK
|
||||||
TARGET_UNIT_MASTER = 27,
|
TARGET_UNIT_MASTER = 27,
|
||||||
TARGET_ALL_ENEMY_IN_AREA_CHANNELED = 28,
|
TARGET_DEST_DYNOBJ_ENEMY = 28,
|
||||||
TARGET_UNIT_AREA_ENEMY_CHANNEL = 28,
|
TARGET_DEST_DYNOBJ_ALLY = 29, // only for effect 27
|
||||||
TARGET_UNIT_AREA_ALLY_CHANNEL = 29, // 28,29 only used for effect 27, if interrupt channel, pstAA cancel
|
|
||||||
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER = 30, // in TargetB used only with TARGET_ALL_AROUND_CASTER and in self casting range in TargetA
|
TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER = 30, // in TargetB used only with TARGET_ALL_AROUND_CASTER and in self casting range in TargetA
|
||||||
TARGET_UNIT_AREA_ALLY = 30,
|
TARGET_UNIT_AREA_ALLY = 30,
|
||||||
TARGET_ALL_FRIENDLY_UNITS_IN_AREA = 31,
|
TARGET_ALL_FRIENDLY_UNITS_IN_AREA = 31,
|
||||||
|
|||||||
+10
-9
@@ -1977,17 +1977,13 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(cur == TARGET_DEST_DEST)
|
float angle;
|
||||||
break;
|
|
||||||
|
|
||||||
float x, y, z, angle, dist;
|
|
||||||
|
|
||||||
dist = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
|
||||||
if (cur == TARGET_DEST_DEST_RANDOM)
|
|
||||||
dist *= rand_norm();
|
|
||||||
|
|
||||||
switch(cur)
|
switch(cur)
|
||||||
{
|
{
|
||||||
|
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||||
|
case TARGET_DEST_DYNOBJ_ALLY:
|
||||||
|
case TARGET_DEST_DEST:
|
||||||
|
return;
|
||||||
case TARGET_DEST_DEST_FRONT: angle = 0.0f; break;
|
case TARGET_DEST_DEST_FRONT: angle = 0.0f; break;
|
||||||
case TARGET_DEST_DEST_BACK: angle = M_PI; break;
|
case TARGET_DEST_DEST_BACK: angle = M_PI; break;
|
||||||
case TARGET_DEST_DEST_RIGHT: angle = M_PI/2; break;
|
case TARGET_DEST_DEST_RIGHT: angle = M_PI/2; break;
|
||||||
@@ -1999,6 +1995,11 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||||||
default: angle = rand_norm()*2*M_PI; break;
|
default: angle = rand_norm()*2*M_PI; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float dist, x, y, z;
|
||||||
|
dist = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
|
||||||
|
if (cur == TARGET_DEST_DEST_RANDOM)
|
||||||
|
dist *= rand_norm();
|
||||||
|
|
||||||
x = m_targets.m_destX;
|
x = m_targets.m_destX;
|
||||||
y = m_targets.m_destY;
|
y = m_targets.m_destY;
|
||||||
z = m_targets.m_destZ;
|
z = m_targets.m_destZ;
|
||||||
|
|||||||
@@ -124,8 +124,6 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_UNIT_AREA_ENTRY:
|
case TARGET_UNIT_AREA_ENTRY:
|
||||||
case TARGET_UNIT_AREA_PARTY_GROUND:
|
case TARGET_UNIT_AREA_PARTY_GROUND:
|
||||||
case TARGET_UNIT_AREA_PARTY:
|
case TARGET_UNIT_AREA_PARTY:
|
||||||
//case TARGET_UNIT_AREA_ENEMY_CHANNEL:
|
|
||||||
//case TARGET_UNIT_AREA_ALLY_CHANNEL:
|
|
||||||
SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
|
SpellTargetType[i] = TARGET_TYPE_AREA_DEST;
|
||||||
break;
|
break;
|
||||||
case TARGET_DEST_TARGET_ENEMY:
|
case TARGET_DEST_TARGET_ENEMY:
|
||||||
@@ -158,6 +156,8 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_DEST_CASTER_RADIUS:
|
case TARGET_DEST_CASTER_RADIUS:
|
||||||
SpellTargetType[i] = TARGET_TYPE_DEST_CASTER;
|
SpellTargetType[i] = TARGET_TYPE_DEST_CASTER;
|
||||||
break;
|
break;
|
||||||
|
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||||
|
case TARGET_DEST_DYNOBJ_ALLY:
|
||||||
case TARGET_DEST_DEST:
|
case TARGET_DEST_DEST:
|
||||||
case TARGET_DEST_DEST_FRONT_LEFT:
|
case TARGET_DEST_DEST_FRONT_LEFT:
|
||||||
case TARGET_DEST_DEST_BACK_LEFT:
|
case TARGET_DEST_DEST_BACK_LEFT:
|
||||||
@@ -187,9 +187,6 @@ SpellMgr::SpellMgr()
|
|||||||
case TARGET_UNIT_AREA_ENTRY:
|
case TARGET_UNIT_AREA_ENTRY:
|
||||||
case TARGET_UNIT_AREA_PARTY_GROUND:
|
case TARGET_UNIT_AREA_PARTY_GROUND:
|
||||||
case TARGET_UNIT_AREA_PARTY:
|
case TARGET_UNIT_AREA_PARTY:
|
||||||
//Check persistant aura seperately
|
|
||||||
//case TARGET_UNIT_AREA_ENEMY_CHANNEL:
|
|
||||||
//case TARGET_UNIT_AREA_ALLY_CHANNEL:
|
|
||||||
case TARGET_UNIT_PARTY_TARGET:
|
case TARGET_UNIT_PARTY_TARGET:
|
||||||
case TARGET_UNIT_PARTY_CASTER:
|
case TARGET_UNIT_PARTY_CASTER:
|
||||||
case TARGET_UNIT_CONE_ENEMY:
|
case TARGET_UNIT_CONE_ENEMY:
|
||||||
@@ -493,7 +490,7 @@ bool IsPositiveTarget(uint32 targetA, uint32 targetB)
|
|||||||
case TARGET_ALL_ENEMY_IN_AREA:
|
case TARGET_ALL_ENEMY_IN_AREA:
|
||||||
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
|
case TARGET_ALL_ENEMY_IN_AREA_INSTANT:
|
||||||
case TARGET_IN_FRONT_OF_CASTER:
|
case TARGET_IN_FRONT_OF_CASTER:
|
||||||
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
|
case TARGET_DEST_DYNOBJ_ENEMY:
|
||||||
case TARGET_CURRENT_ENEMY_COORDINATES:
|
case TARGET_CURRENT_ENEMY_COORDINATES:
|
||||||
case TARGET_UNIT_CHANNEL:
|
case TARGET_UNIT_CHANNEL:
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user