mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +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
|
||||
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))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue