本文整理汇总了C++中CItemContainer::SetItemContainer方法的典型用法代码示例。如果您正苦于以下问题:C++ CItemContainer::SetItemContainer方法的具体用法?C++ CItemContainer::SetItemContainer怎么用?C++ CItemContainer::SetItemContainer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItemContainer
的用法示例。
在下文中一共展示了CItemContainer::SetItemContainer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ConvItemStart
BOOL CDbManager::ConvItemStart( void )
{
int nCount = 0;
int nStarted = 0;
DWORD dwMaxConv = 0;
char* szSQL = new char[40960];
char lpString[300];
char lpString1[300];
CQuery* pQueryChar = new CQuery;
CQuery* pQuerySave = new CQuery;
if( ConvItemConnectDB( pQueryChar, pQuerySave ) == FALSE )
return FALSE;
InitConvItemDialog();
AfxMessageBox( "ConvItemStart", MB_OK );
//////////////////////////////////////// Inventory Start ////////////////////////////////////////
if( ( dwMaxConv = GetMaxInventory( szSQL, pQueryChar, pQuerySave ) ) == 0 )
return FALSE;
sprintf( lpString, "%d / %d", 0, dwMaxConv );
UpdateConvItemDialog( "Inventory, Bank", lpString, "0 %%", 0 );
if( CreateInvenBankView( szSQL, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
// Inven, Bank Item 가지고 오기
if( GetInventoryBankView( szSQL, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
while( pQueryChar->Fetch() )
{
++nStarted;
sprintf( lpString, "%d / %d", nStarted, dwMaxConv );
sprintf( lpString1, "%d %", int( float( (float)nStarted / (float)dwMaxConv ) * 100.0f ) );
UpdateConvItemDialog( "Inventory, Bank", lpString, lpString1, (int( float( (float)nStarted / (float)dwMaxConv ) * 100.0f )) );
CMover* pMover = new CMover;
//GetUserInventoryBank( pMover, pQueryChar );
// mirchang_100416 VERIFYSTRING use return value
if( GetUserInventoryBank( pMover, pQueryChar ) == FALSE )
{
safe_delete( pMover );
return FALSE;
}
// mirchang_100416
if( InventoryBankConv( szSQL, pMover, pQueryChar, pQuerySave ) ) // SaveItem
{
if( SaveUserInventoryBank( szSQL, pMover, pQueryChar, pQuerySave ) == FALSE )
{
safe_delete( pMover );
return FALSE;
}
}
safe_delete( pMover );
}
if( DeleteInvenBankView( szSQL, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
//////////////////////////////////////// GuildBank Start ////////////////////////////////////////
nStarted = 0;
if( ( dwMaxConv = GetMaxGuildBank( szSQL, pQueryChar, pQuerySave ) ) == 0 )
return FALSE;
sprintf( lpString, "%d / %d", 0, dwMaxConv );
UpdateConvItemDialog( "GuildBank", lpString, "0 %%", 0 );
if( CreateGuildBankView( szSQL, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
// Inven, Bank Item 가지고 오기
if( GetGuildBankView( szSQL, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
while( pQueryChar->Fetch() )
{
++nStarted;
sprintf( lpString, "%d / %d", nStarted, dwMaxConv );
sprintf( lpString1, "%d %", int( float( (float)nStarted / (float)dwMaxConv ) * 100.0f ) );
UpdateConvItemDialog( "GuildBank", lpString, lpString1, (int( float( (float)nStarted / (float)dwMaxConv ) * 100.0f )) );
CItemContainer<CItemElem> GuildBank; // 길드 창고
int nGuildId = 0;
GuildBank.SetItemContainer( ITYPE_ITEM, MAX_GUILDBANK );
nGuildId = pQueryChar->GetInt( "m_idGuild" );
GetGuildBank( &GuildBank, pQueryChar );
if( GuildBankConv( szSQL, nGuildId, &GuildBank, pQueryChar, pQuerySave ) )
{
if( SaveConvGuildBank( szSQL, nGuildId, &GuildBank, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
}
}
if( DeleteGuildBankView( szSQL, pQueryChar, pQuerySave ) == FALSE )
return FALSE;
SAFE_DELETE( pQueryChar ); SAFE_DELETE( pQuerySave );
return TRUE;
}