From 2cdf63d45f922268dfc02859169b880f16f5fa1e Mon Sep 17 00:00:00 2001 From: RedSkull-666 <60255796+RedSkull-666@users.noreply.github.com> Date: Thu, 9 Apr 2020 11:07:47 +0200 Subject: [PATCH 1/2] Update GlobalMethods and PlayerMethods Add KickPlayer reason for Trinity --- GlobalMethods.h | 4 ++++ PlayerMethods.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/GlobalMethods.h b/GlobalMethods.h index 6e4db30..26a4e5d 100644 --- a/GlobalMethods.h +++ b/GlobalMethods.h @@ -1926,7 +1926,11 @@ namespace LuaGlobalFunctions int Kick(lua_State* L) { Player* player = Eluna::CHECKOBJ(L, 1); +#ifdef TRINITY + player->GetSession()->KickPlayer("GlobalMethods::Kick Kick the player"); +#else player->GetSession()->KickPlayer(); +#endif return 0; } diff --git a/PlayerMethods.h b/PlayerMethods.h index d8416d0..10e9034 100644 --- a/PlayerMethods.h +++ b/PlayerMethods.h @@ -3629,7 +3629,11 @@ namespace LuaPlayer */ int KickPlayer(lua_State* /*L*/, Player* player) { +#ifdef TRINITY + player->GetSession()->KickPlayer("PlayerMethods::KickPlayer Kick the player"); +#else player->GetSession()->KickPlayer(); +#endif return 0; } From ab4b5eebde34c047ce297cd59a25422067e85247 Mon Sep 17 00:00:00 2001 From: RedSkull-666 <60255796+RedSkull-666@users.noreply.github.com> Date: Thu, 9 Apr 2020 21:51:44 +0200 Subject: [PATCH 2/2] Update CreatureMethods.h --- CreatureMethods.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CreatureMethods.h b/CreatureMethods.h index 68c5b6d..b6d66e4 100644 --- a/CreatureMethods.h +++ b/CreatureMethods.h @@ -423,7 +423,7 @@ namespace LuaCreature */ int GetWanderRadius(lua_State* L, Creature* creature) { -#ifdef TRINITY +#if defined TRINITY || AZEROTHCORE Eluna::Push(L, creature->GetWanderDistance()); #else Eluna::Push(L, creature->GetRespawnRadius());