From e8b9ae9d4fec2d977d0c2927ebc271a62b8673c1 Mon Sep 17 00:00:00 2001 From: RStijn Date: Tue, 7 Apr 2015 00:19:51 +0200 Subject: [PATCH] Added support for GameObject::GetLootRecipient() --- GameObjectMethods.h | 22 ++++++++++++++++++++++ LuaFunctions.cpp | 2 ++ 2 files changed, 24 insertions(+) diff --git a/GameObjectMethods.h b/GameObjectMethods.h index e34242a..16c3389 100644 --- a/GameObjectMethods.h +++ b/GameObjectMethods.h @@ -120,6 +120,28 @@ namespace LuaGameObject return 1; } + /** + * Returns the [Player] that can loot the [GameObject] + * + * @return [Player] player + */ + int GetLootRecipient(Eluna* /*E*/, lua_State* L, GameObject* go) + { + Eluna::Push(L, go->GetLootRecipient()); + return 1; + } + + /** + * Returns the [Group] that can loot the [GameObject] + * + * @return [Group] group + */ + int GetLootRecipientGroup(Eluna* /*E*/, lua_State* L, GameObject* go) + { + Eluna::Push(L, go->GetLootRecipientGroup()); + return 1; + } + /** * Sets the state of a [GameObject] * diff --git a/LuaFunctions.cpp b/LuaFunctions.cpp index 62e5417..00559ed 100644 --- a/LuaFunctions.cpp +++ b/LuaFunctions.cpp @@ -855,6 +855,8 @@ ElunaRegister GameObjectMethods[] = { "GetDisplayId", &LuaGameObject::GetDisplayId }, { "GetGoState", &LuaGameObject::GetGoState }, { "GetLootState", &LuaGameObject::GetLootState }, + { "GetLootRecipient", &LuaGameObject::GetLootRecipient }, + { "GetLootRecipientGroup", &LuaGameObject::GetLootRecipientGroup }, // Setters { "SetGoState", &LuaGameObject::SetGoState },