2011-07-05 13:41:05 +00:00
|
|
|
#include "../../StdAfx.h"
|
|
|
|
#include "../LuaManager.h"
|
|
|
|
#include "../../Group.h"
|
|
|
|
|
|
|
|
static int Group_BelongsToGroup(lua_State* L)
|
|
|
|
{
|
|
|
|
CGroup* self = (CGroup*)tolua_tousertype(L, 1, 0);
|
|
|
|
const std::wstring group = (const std::wstring)to_wstring(L, 2, 0);
|
|
|
|
bool val = self->BelongsToGroup(group);
|
2011-07-27 10:42:35 +00:00
|
|
|
lua_pushboolean(L, val);
|
2011-07-05 13:41:05 +00:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void LuaManager::RegisterGroup(lua_State* L)
|
|
|
|
{
|
|
|
|
tolua_usertype(L, "CGroup");
|
|
|
|
tolua_cclass(L, "CGroup", "CGroup", "", NULL);
|
|
|
|
|
|
|
|
tolua_beginmodule(L, "CGroup");
|
|
|
|
tolua_function(L, "BelongsToGroup", Group_BelongsToGroup);
|
|
|
|
tolua_endmodule(L);
|
|
|
|
}
|