mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 16:37:00 +00:00
[11076] Override radius for TARGET_DYNAMIC_OBJECT_* (47-50)
When effect radius index is 0, spell max range is useless and we need to handle these as 0.0 radius. This will fix summoning spells where object is summoned too far away from the expected. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
9bf384cefa
commit
84dd2e4393
2 changed files with 9 additions and 1 deletions
|
|
@ -2433,6 +2433,14 @@ void Spell::SetTargetMap(SpellEffectIndex effIndex, uint32 targetMode, UnitList&
|
|||
{
|
||||
if (!(m_targets.m_targetMask & TARGET_FLAG_DEST_LOCATION))
|
||||
{
|
||||
// General override, we don't want to use max spell range here.
|
||||
// Note: 0.0 radius is also for index 36. It is possible that 36 must be defined as
|
||||
// "at the base of", in difference to 0 which appear to be "directly in front of".
|
||||
// TODO: some summoned will make caster be half inside summoned object. Need to fix
|
||||
// that in the below code (nearpoint vs closepoint, etc).
|
||||
if (m_spellInfo->EffectRadiusIndex[effIndex] == 0)
|
||||
radius = 0.0f;
|
||||
|
||||
if (m_spellInfo->Id == 50019) // Hawk Hunting, problematic 50K radius
|
||||
radius = 10.0f;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11075"
|
||||
#define REVISION_NR "11076"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue