mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[8528] Implementing implicit target 49, 50. Thanks to qsa.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
c71fc301ec
commit
b24e9de324
3 changed files with 26 additions and 3 deletions
|
|
@ -1041,8 +1041,10 @@ enum Targets
|
|||
TARGET_TOTEM_FIRE = 44,
|
||||
TARGET_CHAIN_HEAL = 45,
|
||||
TARGET_SCRIPT_COORDINATES = 46,
|
||||
TARGET_DYNAMIC_OBJECT = 47,
|
||||
TARGET_DYNAMIC_OBJECT_FRONT = 47,
|
||||
TARGET_SUMMON = 48,
|
||||
TARGET_DYNAMIC_OBJECT_LEFT_SIDE = 49,
|
||||
TARGET_DYNAMIC_OBJECT_RIGHT_SIDE = 50,
|
||||
TARGET_AREAEFFECT_CUSTOM_2 = 52,
|
||||
TARGET_CURRENT_ENEMY_COORDINATES = 53, // set unit coordinates as dest, only 16 target B imlemented
|
||||
TARGET_ALL_RAID_AROUND_CASTER = 56,
|
||||
|
|
|
|||
|
|
@ -1319,7 +1319,6 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
|
|||
case TARGET_TOTEM_FIRE:
|
||||
case TARGET_SELF:
|
||||
case TARGET_SELF2:
|
||||
case TARGET_DYNAMIC_OBJECT:
|
||||
case TARGET_AREAEFFECT_CUSTOM:
|
||||
case TARGET_AREAEFFECT_CUSTOM_2:
|
||||
case TARGET_SUMMON:
|
||||
|
|
@ -1986,6 +1985,28 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,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_DYNAMIC_OBJECT_FRONT:
|
||||
case TARGET_DYNAMIC_OBJECT_LEFT_SIDE:
|
||||
case TARGET_DYNAMIC_OBJECT_RIGHT_SIDE:
|
||||
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||
{
|
||||
float angle = m_caster->GetOrientation();
|
||||
switch(targetMode)
|
||||
{
|
||||
case TARGET_DYNAMIC_OBJECT_FRONT: break;
|
||||
case TARGET_DYNAMIC_OBJECT_LEFT_SIDE: angle -= 3*M_PI/4; break;
|
||||
case TARGET_DYNAMIC_OBJECT_RIGHT_SIDE: angle += 3*M_PI/4; break;
|
||||
}
|
||||
|
||||
float x,y;
|
||||
m_caster->GetNearPoint2D(x,y,radius,angle);
|
||||
m_targets.setDestination(x,y,m_caster->GetPositionZ());
|
||||
}
|
||||
|
||||
TagUnitMap.push_back(m_caster);
|
||||
break;
|
||||
|
||||
case TARGET_POINT_AT_NORTH:
|
||||
case TARGET_POINT_AT_SOUTH:
|
||||
case TARGET_POINT_AT_EAST:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8527"
|
||||
#define REVISION_NR "8528"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue