Py_INCREF( Py_None ); source = Py_None;
Py_RETURN_NONE;
static PyObject* wpChar_dispel( wpChar* self, PyObject* args ){	if ( !self->pChar || self->pChar->free )		return PyFalse();	// We now have the list of effects applied to pChar	// Now check if we force dispelling and only have two arguments	if ( PyTuple_Size( args ) == 0 )	{		Timers::instance()->dispel( self->pChar, 0, false );	}	else	{		// Iterate trough the list of tempeffects		cBaseChar::TimerContainer effects = self->pChar->timers();		P_CHAR pSource = getArgChar( 0 );		bool force = checkArgInt( 1 ) && ( getArgInt( 1 ) != 0 );		QString dispelid;		PyObject* dispelargs = 0;		if ( checkArgStr( 2 ) )			dispelid = getArgStr( 2 );		if ( PyTuple_Size( args ) > 3 && PyList_Check( PyTuple_GetItem( args, 3 ) ) )			dispelargs = PyList_AsTuple( PyTuple_GetItem( args, 3 ) );		if ( !dispelargs )			dispelargs = PyTuple_New( 0 );		if ( cPythonScript::canChainHandleEvent( EVENT_DISPEL, self->pChar->getEvents() ) )		{			PyObject* source;			if ( pSource )			{				source = pSource->getPyObject();			}			else			{				Py_INCREF( Py_None );				source = Py_None;			}			const char* ptype = "";			if ( !dispelid.isEmpty() )			{				ptype = dispelid.latin1();			}			PyObject* args = Py_BuildValue( "(NNBBsN", self->pChar->getPyObject(), source, 0, force ? 1 : 0, ptype, dispelargs );			bool result = cPythonScript::callChainedEventHandler( EVENT_DISPEL, self->pChar->getEvents(), args );			Py_DECREF( args );			if ( result )			{				Py_INCREF( Py_None );				return Py_None;			}		}		for ( uint i = 0; i < effects.size(); ++i )		{			// No python effect, but we are forcing.			if ( ( force || effects[i]->dispellable ) && dispelid.isNull() && effects[i]->objectID() != "cPythonEffect" )			{				effects[i]->Dispel( pSource, false );				self->pChar->removeTimer( effects[i] );				Timers::instance()->erase( effects[i] );			}			// We are dispelling everything and this is a python effect			else if ( ( force || effects[i]->dispellable ) && dispelid.isNull() && effects[i]->objectID() == "cPythonEffect" )			{				// At least use the specific dispel function				cPythonEffect* pEffect = dynamic_cast<cPythonEffect*>( effects[i] );				if ( pEffect )				{					pEffect->Dispel( pSource, dispelargs );					self->pChar->removeTimer( effects[i] );					Timers::instance()->erase( effects[i] );				}			}			// We are dispelling specific python effects			else if ( ( force || effects[i]->dispellable ) && effects[i]->objectID() == "cPythonEffect" && !dispelid.isNull() )			{				cPythonEffect* pEffect = dynamic_cast<cPythonEffect*>( effects[i] );				if ( pEffect && pEffect->dispelId() == dispelid )				{					pEffect->Dispel( pSource, dispelargs );					self->pChar->removeTimer( effects[i] );					Timers::instance()->erase( effects[i] );				}			}		}	}	Py_INCREF( Py_None );	return Py_None;}