From d46098961aa2377a5f02eadecb5028675fea9d22 Mon Sep 17 00:00:00 2001 From: Schmoozerd Date: Sun, 15 Jul 2012 18:01:05 +0200 Subject: [PATCH] [12046] Fix an error with debug output for MoveFall. Thx to stfx for pointing --- src/game/MotionMaster.cpp | 2 +- src/game/SpellEffects.cpp | 13 ++++++------- src/shared/revision_nr.h | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp index f28b88de6..139c92111 100644 --- a/src/game/MotionMaster.cpp +++ b/src/game/MotionMaster.cpp @@ -495,7 +495,7 @@ void MotionMaster::MoveFall() if (tz <= INVALID_HEIGHT) { DEBUG_LOG("MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).", - m_owner->GetMap()->GetId(), m_owner->GetPositionX(), m_owner->GetPositionX(), m_owner->GetPositionZ()); + m_owner->GetMap()->GetId(), m_owner->GetPositionX(), m_owner->GetPositionY(), m_owner->GetPositionZ()); return; } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 3f527e599..64b1cf1d6 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -8517,13 +8517,12 @@ void Spell::EffectDuel(SpellEffectIndex eff_idx) uint32 gameobject_id = m_spellInfo->EffectMiscValue[eff_idx]; - Map *map = m_caster->GetMap(); - if(!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, - map, m_caster->GetPhaseMask(), - m_caster->GetPositionX()+(unitTarget->GetPositionX()-m_caster->GetPositionX())/2 , - m_caster->GetPositionY()+(unitTarget->GetPositionY()-m_caster->GetPositionY())/2 , - m_caster->GetPositionZ(), - m_caster->GetOrientation())) + Map* map = m_caster->GetMap(); + float x = m_caster->GetPositionX() + unitTarget->GetPositionX() * 0.5f; + float y = m_caster->GetPositionY() + unitTarget->GetPositionY() * 0.5f; + float z = m_caster->GetPositionZ(); + m_caster->UpdateAllowedPositionZ(x, y, z); + if (!pGameObj->Create(map->GenerateLocalLowGuid(HIGHGUID_GAMEOBJECT), gameobject_id, map, m_caster->GetPhaseMask(), x, y, z, m_caster->GetOrientation())) { delete pGameObj; return; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a3aa0d2cf..4394f4c38 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 "12045" + #define REVISION_NR "12046" #endif // __REVISION_NR_H__