mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Movement: Remove deprecated method Creature::AI_SendMoveToPacket.
This commit is contained in:
@@ -955,30 +955,6 @@ bool Creature::isCanTrainingAndResetTalentsOf(Player* player) const
|
||||
&& player->getClass() == GetCreatureTemplate()->trainer_class;
|
||||
}
|
||||
|
||||
void Creature::AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 /*MovementFlags*/, uint8 /*type*/)
|
||||
{
|
||||
/* uint32 timeElap = getMSTime();
|
||||
if ((timeElap - m_startMove) < m_moveTime)
|
||||
{
|
||||
oX = (dX - oX) * ((timeElap - m_startMove) / m_moveTime);
|
||||
oY = (dY - oY) * ((timeElap - m_startMove) / m_moveTime);
|
||||
}
|
||||
else
|
||||
{
|
||||
oX = dX;
|
||||
oY = dY;
|
||||
}
|
||||
|
||||
dX = x;
|
||||
dY = y;
|
||||
m_orientation = atan2((oY - dY), (oX - dX));
|
||||
|
||||
m_startMove = getMSTime();
|
||||
m_moveTime = time;*/
|
||||
float speed = GetDistance(x, y, z) / ((float)time * 0.001f);
|
||||
MonsterMoveWithSpeed(x, y, z, speed);
|
||||
}
|
||||
|
||||
Player* Creature::GetLootRecipient() const
|
||||
{
|
||||
if (!m_lootRecipient)
|
||||
|
||||
@@ -520,7 +520,6 @@ class Creature : public Unit, public GridObject<Creature>, public MapCreature
|
||||
bool AIM_Initialize(CreatureAI* ai = NULL);
|
||||
void Motion_Initialize();
|
||||
|
||||
void AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 MovementFlags, uint8 type);
|
||||
CreatureAI* AI() const { return (CreatureAI*)i_AI; }
|
||||
|
||||
bool SetWalk(bool enable);
|
||||
|
||||
@@ -358,14 +358,14 @@ public:
|
||||
|
||||
if (TeleportTimer <= diff)
|
||||
{
|
||||
//temp solution - unit can't be teleported by core using spelleffect 5, only players
|
||||
if (me->GetMap())
|
||||
{
|
||||
me->SetPosition(3706.39f, -3969.15f, 35.9118f, 0);
|
||||
me->AI_SendMoveToPacket(3706.39f, -3969.15f, 35.9118f, 0, 0, 0);
|
||||
}
|
||||
// temp solution - unit can't be teleported by core using spelleffect 5, only players
|
||||
DoTeleportTo(3706.39f, -3969.15f, 35.9118f);
|
||||
|
||||
//begin swimming and summon depth charges
|
||||
Player* player = Unit::GetPlayer(*me, PlayerGUID);
|
||||
if (!player)
|
||||
return;
|
||||
|
||||
SendText(MSG_ESCAPE_NOTICE, player);
|
||||
DoCast(me, SPELL_PERIODIC_DEPTH_CHARGE);
|
||||
me->SetUnitMovementFlags(MOVEMENTFLAG_HOVER | MOVEMENTFLAG_SWIMMING);
|
||||
|
||||
Reference in New Issue
Block a user