[9401] Resolve porblems with waypoints moved/etc after [9400]

* Move movegen Interrupt/Reset calls from CreatureRelocation that called and from another movegens.
* Add this called to NearTeleportTo creature case and new MonsterMove* functions that considered
  as special moves similar instant movegens.
* NearTeleportTo/MonsterMove functions recomended used instead explicit use CreatureReolcation+SendMosterMOve pairs
  for proper reaction at movement from creature movement generators.
This commit is contained in:
VladimirMangos 2010-02-17 16:59:53 +03:00
parent c044d64618
commit 54559b5c03
8 changed files with 93 additions and 50 deletions

View file

@ -6428,10 +6428,7 @@ void Spell::EffectCharge(uint32 /*i*/)
((Creature *)unitTarget)->StopMoving();
// Only send MOVEMENTFLAG_WALK_MODE, client has strange issues with other move flags
m_caster->SendMonsterMove(x, y, z, 0, m_caster->GetTypeId() == TYPEID_PLAYER ? SPLINEFLAG_WALKMODE : ((Creature*)m_caster)->GetSplineFlags(), 1);
if (m_caster->GetTypeId() != TYPEID_PLAYER)
m_caster->GetMap()->CreatureRelocation((Creature*)m_caster, x, y, z, m_caster->GetOrientation());
m_caster->MonsterMove(x, y, z, 1);
// not all charge effects used in negative spells
if (unitTarget != m_caster && !IsPositiveSpell(m_spellInfo->Id))
@ -6456,10 +6453,7 @@ void Spell::EffectCharge2(uint32 /*i*/)
return;
// Only send MOVEMENTFLAG_WALK_MODE, client has strange issues with other move flags
m_caster->SendMonsterMove(x, y, z, 0, m_caster->GetTypeId() == TYPEID_PLAYER ? SPLINEFLAG_WALKMODE : ((Creature*)m_caster)->GetSplineFlags(), 1);
if (m_caster->GetTypeId() != TYPEID_PLAYER)
m_caster->GetMap()->CreatureRelocation((Creature*)m_caster, x, y, z, m_caster->GetOrientation());
m_caster->MonsterMove(x, y, z, 1);
// not all charge effects used in negative spells
if (unitTarget && unitTarget != m_caster && !IsPositiveSpell(m_spellInfo->Id))