diff --git a/PlayerMethods.h b/PlayerMethods.h index 2e22ce9..01896d9 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -3301,13 +3301,16 @@ namespace LuaPlayer float o = Eluna::CHECKVAL(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; } diff --git a/UnitMethods.h b/UnitMethods.h index 3855012..21cbe45 100644 --- a/UnitMethods.h +++ b/UnitMethods.h @@ -2060,8 +2060,12 @@ namespace LuaUnit */ int MoveExpire(lua_State* L, Unit* unit) { +#ifdef TRINITY + unit->GetMotionMaster()->Clear(); +#else bool reset = Eluna::CHECKVAL(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(L, 2, true); unit->GetMotionMaster()->Clear(reset); +#endif return 0; }