mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[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 <nofantasy@nf.no>
This commit is contained in:
parent
c9fc5727fc
commit
c54ae28ac2
2 changed files with 15 additions and 2 deletions
|
|
@ -4716,7 +4716,20 @@ void Spell::DoSummonWild(SpellEffectIndex eff_idx, uint32 forceFaction)
|
||||||
}
|
}
|
||||||
// Summon if dest location not present near caster
|
// Summon if dest location not present near caster
|
||||||
else
|
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))
|
if(Creature *summon = m_caster->SummonCreature(creature_entry, px, py, pz, m_caster->GetOrientation(), summonType, duration))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11070"
|
#define REVISION_NR "11071"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue