mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
[8350] Implement (partly) 78-85 target modes.
Thanks to Astellar for original reseach related target modes.
This commit is contained in:
parent
cb29748467
commit
e01e1b4fb4
4 changed files with 50 additions and 1 deletions
|
|
@ -1045,6 +1045,14 @@ enum Targets
|
|||
TARGET_BEHIND_VICTIM = 65, // uses in teleport behind spells, caster/target dependent from spell effect
|
||||
TARGET_DYNAMIC_OBJECT_COORDINATES = 76,
|
||||
TARGET_SINGLE_ENEMY = 77,
|
||||
TARGET_POINT_AT_NORTH = 78, // 78-85 possible _COORDINATES at radius with pi/4 step around target in unknown order, N?
|
||||
TARGET_POINT_AT_SOUTH = 79, // S?
|
||||
TARGET_POINT_AT_EAST = 80, // 80/81 must be symmetric from line caster->target, E (base at 82/83, 84/85 order) ?
|
||||
TARGET_POINT_AT_WEST = 81, // 80/81 must be symmetric from line caster->target, W (base at 82/83, 84/85 order) ?
|
||||
TARGET_POINT_AT_NE = 82, // from spell desc: "(NE)"
|
||||
TARGET_POINT_AT_NW = 83, // from spell desc: "(NW)"
|
||||
TARGET_POINT_AT_SE = 84, // from spell desc: "(SE)"
|
||||
TARGET_POINT_AT_SW = 85, // from spell desc: "(SW)"
|
||||
TARGET_SELF2 = 87,
|
||||
TARGET_DIRECTLY_FORWARD = 89,
|
||||
TARGET_NONCOMBAT_PET = 90,
|
||||
|
|
|
|||
|
|
@ -2110,6 +2110,39 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
|
|||
if(DynamicObject* dynObj = m_caster->GetDynObject(m_triggeredByAuraSpell ? m_triggeredByAuraSpell->Id : m_spellInfo->Id))
|
||||
m_targets.setDestination(dynObj->GetPositionX(), dynObj->GetPositionY(), dynObj->GetPositionZ());
|
||||
break;
|
||||
case TARGET_POINT_AT_NORTH:
|
||||
case TARGET_POINT_AT_SOUTH:
|
||||
case TARGET_POINT_AT_EAST:
|
||||
case TARGET_POINT_AT_WEST:
|
||||
case TARGET_POINT_AT_NE:
|
||||
case TARGET_POINT_AT_NW:
|
||||
case TARGET_POINT_AT_SE:
|
||||
case TARGET_POINT_AT_SW:
|
||||
{
|
||||
|
||||
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||
{
|
||||
Unit* currentTarget = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
|
||||
float angle = currentTarget != m_caster ? currentTarget->GetAngle(m_caster) : m_caster->GetOrientation();
|
||||
|
||||
switch(cur)
|
||||
{
|
||||
case TARGET_POINT_AT_NORTH: break;
|
||||
case TARGET_POINT_AT_SOUTH: angle += M_PI; break;
|
||||
case TARGET_POINT_AT_EAST: angle -= M_PI/2; break;
|
||||
case TARGET_POINT_AT_WEST: angle += M_PI/2; break;
|
||||
case TARGET_POINT_AT_NE: angle -= M_PI/4; break;
|
||||
case TARGET_POINT_AT_NW: angle += M_PI/4; break;
|
||||
case TARGET_POINT_AT_SE: angle -= 3*M_PI/4; break;
|
||||
case TARGET_POINT_AT_SW: angle += 3*M_PI/4; break;
|
||||
}
|
||||
|
||||
float x,y;
|
||||
currentTarget->GetNearPoint2D(x,y,radius,angle);
|
||||
m_targets.setDestination(x,y,currentTarget->GetPositionZ());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TARGET_DIRECTLY_FORWARD:
|
||||
{
|
||||
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||
|
|
|
|||
|
|
@ -257,6 +257,14 @@ inline bool IsPointEffectTarget( Targets target )
|
|||
case TARGET_CURRENT_ENEMY_COORDINATES:
|
||||
case TARGET_DUELVSPLAYER_COORDINATES:
|
||||
case TARGET_DYNAMIC_OBJECT_COORDINATES:
|
||||
case TARGET_POINT_AT_NORTH:
|
||||
case TARGET_POINT_AT_SOUTH:
|
||||
case TARGET_POINT_AT_EAST:
|
||||
case TARGET_POINT_AT_WEST:
|
||||
case TARGET_POINT_AT_NE:
|
||||
case TARGET_POINT_AT_NW:
|
||||
case TARGET_POINT_AT_SE:
|
||||
case TARGET_POINT_AT_SW:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8349"
|
||||
#define REVISION_NR "8350"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue