mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8543] Implement implicit target 60 (affects 82 spells)
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
62cee4d29f
commit
549556c7d0
4 changed files with 11 additions and 1 deletions
|
|
@ -1049,6 +1049,7 @@ enum Targets
|
|||
TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented
|
||||
TARGET_ALL_RAID_AROUND_CASTER = 56,
|
||||
TARGET_SINGLE_FRIEND_2 = 57,
|
||||
TARGET_NARROW_FRONTAL_CONE = 60,
|
||||
TARGET_AREAEFFECT_PARTY_AND_CLASS = 61,
|
||||
TARGET_DUELVSPLAYER_COORDINATES = 63,
|
||||
TARGET_BEHIND_VICTIM = 65, // used in teleport behind spells, caster/target dependent from spell effect
|
||||
|
|
|
|||
|
|
@ -1315,6 +1315,7 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
|
|||
{
|
||||
case TARGET_RANDOM_NEARBY_LOC:
|
||||
radius *= sqrt(rand_norm()); // Get a random point in circle. Use sqrt(rand) to correct distribution when converting polar to Cartesian coordinates.
|
||||
// no 'break' expected since we use code in case TARGET_RANDOM_CIRCUMFERENCE_POINT!!!
|
||||
case TARGET_RANDOM_CIRCUMFERENCE_POINT:
|
||||
{
|
||||
float angle = 2.0 * M_PI * rand_norm();
|
||||
|
|
@ -1748,6 +1749,9 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
|
|||
FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(),radius,inFront ? PUSH_IN_FRONT : PUSH_IN_BACK,SPELL_TARGETS_AOE_DAMAGE);
|
||||
break;
|
||||
}
|
||||
case TARGET_NARROW_FRONTAL_CONE:
|
||||
FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_15, SPELL_TARGETS_AOE_DAMAGE);
|
||||
break;
|
||||
case TARGET_IN_FRONT_OF_CASTER_30:
|
||||
FillAreaTargets(TagUnitMap,m_caster->GetPositionX(), m_caster->GetPositionY(), radius, PUSH_IN_FRONT_30, SPELL_TARGETS_AOE_DAMAGE);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -84,6 +84,7 @@ enum SpellNotifyPushType
|
|||
{
|
||||
PUSH_IN_FRONT,
|
||||
PUSH_IN_FRONT_30,
|
||||
PUSH_IN_FRONT_15,
|
||||
PUSH_IN_BACK,
|
||||
PUSH_SELF_CENTER,
|
||||
PUSH_DEST_CENTER,
|
||||
|
|
@ -714,6 +715,10 @@ namespace MaNGOS
|
|||
if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, M_PI/6 ))
|
||||
i_data->push_back(itr->getSource());
|
||||
break;
|
||||
case PUSH_IN_FRONT_15:
|
||||
if(i_spell.GetCaster()->isInFrontInMap((Unit*)(itr->getSource()), i_radius, M_PI/12 ))
|
||||
i_data->push_back(itr->getSource());
|
||||
break;
|
||||
case PUSH_IN_BACK:
|
||||
if(i_spell.GetCaster()->isInBackInMap((Unit*)(itr->getSource()), i_radius, 2*M_PI/3 ))
|
||||
i_data->push_back(itr->getSource());
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8542"
|
||||
#define REVISION_NR "8543"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue