Example #1
0
//-------------------------------------------------------------------------------------
void Base::onDestroy(bool callScript)																					
{
	if(callScript)
	{
		SCOPED_PROFILE(SCRIPTCALL_PROFILE);
		SCRIPT_OBJECT_CALL_ARGS0(this, const_cast<char*>("onDestroy"));
	}

	if(this->hasDB())
	{
		onCellWriteToDBCompleted(0, -1);
	}
	
	eraseEntityLog();
}
Example #2
0
//-------------------------------------------------------------------------------------
void Base::onDestroy(bool callScript)
{
	setDirty();
	
	if(callScript)
	{
		SCOPED_PROFILE(SCRIPTCALL_PROFILE);
		SCRIPT_OBJECT_CALL_ARGS0(this, const_cast<char*>("onDestroy"));
	}

	if(this->hasDB())
	{
		onCellWriteToDBCompleted(0, -1, -1);
	}
	
	eraseEntityLog();

	// 按照当前的设计来说,有clientMailbox_必定是proxy
	// 至于为何跑到base里来和python本身是C语言实现有关
	if(clientMailbox_)
		static_cast<Proxy*>(this)->kick();
}