コード例 #1
0
/*!
	Adds an item to this multi.
*/
static PyObject* wpMulti_additem( wpMulti* self, PyObject* args )
{
	if( !self->pMulti || self->pMulti->free )
		return PyFalse;

	if( !checkArgItem( 0 ) )
	{
		PyErr_BadArgument();
		return 0;
	}

	P_ITEM pItem = getArgItem( 0 );

	self->pMulti->addItem( pItem );

	return PyTrue;
}
コード例 #2
0
ファイル: socket.cpp プロジェクト: Mutilador/Wolfpack
/*
	\method socket.sendcontainer
	\description Sends the content and gump of a container to this socket.
	\param container The <object id="ITEM">item</object> object of the container
	that should be sent to the client.
*/
static PyObject* wpSocket_sendcontainer( wpSocket* self, PyObject* args )
{
	if ( !self->pSock )
		return PyFalse();

	if ( !checkArgItem( 0 ) )
	{
		PyErr_BadArgument();
		return 0;
	}

	if ( !getArgItem( 0 ) )
		return PyFalse();

	self->pSock->sendContainer( getArgItem( 0 ) );

	Py_RETURN_NONE;
}
コード例 #3
0
ファイル: socket.cpp プロジェクト: Mutilador/Wolfpack
/*!
	Begins CH customization
*/
static PyObject* wpSocket_customize( wpSocket* self, PyObject* args )
{
	Q_UNUSED( args );
	if ( !self->pSock )
		return PyFalse();

	if ( !checkArgItem( 0 ) )
	{
		PyErr_BadArgument();
		return NULL;
	}
	P_ITEM signpost = getArgItem( 0 );

	cUOTxStartCustomHouse custom;
	custom.setSerial( signpost->getTag( "house" ).toInt() ); // Morex of signpost contain serial of house
	self->pSock->send( &custom );
	Py_RETURN_NONE;
}