mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-30 21:57:01 +01:00
*Fix a crash bug caused by motionmaster.
*Fix charge movement. --HG-- branch : trunk
This commit is contained in:
@@ -5739,17 +5739,10 @@ void Spell::EffectCharge(uint32 /*i*/)
|
||||
|
||||
float x, y, z;
|
||||
unitTarget->GetContactPoint(m_caster, x, y, z);
|
||||
if(unitTarget->GetTypeId() != TYPEID_PLAYER)
|
||||
((Creature *)unitTarget)->StopMoving();
|
||||
|
||||
// Only send MOVEMENTFLAG_WALK_MODE, client has strange issues with other move flags
|
||||
m_caster->SendMonsterMove(x, y, z, 0, MOVEMENTFLAG_WALK_MODE, 1);
|
||||
|
||||
if(m_caster->GetTypeId() != TYPEID_PLAYER)
|
||||
m_caster->GetMap()->CreatureRelocation((Creature*)m_caster,x,y,z,m_caster->GetOrientation());
|
||||
m_caster->GetMotionMaster()->MoveCharge(x, y, z);
|
||||
|
||||
// not all charge effects used in negative spells
|
||||
if ( !IsPositiveSpell(m_spellInfo->Id))
|
||||
if ( !IsPositiveSpell(m_spellInfo->Id) && m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
m_caster->Attack(unitTarget,true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user