From c54ae28ac2853a1304309db18dc81999b74c5e8a Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Tue, 25 Jan 2011 20:13:46 +0100 Subject: [PATCH] [11071] Some improvements to summon location of wild summoned Not using a hard coded radius, instead summon at location where radius is 0 (or the actual radius). Does only affect spells without TARGET_FLAG_DEST_LOCATION set (and the majority of those spells with implicit target 18) Signed-off-by: NoFantasy --- src/game/SpellEffects.cpp | 15 ++++++++++++++- src/shared/revision_nr.h | 2 +- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 0b561831e..cddbc6df3 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4716,7 +4716,20 @@ void Spell::DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction) } // Summon if dest location not present near caster else - m_caster->GetClosePoint(px, py, pz, 3.0f); + { + if (radius > 0.0f) + { + // not using bounding radius of caster here + m_caster->GetClosePoint(px, py, pz, 0.0f, radius); + } + else + { + // EffectRadiusIndex 0 or 36 + px = m_caster->GetPositionX(); + py = m_caster->GetPositionY(); + pz = m_caster->GetPositionZ(); + } + } if(Creature *summon = m_caster->SummonCreature(creature_entry, px, py, pz, m_caster->GetOrientation(), summonType, duration)) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 8bdd9d484..726006605 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "11070" + #define REVISION_NR "11071" #endif // __REVISION_NR_H__