From 2cedb8c5af5ccd4ccd44c39be81d87952bb1e418 Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Tue, 5 Jun 2018 21:09:42 +0300 Subject: [PATCH] Fix TC build after https://github.com/TrinityCore/TrinityCore/commit/982643cd96790ffc54e7a3e507469649f3b074d2 --- PlayerMethods.h | 9 ++++++--- UnitMethods.h | 8 ++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) 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; }