aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/ObjectMgr.cpp2
-rw-r--r--src/game/SpellEffects.cpp34
2 files changed, 13 insertions, 23 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp
index 7513e8e3fa9..916fa6a9a04 100644
--- a/src/game/ObjectMgr.cpp
+++ b/src/game/ObjectMgr.cpp
@@ -968,7 +968,7 @@ void ObjectMgr::LoadCreatureModelInfo()
if(mInfo->combat_reach < 0.5f)
{
- sLog.outErrorDb("Creature model (Entry: %u) has invalid combat reach (%f), setting it to 0.5", mInfo->modelid, mInfo->combat_reach);
+ //sLog.outErrorDb("Creature model (Entry: %u) has invalid combat reach (%f), setting it to 0.5", mInfo->modelid, mInfo->combat_reach);
const_cast<CreatureModelInfo*>(mInfo)->combat_reach = 0.5f;
}
}
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 555fe1bb055..58ece04a267 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -5479,31 +5479,21 @@ void Spell::EffectMomentMove(uint32 i)
if(unitTarget->isInFlight())
return;
- if( m_spellInfo->rangeIndex== 1) //self range
- {
- uint32 mapid = m_caster->GetMapId();
- float dis = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i]));
+ if(!m_targets.HasDest())
+ return;
- // before caster
- float fx,fy,fz;
- unitTarget->GetClosePoint(fx,fy,fz,unitTarget->GetObjectSize(),dis);
- float ox,oy,oz;
- unitTarget->GetPosition(ox,oy,oz);
+ uint32 mapid = unitTarget->GetMapId();
+ float ox,oy,oz;
+ unitTarget->GetPosition(ox,oy,oz);
- float fx2,fy2,fz2; // getObjectHitPos overwrite last args in any result case
- if(VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(mapid, ox,oy,oz+0.5, fx,fy,oz+0.5,fx2,fy2,fz2, -0.5))
- {
- fx = fx2;
- fy = fy2;
- fz = fz2;
- unitTarget->UpdateGroundPositionZ(fx,fy,fz);
- }
+ float fx,fy,fz; // getObjectHitPos overwrite last args in any result case
+ if(VMAP::VMapFactory::createOrGetVMapManager()->getObjectHitPos(mapid, ox,oy,oz+0.5, m_targets.m_destX,m_targets.m_destY,oz+0.5,fx,fy,fz, -0.5))
+ unitTarget->UpdateGroundPositionZ(fx,fy,fz);
- if(unitTarget->GetTypeId() == TYPEID_PLAYER)
- ((Player*)unitTarget)->TeleportTo(mapid, fx, fy, fz, unitTarget->GetOrientation(), TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
- else
- MapManager::Instance().GetMap(mapid, unitTarget)->CreatureRelocation((Creature*)unitTarget, fx, fy, fz, unitTarget->GetOrientation());
- }
+ if(unitTarget->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)unitTarget)->TeleportTo(mapid, fx, fy, fz, unitTarget->GetOrientation(), TELE_TO_NOT_LEAVE_COMBAT | TELE_TO_NOT_UNSUMMON_PET | (unitTarget==m_caster ? TELE_TO_SPELL : 0));
+ else
+ MapManager::Instance().GetMap(mapid, unitTarget)->CreatureRelocation((Creature*)unitTarget, fx, fy, fz, unitTarget->GetOrientation());
}
void Spell::EffectReputation(uint32 i)