当前位置: 首页>>代码示例>>C++>>正文


C++ Call_SingleIntegerArg类代码示例

本文整理汇总了C++中Call_SingleIntegerArg的典型用法代码示例。如果您正苦于以下问题:C++ Call_SingleIntegerArg类的具体用法?C++ Call_SingleIntegerArg怎么用?C++ Call_SingleIntegerArg使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Call_SingleIntegerArg类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Handle_InitiateTrade

PyResult TradeService::Handle_InitiateTrade(PyCallArgs &call){

    Call_SingleIntegerArg args;

    if(!args.Decode(&call.tuple)) {
        codelog(CLIENT__ERROR, "%s: failed to decode arguments", call.client->GetName());
        return NULL;
    }

    Client *target = EntityList::FindCharacter( args.arg );

    InitiateTradeRsp rsp;

    rsp.nodeID = PyServiceMgr::GetNodeID();
    rsp.stationID = target->GetStationID();
    rsp.ownerID = call.client->GetCharacterID();
    rsp.targetID = target->GetCharacterID();
    rsp.moneyToGive = 0;
    rsp.moneyToReceive = 0;
    rsp.when = Win32TimeNow();
    rsp.unknown7 = 0;

    SysLog::Debug("Trade Service", "Called InitiateTrade with character: %u", args.arg);

    return rsp.Encode();
}
开发者ID:comet0,项目名称:evemu_server,代码行数:26,代码来源:TradeService.cpp

示例2: Handle_GetContract

PyResult ContractMgrService::Handle_GetContract( PyCallArgs& call )
{
	Call_SingleIntegerArg arg;
	PyDict* _contract = new PyDict;

	if( !arg.Decode( &call.tuple ) )
	{
		codelog(SERVICE__ERROR, "%s: Bad arguments to GetContract in contractMgr", call.client->GetCharacterName() );
		return NULL;
	}

	ContractRef contract = m_contractManager->GetContract( arg.arg );

	if( contract == NULL )
	{
		codelog(SERVICE__ERROR, "%s: Can't get contract %d, got NULL pointer!", call.client->GetCharacterName(), arg.arg );
		return NULL;
	}

	_contract->SetItemString( "items",		contract->GetItemsList() );
	_contract->SetItemString( "bids",		contract->GetBids() );
	_contract->SetItemString( "contract",	contract->GetContractRow() );

	PyObject* res = new PyObject( new PyString( "util.KeyVal" ), _contract );

	return res;
}
开发者ID:adam3696,项目名称:evemu_apocrypha,代码行数:27,代码来源:ContractMgrService.cpp

示例3: Handle_GetPublicInfo

PyResult CorpMgrService::Handle_GetPublicInfo(PyCallArgs &call) {
    Call_SingleIntegerArg corpID;
    if (!corpID.Decode(&call.tuple)) {
        codelog(SERVICE__ERROR, "Bad param");
        return NULL;
    }

    return m_db.GetCorporation(corpID.arg);
}
开发者ID:Ahava,项目名称:evemu_server,代码行数:9,代码来源:CorpMgrService.cpp

示例4: Handle_AssemblyLinesGet

PyResult RamProxyService::Handle_AssemblyLinesGet(PyCallArgs &call) {
    Call_SingleIntegerArg arg;  // containerID

    if(!arg.Decode(&call.tuple)) {
        _log(SERVICE__ERROR, "Unable to decode args.");
        return NULL;
    }

    return(m_db.AssemblyLinesGet(arg.arg));
}
开发者ID:Ahava,项目名称:evemu_server,代码行数:10,代码来源:RamProxyService.cpp

示例5: Handle_GetBlueprintAttributes

PyResult FactoryService::Handle_GetBlueprintAttributes(PyCallArgs &call) {
    Call_SingleIntegerArg arg;
    if(!arg.Decode(&call.tuple)) {
        _log(SERVICE__ERROR, "Failed to decode args.");
        return NULL;
    }

    BlueprintRef b = ItemFactory::GetBlueprint(arg.arg);
    if( !b )
        return NULL;

    return b->GetBlueprintAttributes();
}
开发者ID:comet0,项目名称:evemu_server,代码行数:13,代码来源:FactoryService.cpp

示例6: Handle_MoveToTrashByList

PyResult MailMgrService::Handle_MoveToTrashByList(PyCallArgs &call)
{
    Call_SingleIntegerArg args;
    if (!args.Decode(&call.tuple))
    {
        codelog(CLIENT__ERROR, "Failed to decode MoveToTrashByList args");
        return NULL;
    }

    int listId = args.arg;

    return NULL;
}
开发者ID:Almamu,项目名称:evemu_crucible,代码行数:13,代码来源:MailMgrService.cpp

示例7: Handle_MarkAsUnreadByLabel

PyResult MailMgrService::Handle_MarkAsUnreadByLabel(PyCallArgs &call)
{
    Call_SingleIntegerArg args;
    if (!args.Decode(&call.tuple))
    {
        codelog(CLIENT__ERROR, "Failed to decode MarkAsUnreadByLabel args");
        return NULL;
    }

    int labelId = args.arg;

    return NULL;
}
开发者ID:Almamu,项目名称:evemu_crucible,代码行数:13,代码来源:MailMgrService.cpp

示例8: Handle_DeleteLabel

PyResult MailMgrService::Handle_DeleteLabel(PyCallArgs &call)
{
    Call_SingleIntegerArg args;
    if (!args.Decode(&call.tuple))
    {
        codelog(CLIENT__ERROR, "Failed to decode DeleteLabel args");
        return NULL;
    }

    m_db->DeleteLabel(call.client->GetCharacterID(), args.arg /*labelID*/);

    return NULL;
}
开发者ID:Almamu,项目名称:evemu_crucible,代码行数:13,代码来源:MailMgrService.cpp

示例9: Handle_GetContract

PyResult ContractMgrService::Handle_GetContract( PyCallArgs& call )
{
	Call_SingleIntegerArg arg;
	PyDict* _contract = new PyDict;

	if( !arg.Decode( &call.tuple ) )
	{
		codelog(SERVICE__ERROR, "%s: Bad arguments to GetContract in contractMgr", call.client->GetCharacterName() );
		return NULL;
	}

	// Manual creation of PyPackedRow
	DBRowDescriptor *header = new DBRowDescriptor();
	header->AddColumn( "contractID",			DBTYPE_I4 );
	header->AddColumn( "issuerID",				DBTYPE_I4 );
	header->AddColumn( "issuerCorpID",			DBTYPE_I4 );
	header->AddColumn( "type",					DBTYPE_UI1 );
	header->AddColumn( "availability",			DBTYPE_I4 );
	header->AddColumn( "assigneeID",			DBTYPE_I4 );
	header->AddColumn( "numDays",				DBTYPE_I4 );
	header->AddColumn( "startStationID",		DBTYPE_I4 );
	header->AddColumn( "endStationID",			DBTYPE_I4 );
	header->AddColumn( "startSolarSystemID",	DBTYPE_I4 );
	header->AddColumn( "endSolarSystemID",		DBTYPE_I4 );
	header->AddColumn( "startRegionID",			DBTYPE_I4 );
	header->AddColumn( "endRegionID",			DBTYPE_I4 );
	header->AddColumn( "price",					DBTYPE_CY );
	header->AddColumn( "reward",				DBTYPE_CY );
	header->AddColumn( "collateral",			DBTYPE_CY );
	header->AddColumn( "title",					DBTYPE_WSTR );
	header->AddColumn( "description",			DBTYPE_WSTR );
	header->AddColumn( "forCorp",				DBTYPE_BOOL );
	header->AddColumn( "status",				DBTYPE_UI1 );
	header->AddColumn( "acceptorID",			DBTYPE_I4 );
	header->AddColumn( "dateIssued",			DBTYPE_FILETIME );
	header->AddColumn( "dateExpired",			DBTYPE_FILETIME );
	header->AddColumn( "dateAccepted",			DBTYPE_FILETIME );
	header->AddColumn( "dateCompleted",			DBTYPE_FILETIME );
	header->AddColumn( "volume",				DBTYPE_R8 );
	header->AddColumn( "issuerAllianceID",		DBTYPE_I4 );
	header->AddColumn( "issuerWalletKey",		DBTYPE_I4 );
	header->AddColumn( "acceptorWalletKey",		DBTYPE_I4 );
	header->AddColumn( "crateID",				DBTYPE_I4 );

	ContractRef contract = m_contractManager->GetContract( arg.arg );
	
	uint32 n = 0;

	PyPackedRow* into = new PyPackedRow( header );
	into->SetField( "contractID",			new PyInt(		contract->contractID() ) );
	into->SetField( "issuerID",				new PyInt(		contract->issuerID() ) );
	into->SetField( "issuerCorpID",			new PyInt(		contract->issuerCorpID() ) );
	into->SetField( "type",					new PyInt(		contract->type() ) );
	into->SetField( "availability",			new PyInt(		contract->avail() ) );
	into->SetField( "assigneeID",			new PyInt(		contract->assigneeID() ) );
	into->SetField( "numDays",				new PyInt(		0 ) );
	into->SetField( "startStationID",		new PyInt(		contract->startStationID() ) );
	into->SetField( "endStationID",			new PyInt(		contract->endStationID() ) );
	into->SetField( "startSolarSystemID",   new PyInt(		contract->startSolarSystemID() ) );
	into->SetField( "endSolarSystemID",		new PyInt(		contract->endSolarSystemID() ) );
	into->SetField( "startRegionID",		new PyInt(		contract->startRegionID() ) );
	into->SetField( "endRegionID",			new PyInt(		contract->endRegionID() ) );
	into->SetField( "price",				new PyFloat(	contract->price() ) );
	into->SetField( "reward",				new PyFloat(	contract->reward() ) );
	into->SetField( "collateral",			new PyFloat(	contract->collateral() ) );
	into->SetField( "title",				new PyString(	"title" ) );
	into->SetField( "description",			new PyString(	"description" ) );
	into->SetField( "forCorp",				new PyBool(		contract->forCorp() ) );
	into->SetField( "status",				new PyInt(		contract->status() ) );
	into->SetField( "acceptorID",			new PyInt(		contract->acceptorID() ) );
	into->SetField( "dateIssued",			new PyLong(		contract->dateIssued() ) );
	into->SetField( "dateExpired",			new PyLong(		contract->dateExpired() ) );
	into->SetField( "dateAccepted",			new PyLong(		contract->dateAccepted() ) );
	into->SetField( "dateCompleted",		new PyLong(		contract->dateCompleted() ) );
	into->SetField( "volume",				new PyFloat(	contract->volume() ) );
	into->SetField( "issuerAllianceID",		new PyInt(		contract->issuerAllianceID() ) );
	into->SetField( "issuerWalletKey",		new PyInt(		contract->issuerWalletKey() ) );
	into->SetField( "acceptorWalletKey",	new PyInt(		0 ) );
	into->SetField( "crateID",				new PyInt(		0 ) );

	PyList* itemList = new PyList;

	DBRowDescriptor *itemHeader = new DBRowDescriptor();
	itemHeader->AddColumn( "contractID",						DBTYPE_I4 );
	itemHeader->AddColumn( "itemID",							DBTYPE_I4 );
	itemHeader->AddColumn( "quantity",							DBTYPE_I4 );
	itemHeader->AddColumn( "itemTypeID",						DBTYPE_I4 );
	itemHeader->AddColumn( "inCrate",							DBTYPE_BOOL );
	itemHeader->AddColumn( "parentID",							DBTYPE_I4 );
	itemHeader->AddColumn( "productivityLevel",					DBTYPE_I4 );
	itemHeader->AddColumn( "materialLevel",						DBTYPE_I4 );
	itemHeader->AddColumn( "copy",								DBTYPE_I4 );
	itemHeader->AddColumn( "licensedProductionRunsRemaining",	DBTYPE_I4 );
	itemHeader->AddColumn( "damage",							DBTYPE_R8 );
	itemHeader->AddColumn( "flagID",							DBTYPE_I2 );

	std::map<uint32, ContractGetItemsRef>::const_iterator cur, end;
	std::map<uint32, ContractGetItemsRef> items = contract->items();

	cur = items.begin();
//.........这里部分代码省略.........
开发者ID:LeoVasconcellos,项目名称:evemu_apocrypha,代码行数:101,代码来源:ContractMgrService.cpp


注:本文中的Call_SingleIntegerArg类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。