From e1d151b86204e53e04e8ec3d971faf1fa944d3cc Mon Sep 17 00:00:00 2001 From: Rochet2 Date: Wed, 2 Jan 2019 13:17:46 +0200 Subject: [PATCH] Fix TC build --- PlayerMethods.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PlayerMethods.h b/PlayerMethods.h index fa88dd1..b3ac38b 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -1,4 +1,4 @@ -/* +/* * Copyright (C) 2010 - 2016 Eluna Lua Engine * This program is free software licensed under GPL version 3 * Please see the included DOCS/LICENSE.md for more information @@ -2338,15 +2338,19 @@ namespace LuaPlayer } /** - * Sends a trainer window to the [Player] from the [WorldObject] specified + * Sends a trainer window to the [Player] from the [Creature] specified * - * @param [WorldObject] sender + * @param [Creature] sender */ int SendTrainerList(lua_State* L, Player* player) { - WorldObject* obj = Eluna::CHECKOBJ(L, 2); + Creature* obj = Eluna::CHECKOBJ(L, 2); +#ifdef TRINITY + player->GetSession()->SendTrainerList(obj); +#else player->GetSession()->SendTrainerList(obj->GET_GUID()); +#endif return 0; }