feat: add Group:GetGroupType() (#82)

This commit is contained in:
Axel Cocat
2022-12-30 00:10:49 +01:00
committed by GitHub
parent 266516305a
commit 67eb2d808d
3 changed files with 47 additions and 13 deletions

View File

@@ -261,6 +261,28 @@ namespace LuaGroup
return 1;
}
/**
* Returns the type of this [Group]
*
* <pre>
* enum GroupType
* {
* GROUPTYPE_NORMAL = 0,
* GROUPTYPE_BG = 1,
* GROUPTYPE_RAID = 2,
* GROUPTYPE_LFG_RESTRICTED = 4,
* GROUPTYPE_LFG = 8
* };
* </pre>
*
* @return [GroupType] groupType
*/
int GetGroupType(lua_State* L, Group* group)
{
Eluna::Push(L, group->GetGroupType());
return 1;
}
/**
* Returns the [Player]'s subgroup ID of this [Group]
*

View File

@@ -1080,6 +1080,7 @@ ElunaRegister<Group> GroupMethods[] =
{ "GetMemberGroup", &LuaGroup::GetMemberGroup },
{ "GetMemberGUID", &LuaGroup::GetMemberGUID },
{ "GetMembersCount", &LuaGroup::GetMembersCount },
{ "GetGroupType", &LuaGroup::GetGroupType },
// Setters
{ "SetLeader", &LuaGroup::SetLeader },