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 },