/*! Sends custom house to client */ static PyObject* wpMulti_sendcustomhouse( wpMulti* self, PyObject* args ) { Q_UNUSED(args); if( !self->pMulti || self->pMulti->free || !self->pMulti->ishouse() ) return PyFalse; if( !checkArgChar( 0 ) ) { PyErr_BadArgument(); return NULL; } P_PLAYER player = dynamic_cast<P_PLAYER>( getArgChar( 0 ) ); if ( !player ) return PyFalse; // self->pMulti->sendCH( player->socket() ); cUOTxAskCustomHouse askch; askch.setSerial( self->pMulti->serial() ); askch.setId( self->pMulti->revision() ); player->socket()->send( &askch ); return PyTrue; }
/* \method socket.sendpaperdoll \description Sends the paperdoll of character to this client. \param char The character whose paperdoll should be sent to the client. */ static PyObject* wpSocket_sendpaperdoll( wpSocket* self, PyObject* args ) { if ( !self->pSock ) return PyFalse(); if ( !checkArgChar( 0 ) ) { PyErr_BadArgument(); return 0; } if ( !getArgChar( 0 ) ) return PyFalse(); self->pSock->sendPaperdoll( getArgChar( 0 ) ); Py_RETURN_NONE; }
/* \method ai.onSpeechInput \param from A <object id="char">char</object> object for the character the text is coming from. \param text A string with the text that should be processed. \description This method sends a text with a given source to the ai engine to proces it. This could be used to force the banker engine to open the bankbox for instance. */ static PyObject* wpAI_onSpeechInput( wpAI* self, PyObject* args ) { if ( !checkArgChar( 0 ) ) return 0; if ( !checkArgStr( 1 ) ) return 0; P_CHAR pc = getArgChar( 0 ); P_PLAYER player = dynamic_cast<P_PLAYER>( pc ); if ( !player ) Py_RETURN_FALSE; QString str = getArgStr( 1 ); self->pAI->onSpeechInput( player, str.upper() ); Py_RETURN_TRUE; }
/* \method account.removecharacter \param player The player that should be removed from this account. \description Removes a player from this account. */ static PyObject* wpAccount_removecharacter( wpAccount* /*self*/, PyObject* args ) { if ( !checkArgChar( 0 ) ) { PyErr_BadArgument(); return 0; } P_PLAYER pChar = dynamic_cast<P_PLAYER>( getArgChar( 0 ) ); if ( pChar ) { pChar->setAccount( 0 ); } Py_RETURN_TRUE; }
/* * Is the player authorized? */ static PyObject* wpMulti_authorized( wpMulti* self, PyObject* args ) { if( self->pMulti->free ) return PyFalse; if( !checkArgChar( 0 ) ) return PyFalse; P_PLAYER pChar = dynamic_cast< P_PLAYER >( getArgChar( 0 ) ); if( pChar ) { return self->pMulti->authorized( pChar ) ? PyTrue : PyFalse; } else { return PyFalse; } }