mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 01:37:01 +00:00
[9101] Correct target mode 48, and rename to something more meaningful
Also adjust target 49/50 angles to be really left/right. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
b9fd5f4311
commit
1ec90288fb
4 changed files with 9 additions and 8 deletions
|
|
@ -1417,7 +1417,6 @@ void Spell::SetTargetMap(uint32 effIndex, uint32 targetMode, UnitList& targetUni
|
|||
case TARGET_SELF2:
|
||||
case TARGET_AREAEFFECT_CUSTOM:
|
||||
case TARGET_AREAEFFECT_CUSTOM_2:
|
||||
case TARGET_SUMMON:
|
||||
targetUnitMap.push_back(m_caster);
|
||||
break;
|
||||
case TARGET_RANDOM_ENEMY_CHAIN_IN_AREA:
|
||||
|
|
@ -2122,16 +2121,19 @@ void Spell::SetTargetMap(uint32 effIndex, uint32 targetMode, UnitList& targetUni
|
|||
break;
|
||||
|
||||
case TARGET_DYNAMIC_OBJECT_FRONT:
|
||||
case TARGET_DYNAMIC_OBJECT_BEHIND:
|
||||
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;
|
||||
case TARGET_DYNAMIC_OBJECT_FRONT: break;
|
||||
case TARGET_DYNAMIC_OBJECT_BEHIND: angle += M_PI; break;
|
||||
case TARGET_DYNAMIC_OBJECT_LEFT_SIDE: angle += M_PI/2; break;
|
||||
case TARGET_DYNAMIC_OBJECT_RIGHT_SIDE: angle -= M_PI/2; break;
|
||||
}
|
||||
|
||||
float x,y;
|
||||
|
|
@ -2141,7 +2143,7 @@ void Spell::SetTargetMap(uint32 effIndex, uint32 targetMode, UnitList& targetUni
|
|||
|
||||
targetUnitMap.push_back(m_caster);
|
||||
break;
|
||||
|
||||
}
|
||||
case TARGET_POINT_AT_NORTH:
|
||||
case TARGET_POINT_AT_SOUTH:
|
||||
case TARGET_POINT_AT_EAST:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue