mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[11424] Cleanups and fixes in FillAreaTargets
* Drop redundent and possible conflicting center point coordinates in FillAreaTargets/SpellNotifierCreatureAndPlayer call. * Calculate proper coordinates base at PUSH_* and spell data in SpellNotifierCreatureAndPlayer and provide its to Cell::VisitAllObjects also for use sync values in both. * Use castingObject coordinates as caster in SpellNotifierCreatureAndPlayer that fix some GO casting cases. Thanks to SeTM for original problem research.
This commit is contained in:
parent
b997f4925d
commit
30aae7b14e
3 changed files with 65 additions and 30 deletions
|
|
@ -1648,7 +1648,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
if (radius > 0.0f)
|
if (radius > 0.0f)
|
||||||
{
|
{
|
||||||
// caster included here?
|
// caster included here?
|
||||||
FillAreaTargets(targetUnitMap, dest_x, dest_y, radius, PUSH_DEST_CENTER, SPELL_TARGETS_ALL);
|
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_ALL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
targetUnitMap.push_back(m_caster);
|
targetUnitMap.push_back(m_caster);
|
||||||
|
|
@ -1855,7 +1855,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TARGET_ALL_ENEMY_IN_AREA:
|
case TARGET_ALL_ENEMY_IN_AREA:
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
case TARGET_AREAEFFECT_INSTANT:
|
case TARGET_AREAEFFECT_INSTANT:
|
||||||
{
|
{
|
||||||
|
|
@ -1870,7 +1870,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
|
|
||||||
// fill real target list if no spell script target defined
|
// fill real target list if no spell script target defined
|
||||||
FillAreaTargets(bounds.first != bounds.second ? tempTargetUnitMap : targetUnitMap,
|
FillAreaTargets(bounds.first != bounds.second ? tempTargetUnitMap : targetUnitMap,
|
||||||
m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_DEST_CENTER, bounds.first != bounds.second ? SPELL_TARGETS_ALL : targetB);
|
radius, PUSH_DEST_CENTER, bounds.first != bounds.second ? SPELL_TARGETS_ALL : targetB);
|
||||||
|
|
||||||
if (!tempTargetUnitMap.empty())
|
if (!tempTargetUnitMap.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -1919,7 +1919,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
UnitList tempTargetUnitMap;
|
UnitList tempTargetUnitMap;
|
||||||
SpellScriptTargetBounds bounds = sSpellMgr.GetSpellScriptTargetBounds(m_spellInfo->Id);
|
SpellScriptTargetBounds bounds = sSpellMgr.GetSpellScriptTargetBounds(m_spellInfo->Id);
|
||||||
// fill real target list if no spell script target defined
|
// fill real target list if no spell script target defined
|
||||||
FillAreaTargets(bounds.first != bounds.second ? tempTargetUnitMap : targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_DEST_CENTER, SPELL_TARGETS_ALL);
|
FillAreaTargets(bounds.first != bounds.second ? tempTargetUnitMap : targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_ALL);
|
||||||
|
|
||||||
if (!tempTargetUnitMap.empty())
|
if (!tempTargetUnitMap.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -2005,7 +2005,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
targetUnitMap.push_back(m_caster);
|
targetUnitMap.push_back(m_caster);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -2071,13 +2071,13 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER:
|
case TARGET_ALL_HOSTILE_UNITS_AROUND_CASTER:
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_SELF_CENTER, SPELL_TARGETS_HOSTILE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_SELF_CENTER, SPELL_TARGETS_HOSTILE);
|
||||||
break;
|
break;
|
||||||
case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER:
|
case TARGET_ALL_FRIENDLY_UNITS_AROUND_CASTER:
|
||||||
switch (m_spellInfo->Id)
|
switch (m_spellInfo->Id)
|
||||||
{
|
{
|
||||||
case 56153: // Guardian Aura - Ahn'Kahet
|
case 56153: // Guardian Aura - Ahn'Kahet
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY);
|
FillAreaTargets(targetUnitMap, radius, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY);
|
||||||
targetUnitMap.remove(m_caster);
|
targetUnitMap.remove(m_caster);
|
||||||
break;
|
break;
|
||||||
case 64844: // Divine Hymn
|
case 64844: // Divine Hymn
|
||||||
|
|
@ -2090,7 +2090,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
// selected friendly units (for casting objects) around casting object
|
// selected friendly units (for casting objects) around casting object
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY, GetCastingObject());
|
FillAreaTargets(targetUnitMap, radius, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY, GetCastingObject());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -2128,7 +2128,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
FillRaidOrPartyHealthPriorityTargets(targetUnitMap, m_caster, target, radius, count, true, false, true);
|
FillRaidOrPartyHealthPriorityTargets(targetUnitMap, m_caster, target, radius, count, true, false, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_DEST_CENTER, SPELL_TARGETS_FRIENDLY);
|
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_FRIENDLY);
|
||||||
break;
|
break;
|
||||||
// TARGET_SINGLE_PARTY means that the spells can only be casted on a party member and not on the caster (some seals, fire shield from imp, etc..)
|
// TARGET_SINGLE_PARTY means that the spells can only be casted on a party member and not on the caster (some seals, fire shield from imp, etc..)
|
||||||
case TARGET_SINGLE_PARTY:
|
case TARGET_SINGLE_PARTY:
|
||||||
|
|
@ -2193,17 +2193,17 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
case TARGET_IN_FRONT_OF_CASTER:
|
case TARGET_IN_FRONT_OF_CASTER:
|
||||||
{
|
{
|
||||||
bool inFront = m_spellInfo->SpellVisual[0] != 3879;
|
bool inFront = m_spellInfo->SpellVisual[0] != 3879;
|
||||||
FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, inFront ? PUSH_IN_FRONT : PUSH_IN_BACK, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, inFront ? PUSH_IN_FRONT : PUSH_IN_BACK, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TARGET_LARGE_FRONTAL_CONE:
|
case TARGET_LARGE_FRONTAL_CONE:
|
||||||
FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_90, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_IN_FRONT_90, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
case TARGET_NARROW_FRONTAL_CONE:
|
case TARGET_NARROW_FRONTAL_CONE:
|
||||||
FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
case TARGET_IN_FRONT_OF_CASTER_30:
|
case TARGET_IN_FRONT_OF_CASTER_30:
|
||||||
FillAreaTargets(targetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
case TARGET_DUELVSPLAYER:
|
case TARGET_DUELVSPLAYER:
|
||||||
{
|
{
|
||||||
|
|
@ -2238,7 +2238,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
|
case TARGET_ALL_ENEMY_IN_AREA_CHANNELED:
|
||||||
// targets the ground, not the units in the area
|
// targets the ground, not the units in the area
|
||||||
if (m_spellInfo->Effect[effIndex]!=SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
if (m_spellInfo->Effect[effIndex]!=SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||||
FillAreaTargets(targetUnitMap, m_targets.m_destX, m_targets.m_destY, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_DEST_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
break;
|
break;
|
||||||
case TARGET_MINION:
|
case TARGET_MINION:
|
||||||
if(m_spellInfo->Effect[effIndex] != SPELL_EFFECT_DUEL)
|
if(m_spellInfo->Effect[effIndex] != SPELL_EFFECT_DUEL)
|
||||||
|
|
@ -2345,7 +2345,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
|
|
||||||
UnitList tempTargetUnitMap;
|
UnitList tempTargetUnitMap;
|
||||||
|
|
||||||
FillAreaTargets(tempTargetUnitMap, m_caster->GetPositionX(), m_caster->GetPositionY(), max_range, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY);
|
FillAreaTargets(tempTargetUnitMap, max_range, PUSH_SELF_CENTER, SPELL_TARGETS_FRIENDLY);
|
||||||
|
|
||||||
if (m_caster != pUnitTarget && std::find(tempTargetUnitMap.begin(), tempTargetUnitMap.end(), m_caster) == tempTargetUnitMap.end())
|
if (m_caster != pUnitTarget && std::find(tempTargetUnitMap.begin(), tempTargetUnitMap.end(), m_caster) == tempTargetUnitMap.end())
|
||||||
tempTargetUnitMap.push_front(m_caster);
|
tempTargetUnitMap.push_front(m_caster);
|
||||||
|
|
@ -2399,7 +2399,7 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
||||||
targetUnitMap.push_back(currentTarget);
|
targetUnitMap.push_back(currentTarget);
|
||||||
m_targets.setDestination(currentTarget->GetPositionX(), currentTarget->GetPositionY(), currentTarget->GetPositionZ());
|
m_targets.setDestination(currentTarget->GetPositionX(), currentTarget->GetPositionY(), currentTarget->GetPositionZ());
|
||||||
if(m_spellInfo->EffectImplicitTargetB[effIndex] == TARGET_ALL_ENEMY_IN_AREA_INSTANT)
|
if(m_spellInfo->EffectImplicitTargetB[effIndex] == TARGET_ALL_ENEMY_IN_AREA_INSTANT)
|
||||||
FillAreaTargets(targetUnitMap, currentTarget->GetPositionX(), currentTarget->GetPositionY(), radius, PUSH_TARGET_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
FillAreaTargets(targetUnitMap, radius, PUSH_TARGET_CENTER, SPELL_TARGETS_AOE_DAMAGE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -6917,10 +6917,10 @@ SpellCastResult Spell::CanOpenLock(SpellEffectIndex effIndex, uint32 lockId, Ski
|
||||||
* @param spellTargets Additional rules for target selection base at hostile/friendly state to original spell caster
|
* @param spellTargets Additional rules for target selection base at hostile/friendly state to original spell caster
|
||||||
* @param originalCaster If provided set alternative original caster, if =NULL then used Spell::GetAffectiveObject() return
|
* @param originalCaster If provided set alternative original caster, if =NULL then used Spell::GetAffectiveObject() return
|
||||||
*/
|
*/
|
||||||
void Spell::FillAreaTargets(UnitList &targetUnitMap, float x, float y, float radius, SpellNotifyPushType pushType, SpellTargets spellTargets, WorldObject* originalCaster /*=NULL*/)
|
void Spell::FillAreaTargets(UnitList &targetUnitMap, float radius, SpellNotifyPushType pushType, SpellTargets spellTargets, WorldObject* originalCaster /*=NULL*/)
|
||||||
{
|
{
|
||||||
MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, targetUnitMap, radius, pushType, spellTargets, originalCaster);
|
MaNGOS::SpellNotifierCreatureAndPlayer notifier(*this, targetUnitMap, radius, pushType, spellTargets, originalCaster);
|
||||||
Cell::VisitAllObjects(x, y, m_caster->GetMap(), notifier, radius);
|
Cell::VisitAllObjects(notifier.GetCenterX(), notifier.GetCenterY(), m_caster->GetMap(), notifier, radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Spell::FillRaidOrPartyTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, bool raid, bool withPets, bool withcaster)
|
void Spell::FillRaidOrPartyTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, bool raid, bool withPets, bool withcaster)
|
||||||
|
|
|
||||||
|
|
@ -401,7 +401,7 @@ class Spell
|
||||||
void FillTargetMap();
|
void FillTargetMap();
|
||||||
void SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList &targetUnitMap);
|
void SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList &targetUnitMap);
|
||||||
|
|
||||||
void FillAreaTargets(UnitList &targetUnitMap, float x, float y, float radius, SpellNotifyPushType pushType, SpellTargets spellTargets, WorldObject* originalCaster = NULL);
|
void FillAreaTargets(UnitList &targetUnitMap, float radius, SpellNotifyPushType pushType, SpellTargets spellTargets, WorldObject* originalCaster = NULL);
|
||||||
void FillRaidOrPartyTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, bool raid, bool withPets, bool withcaster);
|
void FillRaidOrPartyTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, bool raid, bool withPets, bool withcaster);
|
||||||
void FillRaidOrPartyManaPriorityTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
void FillRaidOrPartyManaPriorityTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
||||||
void FillRaidOrPartyHealthPriorityTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
void FillRaidOrPartyHealthPriorityTargets(UnitList &targetUnitMap, Unit* member, Unit* center, float radius, uint32 count, bool raid, bool withPets, bool withcaster);
|
||||||
|
|
@ -696,23 +696,58 @@ namespace MaNGOS
|
||||||
float i_radius;
|
float i_radius;
|
||||||
SpellTargets i_TargetType;
|
SpellTargets i_TargetType;
|
||||||
WorldObject* i_originalCaster;
|
WorldObject* i_originalCaster;
|
||||||
|
WorldObject* i_castingObject;
|
||||||
bool i_playerControlled;
|
bool i_playerControlled;
|
||||||
|
float i_centerX;
|
||||||
|
float i_centerY;
|
||||||
|
|
||||||
|
float GetCenterX() const { return i_centerX; }
|
||||||
|
float GetCenterY() const { return i_centerY; }
|
||||||
|
|
||||||
SpellNotifierCreatureAndPlayer(Spell &spell, Spell::UnitList &data, float radius, SpellNotifyPushType type,
|
SpellNotifierCreatureAndPlayer(Spell &spell, Spell::UnitList &data, float radius, SpellNotifyPushType type,
|
||||||
SpellTargets TargetType = SPELL_TARGETS_NOT_FRIENDLY, WorldObject* originalCaster = NULL)
|
SpellTargets TargetType = SPELL_TARGETS_NOT_FRIENDLY, WorldObject* originalCaster = NULL)
|
||||||
: i_data(&data), i_spell(spell), i_push_type(type), i_radius(radius), i_TargetType(TargetType),
|
: i_data(&data), i_spell(spell), i_push_type(type), i_radius(radius), i_TargetType(TargetType),
|
||||||
i_originalCaster(originalCaster)
|
i_originalCaster(originalCaster), i_castingObject(i_spell.GetCastingObject())
|
||||||
{
|
{
|
||||||
if (!i_originalCaster)
|
if (!i_originalCaster)
|
||||||
i_originalCaster = i_spell.GetAffectiveCasterObject();
|
i_originalCaster = i_spell.GetAffectiveCasterObject();
|
||||||
i_playerControlled = i_originalCaster ? i_originalCaster->IsControlledByPlayer() : false;
|
i_playerControlled = i_originalCaster ? i_originalCaster->IsControlledByPlayer() : false;
|
||||||
|
|
||||||
|
switch(i_push_type)
|
||||||
|
{
|
||||||
|
case PUSH_IN_FRONT:
|
||||||
|
case PUSH_IN_FRONT_90:
|
||||||
|
case PUSH_IN_FRONT_30:
|
||||||
|
case PUSH_IN_FRONT_15:
|
||||||
|
case PUSH_IN_BACK:
|
||||||
|
case PUSH_SELF_CENTER:
|
||||||
|
if (i_castingObject)
|
||||||
|
{
|
||||||
|
i_centerX = i_castingObject->GetPositionX();
|
||||||
|
i_centerY = i_castingObject->GetPositionY();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case PUSH_DEST_CENTER:
|
||||||
|
i_centerX = i_spell.m_targets.m_destX;
|
||||||
|
i_centerY = i_spell.m_targets.m_destY;
|
||||||
|
break;
|
||||||
|
case PUSH_TARGET_CENTER:
|
||||||
|
if (Unit* target = i_spell.m_targets.getUnitTarget())
|
||||||
|
{
|
||||||
|
i_centerX = target->GetPositionX();
|
||||||
|
i_centerY = target->GetPositionY();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
sLog.outError("SpellNotifierCreatureAndPlayer: unsupported PUSH_* case %u.", i_push_type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class T> inline void Visit(GridRefManager<T> &m)
|
template<class T> inline void Visit(GridRefManager<T> &m)
|
||||||
{
|
{
|
||||||
MANGOS_ASSERT(i_data);
|
MANGOS_ASSERT(i_data);
|
||||||
|
|
||||||
if(!i_originalCaster)
|
if (!i_originalCaster || !i_castingObject)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for(typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr)
|
for(typename GridRefManager<T>::iterator itr = m.begin(); itr != m.end(); ++itr)
|
||||||
|
|
@ -768,27 +803,27 @@ namespace MaNGOS
|
||||||
switch(i_push_type)
|
switch(i_push_type)
|
||||||
{
|
{
|
||||||
case PUSH_IN_FRONT:
|
case PUSH_IN_FRONT:
|
||||||
if(i_spell.GetCaster()->isInFront((Unit*)(itr->getSource()), i_radius, 2*M_PI_F/3 ))
|
if (i_castingObject->isInFront((Unit*)(itr->getSource()), i_radius, 2*M_PI_F/3 ))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_IN_FRONT_90:
|
case PUSH_IN_FRONT_90:
|
||||||
if(i_spell.GetCaster()->isInFront((Unit*)(itr->getSource()), i_radius, M_PI_F/2 ))
|
if (i_castingObject->isInFront((Unit*)(itr->getSource()), i_radius, M_PI_F/2 ))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_IN_FRONT_30:
|
case PUSH_IN_FRONT_30:
|
||||||
if(i_spell.GetCaster()->isInFront((Unit*)(itr->getSource()), i_radius, M_PI_F/6 ))
|
if (i_castingObject->isInFront((Unit*)(itr->getSource()), i_radius, M_PI_F/6 ))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_IN_FRONT_15:
|
case PUSH_IN_FRONT_15:
|
||||||
if(i_spell.GetCaster()->isInFront((Unit*)(itr->getSource()), i_radius, M_PI_F/12 ))
|
if (i_castingObject->isInFront((Unit*)(itr->getSource()), i_radius, M_PI_F/12 ))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_IN_BACK:
|
case PUSH_IN_BACK:
|
||||||
if(i_spell.GetCaster()->isInBack((Unit*)(itr->getSource()), i_radius, 2*M_PI_F/3 ))
|
if (i_castingObject->isInBack((Unit*)(itr->getSource()), i_radius, 2*M_PI_F/3 ))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_SELF_CENTER:
|
case PUSH_SELF_CENTER:
|
||||||
if(i_spell.GetCaster()->IsWithinDist((Unit*)(itr->getSource()), i_radius))
|
if (i_castingObject->IsWithinDist((Unit*)(itr->getSource()), i_radius))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_DEST_CENTER:
|
case PUSH_DEST_CENTER:
|
||||||
|
|
@ -796,7 +831,7 @@ namespace MaNGOS
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
case PUSH_TARGET_CENTER:
|
case PUSH_TARGET_CENTER:
|
||||||
if(i_spell.m_targets.getUnitTarget()->IsWithinDist((Unit*)(itr->getSource()), i_radius))
|
if (i_spell.m_targets.getUnitTarget() && i_spell.m_targets.getUnitTarget()->IsWithinDist((Unit*)(itr->getSource()), i_radius))
|
||||||
i_data->push_back(itr->getSource());
|
i_data->push_back(itr->getSource());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11423"
|
#define REVISION_NR "11424"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue