Skip to content

Commit

Permalink
[11071] Some improvements to summon location of wild summoned
Browse files Browse the repository at this point in the history
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 <nofantasy@nf.no>
  • Loading branch information
NoFantasy committed Jan 25, 2011
1 parent 48f0020 commit 95df79e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion src/game/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
2 changes: 1 addition & 1 deletion src/shared/revision_nr.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "11070"
#define REVISION_NR "11071"
#endif // __REVISION_NR_H__

0 comments on commit 95df79e

Please sign in to comment.