示例#1
0
	void CGuildUnifierClientSkel::updateGuild_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CGuildUnifierClientSkel_updateGuild_UG);
		CGuildDesc	guildInfo;
			nlRead(__message, serial, guildInfo);
		updateGuild(sender, guildInfo);
	}
示例#2
0
	void CGuildUnifierClientSkel::guildDeleted_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CGuildUnifierClientSkel_guildDeleted_GD);
		uint32	guildId;
			nlRead(__message, serial, guildId);
		guildDeleted(sender, guildId);
	}
示例#3
0
	void CAdminExecutorServiceClientSkel::serviceCmdNoReturn_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceClientSkel_serviceCmdNoReturn_SCMDNR);
		std::string	command;
			nlRead(__message, serial, command);
		serviceCmdNoReturn(sender, command);
	}
示例#4
0
	void CAdminServiceSkel::highRezGraphUpdate_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminServiceSkel_highRezGraphUpdate_HRGU);
		THighRezDatas	graphDatas;
			nlRead(__message, serial, graphDatas);
		highRezGraphUpdate(sender, graphDatas);
	}
示例#5
0
	void CAdminServiceSkel::upServiceUpdate_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminServiceSkel_upServiceUpdate_USU);
		std::vector < TServiceStatus >	serviceStatus;
			nlRead(__message, serialCont, serviceStatus);
		upServiceUpdate(sender, serviceStatus);
	}
示例#6
0
	void CAdminExecutorServiceSkel::serviceStatusUpdate_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceSkel_serviceStatusUpdate_SSU);
		std::string	status;
			nlRead(__message, serial, status);
		serviceStatusUpdate(sender, status);
	}
示例#7
0
	void CAdminExecutorServiceSkel::graphUpdate_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceSkel_graphUpdate_GU);
		TGraphDatas	graphDatas;
			nlRead(__message, serial, graphDatas);
		graphUpdate(sender, graphDatas);
	}
示例#8
0
	void CChatUnifierClientSkel::recvBroadcastMessage_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CChatUnifierClientSkel_recvBroadcastMessage_CURBM);
		ucstring	message;
			nlRead(__message, serial, message);
		recvBroadcastMessage(sender, message);
	}
示例#9
0
	void CGuildUnifierClientSkel::receiveForeignGuild_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CGuildUnifierClientSkel_receiveForeignGuild_RFG);
		std::vector < CGuildDesc >	guilds;
			nlRead(__message, serialCont, guilds);
		receiveForeignGuild(sender, guilds);
	}
示例#10
0
// ***************************************************************************
void			CVertexStreamManager::unlock(uint numVertices)
{
	H_AUTO( NL3D_VertexStreamManager_unlock )
	nlassert(_InitOk);
	nlassert(_LockDone);
	_VBA.touchVertices (0, numVertices);
	_VBA.unlock ();
}
示例#11
0
	void CGuildUnifierClientSkel::updateMemberInfo_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CGuildUnifierClientSkel_updateMemberInfo_UMI);
		uint32	guildId;
			nlRead(__message, serial, guildId);
		CGuildMemberDesc	membersInfo;
			nlRead(__message, serial, membersInfo);
		updateMemberInfo(sender, guildId, membersInfo);
	}
示例#12
0
	void CAdminExecutorServiceClientSkel::serviceCmd_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceClientSkel_serviceCmd_SCMD);
		uint32	commandId;
			nlRead(__message, serial, commandId);
		std::string	command;
			nlRead(__message, serial, command);
		serviceCmd(sender, commandId, command);
	}
示例#13
0
	void CGuildUnifierClientSkel::updateMemberList_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CGuildUnifierClientSkel_updateMemberList_UML);
		uint32	guildId;
			nlRead(__message, serial, guildId);
		std::vector < CGuildMemberDesc >	members;
			nlRead(__message, serialCont, members);
		updateMemberList(sender, guildId, members);
	}
示例#14
0
	void CAdminExecutorServiceSkel::setShardOrders_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceSkel_setShardOrders_SCO);
		std::string	shardName;
			nlRead(__message, serial, shardName);
		TShardOrders	shardOrders;
			nlRead(__message, serial, shardOrders);
		setShardOrders(sender, shardName, shardOrders);
	}
示例#15
0
	void CAdminExecutorServiceSkel::shutdownShard_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceSkel_shutdownShard_SDS);
		std::string	shardName;
			nlRead(__message, serial, shardName);
		uint32	delay;
			nlRead(__message, serial, delay);
		shutdownShard(sender, shardName, delay);
	}
示例#16
0
	std::auto_ptr<CUseResult>		CConnection::useResult()
	{
		H_AUTO(CConnection_useResult);
		MYSQL_RES *res = mysql_use_result(_MysqlContext);

		std::auto_ptr<CUseResult> sr = std::auto_ptr<CUseResult>(new CUseResult(res));

		return sr;
	}
示例#17
0
	void CWelcomeServiceClientSkel::updateConnectedPlayerCount_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CWelcomeServiceClientSkel_updateConnectedPlayerCount_UCP);
		uint32	nbOnlinePlayers;
			nlRead(__message, serial, nbOnlinePlayers);
		uint32	nbPendingPlayers;
			nlRead(__message, serial, nbPendingPlayers);
		updateConnectedPlayerCount(sender, nbOnlinePlayers, nbPendingPlayers);
	}
示例#18
0
// ***************************************************************************
UAnimationSet			*CDriverUser::createAnimationSet(const std::string &animationSetFile)
{
	H_AUTO( NL3D_Load_AnimationSet )

	NLMISC::CIFile	f;
	// throw exception if not found.
	std::string	path= CPath::lookup(animationSetFile);
	f.open(path);
	return _AnimationSets.insert(new CAnimationSetUser(this, f));
}
示例#19
0
	bool CConnection::query(const std::string &queryString)
	{
		H_AUTO(CConnection_query);
		nlassert(_Connected);

		nldebug("Executing query : [%s%s", queryString.substr(0, 100).c_str(), 100<queryString.size() ? "]" : "");
		for (uint i=100; i<queryString.size(); i+=100)
			nldebug("\t%s%s", queryString.substr(i, 100).c_str(), i+100>queryString.size() ? "]" : "");

		TTime startDate = CTime::getLocalTime();

		int result = mysql_real_query(_MysqlContext, queryString.c_str(), (unsigned long)queryString.size());
		if (result != 0)
		{
			// in all case, we try to reconnect
			int merrno = mysql_errno(_MysqlContext);
			//if (result == CR_SERVER_GONE_ERROR)
			{
				// reconnect and retry the request
				nlinfo("%p Mysql error errno:%d result:%d : %s, try to reconnect...", _MysqlContext, merrno, result, mysql_error(_MysqlContext));
				if (_connect())
					result = mysql_real_query(_MysqlContext, queryString.c_str(), (unsigned long)queryString.size());
				else
				{
					nlwarning("Failed to reopen closed connection to send query '%s'", queryString.c_str());
					if (MSWStrictMode)
					{
						nlstopex(("SQL Strict mode, the above error is fatal"));
					}
					TTime endDate = CTime::getLocalTime();
					MSWRequestDuration = uint32(endDate - startDate);
					return false;
				}
			}

			if (result != 0)
			{
				nlwarning("Mysql error errno:%d result:%d : %s", merrno, result, mysql_error(_MysqlContext));
				nlwarning("   in query '%s':", queryString.c_str());
				if (MSWStrictMode)
				{
					nlstopex(("SQL Strict mode, the above error is fatal"));
				}
				TTime endDate = CTime::getLocalTime();
				MSWRequestDuration = uint32(endDate - startDate);
				return false;
			}
		}

		TTime endDate = CTime::getLocalTime();
		MSWRequestDuration = uint32(endDate - startDate);

		return true;
	}
示例#20
0
	void CWelcomeServiceClientSkel::registerWS_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CWelcomeServiceClientSkel_registerWS_RWS);
		uint32	shardId;
			nlRead(__message, serial, shardId);
		uint32	fixedSessionId;
			nlRead(__message, serial, fixedSessionId);
		bool	isOnline;
			nlRead(__message, serial, isOnline);
		registerWS(sender, shardId, fixedSessionId, isOnline);
	}
示例#21
0
	void CAdminExecutorServiceSkel::controlCmd_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminExecutorServiceSkel_controlCmd_CC);
		uint32	commandId;
			nlRead(__message, serial, commandId);
		std::string	serviceAlias;
			nlRead(__message, serial, serviceAlias);
		std::string	command;
			nlRead(__message, serial, command);
		controlCmd(sender, commandId, serviceAlias, command);
	}
示例#22
0
	void CChatUnifierClientSkel::dynChanBroadcast_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CChatUnifierClientSkel_dynChanBroadcast_CUDCB);
		NLMISC::CEntityId	chanId;
			nlRead(__message, serial, chanId);
		ucstring	senderName;
			nlRead(__message, serial, senderName);
		ucstring	text;
			nlRead(__message, serial, text);
		dynChanBroadcast(sender, chanId, senderName, text);
	}
示例#23
0
	void CChatUnifierClientSkel::universeBroadcast_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CChatUnifierClientSkel_universeBroadcast_CURUB);
		ucstring	senderName;
			nlRead(__message, serial, senderName);
		uint32	senderHomeSession;
			nlRead(__message, serial, senderHomeSession);
		ucstring	text;
			nlRead(__message, serial, text);
		universeBroadcast(sender, senderName, senderHomeSession, text);
	}
示例#24
0
	void CChatUnifierClientSkel::farGuildChat2Ex_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CChatUnifierClientSkel_farGuildChat2Ex_CURFGC2E);
		ucstring	senderName;
			nlRead(__message, serial, senderName);
		uint32	guildId;
			nlRead(__message, serial, guildId);
		uint32	phraseId;
			nlRead(__message, serial, phraseId);
		farGuildChat2Ex(sender, senderName, guildId, phraseId);
	}
示例#25
0
	void CChatUnifierClientSkel::recvFarTellFail_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CChatUnifierClientSkel_recvFarTellFail_CURFTF);
		NLMISC::CEntityId	senderCharId;
			nlRead(__message, serial, senderCharId);
		ucstring	destName;
			nlRead(__message, serial, destName);
		TFailInfo	failInfo;
			nlRead(__message, serial, failInfo);
		recvFarTellFail(sender, senderCharId, destName, failInfo);
	}
示例#26
0
	void CAdminServiceSkel::commandResult_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CAdminServiceSkel_commandResult_CR);
		uint32	commandId;
			nlRead(__message, serial, commandId);
		std::string	serviceAlias;
			nlRead(__message, serial, serviceAlias);
		std::string	result;
			nlRead(__message, serial, result);
		commandResult(sender, commandId, serviceAlias, result);
	}
示例#27
0
	void CGuildUnifierClientSkel::messageToGuildMembers_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CGuildUnifierClientSkel_messageToGuildMembers_MGM);
		uint32	guildId;
			nlRead(__message, serial, guildId);
		std::string	messageName;
			nlRead(__message, serial, messageName);
		TVectorParamCheck	params;
			nlRead(__message, serialCont, params);
		messageToGuildMembers(sender, guildId, messageName, params);
	}
示例#28
0
	void CWelcomeServiceClientSkel::welcomeUserResult_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CWelcomeServiceClientSkel_welcomeUserResult_WUR);
		uint32	userId;
			nlRead(__message, serial, userId);
		bool	ok;
			nlRead(__message, serial, ok);
		std::string	shardAddr;
			nlRead(__message, serial, shardAddr);
		std::string	errorMsg;
			nlRead(__message, serial, errorMsg);
		welcomeUserResult(sender, userId, ok, shardAddr, errorMsg);
	}
示例#29
0
	void CChatUnifierSkel::sendFarTell_skel(NLNET::IModuleProxy *sender, const NLNET::CMessage &__message)
	{
		H_AUTO(CChatUnifierSkel_sendFarTell_CUSFT);
		NLMISC::CEntityId	senderCharId;
			nlRead(__message, serial, senderCharId);
		bool	havePrivilege;
			nlRead(__message, serial, havePrivilege);
		ucstring	destName;
			nlRead(__message, serial, destName);
		ucstring	text;
			nlRead(__message, serial, text);
		sendFarTell(sender, senderCharId, havePrivilege, destName, text);
	}
示例#30
0
// ***************************************************************************
void			CVertexStreamManager::activate()
{
	H_AUTO( NL3D_VertexStreamManager_activate )
	nlassert(_InitOk);
	if (_SupportVolatileVB)
	{
		_Driver->activeVertexBuffer(_VBVolatile);
	}
	else
	{
		_Driver->activeVertexBuffer(_VB[_CurentVB]);
	}
}