Added support for GameObject::GetLootRecipient()

This commit is contained in:
RStijn
2015-04-07 00:19:51 +02:00
committed by Rochet2
parent fdf574955f
commit e8b9ae9d4f
2 changed files with 24 additions and 0 deletions

View File

@@ -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]
*

View File

@@ -855,6 +855,8 @@ ElunaRegister<GameObject> GameObjectMethods[] =
{ "GetDisplayId", &LuaGameObject::GetDisplayId },
{ "GetGoState", &LuaGameObject::GetGoState },
{ "GetLootState", &LuaGameObject::GetLootState },
{ "GetLootRecipient", &LuaGameObject::GetLootRecipient },
{ "GetLootRecipientGroup", &LuaGameObject::GetLootRecipientGroup },
// Setters
{ "SetGoState", &LuaGameObject::SetGoState },