[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

@ -764,7 +764,7 @@ bool Creature::isCanTrainingAndResetTalentsOf(Player* pPlayer) const
&& pPlayer->getClass() == GetCreatureInfo()->trainer_class;
}
void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, SplineFlags flags, uint8 type)
void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, SplineFlags flags, SplineType type)
{
/* uint32 timeElap = getMSTime();
if ((timeElap - m_startMove) < m_moveTime)
@ -2057,25 +2057,6 @@ void Creature::SendMonsterMoveWithSpeedToCurrentDestination(Player* player)
SendMonsterMoveWithSpeed(x, y, z, 0, player);
}
void Creature::SendMonsterMoveWithSpeed(float x, float y, float z, uint32 transitTime, Player* player)
{
if (!transitTime)
{
if(GetTypeId()==TYPEID_PLAYER)
{
Traveller<Player> traveller(*(Player*)this);
transitTime = traveller.GetTotalTrevelTimeTo(x, y, z);
}
else
{
Traveller<Creature> traveller(*(Creature*)this);
transitTime = traveller.GetTotalTrevelTimeTo(x, y, z);
}
}
//float orientation = (float)atan2((double)dy, (double)dx);
SendMonsterMove(x, y, z, 0, GetSplineFlags(), transitTime, player);
}
void Creature::SendAreaSpiritHealerQueryOpcode(Player *pl)
{
uint32 next_resurrect = 0;