From a3de8da535a12bfbed230d251745ebb84f076f1d Mon Sep 17 00:00:00 2001 From: NoFantasy Date: Thu, 18 Mar 2010 14:04:47 +0100 Subject: [PATCH] [9605] SetSummonPoint for any summoned creature. Should fix a crash where summoned attempt moveRandom without having a valid summon point. Signed-off-by: NoFantasy --- src/game/SpellEffects.cpp | 4 ++++ src/shared/revision_nr.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 80d4e1ecf..6db4481ab 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -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()) { diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index ab0551b52..a938ceb54 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 "9604" + #define REVISION_NR "9605" #endif // __REVISION_NR_H__