mirror of
https://github.com/mangosfour/server.git
synced 2025-12-18 10:37:01 +00:00
Implement implicit target type TARGET_RANDOM_NEARBY_LOC_LR.
Signed-off-by: Ambal <pogrebniak@gala.net>
This commit is contained in:
parent
c78be3fc74
commit
a5ef1f9457
2 changed files with 3 additions and 1 deletions
|
|
@ -1053,6 +1053,7 @@ enum Targets
|
|||
TARGET_DUELVSPLAYER_COORDINATES = 63,
|
||||
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_LR = 73, // the same as TARGET_RANDOM_NEARBY_LOC but with larger ranges
|
||||
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?
|
||||
|
|
|
|||
|
|
@ -1314,6 +1314,7 @@ void Spell::SetTargetMap(uint32 effIndex,uint32 targetMode,UnitList& TagUnitMap)
|
|||
switch(targetMode)
|
||||
{
|
||||
case TARGET_RANDOM_NEARBY_LOC:
|
||||
case TARGET_RANDOM_NEARBY_LOC_LR:
|
||||
{
|
||||
float dest_x = m_caster->GetPositionX() + 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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue