mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[9605] SetSummonPoint for any summoned creature.
Should fix a crash where summoned attempt moveRandom without having a valid summon point. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
e11c4b4e03
commit
a3de8da535
2 changed files with 5 additions and 1 deletions
|
|
@ -3864,6 +3864,7 @@ void Spell::DoSummon(SpellEffectIndex eff_idx)
|
|||
m_caster->GetClosePoint(x, y, z, spawnCreature->GetObjectSize());
|
||||
|
||||
spawnCreature->Relocate(x, y, z, -m_caster->GetOrientation());
|
||||
spawnCreature->SetSummonPoint(x, y, z, -m_caster->GetOrientation());
|
||||
|
||||
if (!spawnCreature->IsPositionValid())
|
||||
{
|
||||
|
|
@ -4281,6 +4282,7 @@ void Spell::DoSummonGuardian(SpellEffectIndex eff_idx, uint32 forceFaction)
|
|||
m_caster->GetClosePoint(px, py, pz,spawnCreature->GetObjectSize());
|
||||
|
||||
spawnCreature->Relocate(px, py, pz, m_caster->GetOrientation());
|
||||
spawnCreature->SetSummonPoint(px, py, pz, m_caster->GetOrientation());
|
||||
|
||||
if (!spawnCreature->IsPositionValid())
|
||||
{
|
||||
|
|
@ -6373,6 +6375,7 @@ void Spell::DoSummonTotem(SpellEffectIndex eff_idx, uint8 slot_dbc)
|
|||
z = m_caster->GetPositionZ();
|
||||
|
||||
pTotem->Relocate(x, y, z, m_caster->GetOrientation());
|
||||
pTotem->SetSummonPoint(x, y, z, m_caster->GetOrientation());
|
||||
|
||||
if (slot < MAX_TOTEM_SLOT)
|
||||
m_caster->_AddTotem(TotemSlot(slot),pTotem);
|
||||
|
|
@ -6877,6 +6880,7 @@ void Spell::DoSummonCritter(SpellEffectIndex eff_idx, uint32 forceFaction)
|
|||
m_caster->GetClosePoint(x, y, z, critter->GetObjectSize());
|
||||
|
||||
critter->Relocate(x, y, z, m_caster->GetOrientation());
|
||||
critter->SetSummonPoint(x, y, z, m_caster->GetOrientation());
|
||||
|
||||
if(!critter->IsPositionValid())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "9604"
|
||||
#define REVISION_NR "9605"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue