コード例 #1
0
	static int GetRandomCharacter( T* p, lua_State *L )
	{
		Character *pCharacter = p->GetRandomCharacter();
		if( pCharacter != NULL )
			pCharacter->PushSelf( L );
		else
			lua_pushnil( L );

		return 1;
	}
コード例 #2
0
	static int GetCharacter( T* p, lua_State *L )
	{
		Character *pCharacter = p->GetCharacterFromID(SArg(1));
		if( pCharacter != NULL )
			pCharacter->PushSelf( L );
		else
			lua_pushnil( L );

		return 1;
	}