Пример #1
0
//-------------------------------------------------------------------------------------
InitProgressHandler::InitProgressHandler(Network::NetworkInterface & networkInterface):
Task(),
networkInterface_(networkInterface),
delayTicks_(0)
{
	networkInterface.dispatcher().addTask(this);
}
//-------------------------------------------------------------------------------------
SyncEntityStreamTemplateHandler::SyncEntityStreamTemplateHandler(Network::NetworkInterface & networkInterface):
Task(),
networkInterface_(networkInterface)
{
	networkInterface.dispatcher().addTask(this);

	MemoryStream accountDefMemoryStream;

	ENGINE_COMPONENT_INFO& dbcfg = g_kbeSrvConfig.getDBMgr();

	ScriptDefModule* scriptModule = EntityDef::findScriptModule(dbcfg.dbAccountEntityScriptType);
	if(scriptModule != NULL)
	{
		ScriptDefModule::PROPERTYDESCRIPTION_MAP& propertyDescrs = scriptModule->getPersistentPropertyDescriptions();
		ScriptDefModule::PROPERTYDESCRIPTION_MAP::const_iterator iter = propertyDescrs.begin();

		if(scriptModule->hasCell())
		{
			Vector3 pos, dir;
			ADD_POSDIR_TO_STREAM(accountDefMemoryStream, pos, dir);
		}

		for(; iter != propertyDescrs.end(); ++iter)
		{
			PropertyDescription* propertyDescription = iter->second;
			accountDefMemoryStream << propertyDescription->getUType();
			propertyDescription->addPersistentToStream(&accountDefMemoryStream, NULL);
		}
	}
}
Пример #3
0
//-------------------------------------------------------------------------------------
InitProgressHandler::InitProgressHandler(Network::NetworkInterface & networkInterface):
Task(),
networkInterface_(networkInterface),
delayTicks_(0),
pEntityAutoLoader_(NULL),
autoLoadState_(-1),
error_(false),
baseappReady_(false)
{
	networkInterface.dispatcher().addTask(this);
}