Implement implicit target type TARGET_RANDOM_NEARBY_LOC_LR.

Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
qsa 2009-09-27 10:04:36 +03:00 committed by Ambal
parent c78be3fc74
commit a5ef1f9457
2 changed files with 3 additions and 1 deletions

View file

@ -1053,6 +1053,7 @@ enum Targets
TARGET_DUELVSPLAYER_COORDINATES = 63, TARGET_DUELVSPLAYER_COORDINATES = 63,
TARGET_BEHIND_VICTIM = 65, // uses in teleport behind spells, caster/target dependent from spell effect TARGET_BEHIND_VICTIM = 65, // uses in teleport behind spells, caster/target dependent from spell effect
TARGET_RANDOM_NEARBY_LOC = 72, // uses in teleport onto nearby locations TARGET_RANDOM_NEARBY_LOC = 72, // uses in teleport onto nearby locations
TARGET_RANDOM_NEARBY_LOC_LR = 73, // the same as TARGET_RANDOM_NEARBY_LOC but with larger ranges
TARGET_DYNAMIC_OBJECT_COORDINATES = 76, TARGET_DYNAMIC_OBJECT_COORDINATES = 76,
TARGET_SINGLE_ENEMY = 77, 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_NORTH = 78, // 78-85 possible _COORDINATES at radius with pi/4 step around target in unknown order, N?

View file

@ -1314,6 +1314,7 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
switch(targetMode) switch(targetMode)
{ {
case TARGET_RANDOM_NEARBY_LOC: case TARGET_RANDOM_NEARBY_LOC:
case TARGET_RANDOM_NEARBY_LOC_LR:
{ {
float dest_x = m_caster->GetPositionX() + irand(-radius, radius); float dest_x = m_caster->GetPositionX() + irand(-radius, radius);
float dest_y = m_caster->GetPositionY() + irand(-radius, radius); float dest_y = m_caster->GetPositionY() + irand(-radius, radius);
@ -2240,7 +2241,7 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
break; break;
} }
default: default:
sLog.outError( "SPELL: Unknown implicit target (%u) for spell ID %u", targetMode, m_spellInfo->Id ); //sLog.outError( "SPELL: Unknown implicit target (%u) for spell ID %u", targetMode, m_spellInfo->Id );
break; break;
} }