Fix TC build after 982643cd96

This commit is contained in:
Rochet2
2018-06-05 21:09:42 +03:00
parent f381af970a
commit 2cedb8c5af
2 changed files with 14 additions and 3 deletions

View File

@@ -3301,13 +3301,16 @@ namespace LuaPlayer
float o = Eluna::CHECKVAL<float>(L, 6);
#ifndef TRINITY
if (player->IsTaxiFlying())
#else
if (player->IsInFlight())
#endif
{
player->GetMotionMaster()->MovementExpired();
player->m_taxi.ClearTaxiDestinations();
}
#else
if (player->IsInFlight())
player->FinishTaxiFlight();
else
player->SaveRecallPosition();
#endif
Eluna::Push(L, player->TeleportTo(mapId, x, y, z, o));
return 1;
}

View File

@@ -2060,8 +2060,12 @@ namespace LuaUnit
*/
int MoveExpire(lua_State* L, Unit* unit)
{
#ifdef TRINITY
unit->GetMotionMaster()->Clear();
#else
bool reset = Eluna::CHECKVAL<bool>(L, 2, true);
unit->GetMotionMaster()->MovementExpired(reset);
#endif
return 0;
}
@@ -2072,8 +2076,12 @@ namespace LuaUnit
*/
int MoveClear(lua_State* L, Unit* unit)
{
#ifdef TRINITY
unit->GetMotionMaster()->Clear();
#else
bool reset = Eluna::CHECKVAL<bool>(L, 2, true);
unit->GetMotionMaster()->Clear(reset);
#endif
return 0;
}