database

12/02/2013 20:33 Rhyder'#1
is there anyone have a database of weapon level?

the level of the weapon will back to level 1 after restarting the server.. is there any one here have a database of it? share it to me please...

thanks..
12/02/2013 20:40 Pixelfehler#2
Quote:
Originally Posted by Rhyder' View Post
is there anyone have a database of weapon level?

the level of the weapon will back to level 1 after restarting the server.. is there any one here have a database of it? share it to me please...

thanks..
The exp and lv its save on struct item check your code again
12/03/2013 04:02 Rhyder'#3
Quote:
Originally Posted by Pixelfehler View Post
The exp and lv its save on struct item check your code again
i check it already... but it won't totally save... :3 anything to do with this???

[Only registered and activated users can see links. Click Here To Register...]
12/05/2013 17:50 raventh1984#4
Next time use the search button its already been asked and the answer is also already been given.

Check DbManagerSave.cpp

void CDbManager::SaveOneItem( CItemElem* pItemElem, PItemStruct pItemStruct )
12/05/2013 18:57 Rhyder'#5
Quote:
Originally Posted by raventh1984 View Post
Next time use the search button its already been asked and the answer is also already been given.

Check DbManagerSave.cpp

void CDbManager::SaveOneItem( CItemElem* pItemElem, PItemStruct pItemStruct )
got it :P

Code:
void CDbManager::SaveOneItem( CItemElem* pItemElem, PItemStruct pItemStruct )
{
	char szPiercing[32]		= {0,};

	if( pItemElem->IsEmpty() == FALSE )
	{
#if __VER >= 11 // __MA_VER11_05	// Äɸ¯ÅÍ ºÀÀÎ °Å·¡ ±â´É world,database,neuz
		if( pItemElem->m_dwItemId == II_SYS_SYS_SCR_SEALCHARACTER )
			sprintf( pItemStruct->szItem, "%d,%d,%d,%d,,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/",
					pItemElem->m_dwObjId, pItemElem->m_dwItemId,
					0, 0, 
					pItemElem->m_nItemNum, pItemElem->m_nRepairNumber,
					pItemElem->m_nHitPoint, pItemElem->m_nRepair,
					0, pItemElem->m_byFlag,
					pItemElem->GetSerialNumber(), pItemElem->GetOption(), 
  					pItemElem->m_bItemResist, pItemElem->m_nResistAbilityOption,
  					pItemElem->m_idGuild,
					pItemElem->m_nResistSMItemId
				);
		else
#ifdef __WEAPON_LEVELING
#ifdef	__WEAPON_LEVELING
					sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/",
#else
					sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/",
#endif //__WEAPON_LEVELING
#else
#ifdef	__MODEL_CHANGE
					sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/",			
#else
					sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/",			
#endif //__MODEL_CHANGE
#endif
					pItemElem->m_dwObjId, pItemElem->m_dwItemId,
					0, 0, pItemElem->m_szItemText,
					pItemElem->m_nItemNum, pItemElem->m_nRepairNumber,
					pItemElem->m_nHitPoint, pItemElem->m_nRepair,
					0, pItemElem->m_byFlag,
					pItemElem->GetSerialNumber(), pItemElem->GetOption(), 
  					pItemElem->m_bItemResist, pItemElem->m_nResistAbilityOption,
  					pItemElem->m_idGuild,
					pItemElem->m_nResistSMItemId
#ifdef __WEAPON_LEVELING
					, pItemElem->m_nWeaponLevel
					, pItemElem->m_nWeaponExp
#endif

#ifdef __MODEL_CHANGE
					, pItemElem->m_dwnewID
#endif //__MODEL_CHANGE
				);
#else	//  __MA_VER11_05	// Äɸ¯ÅÍ ºÀÀÎ °Å·¡ ±â´É world,database,neuz
		// item
		sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d/",
				pItemElem->m_dwObjId, pItemElem->m_dwItemId,
				0, 0, pItemElem->m_szItemText,
				pItemElem->m_nItemNum, pItemElem->m_nRepairNumber,
				pItemElem->m_nHitPoint, pItemElem->m_nRepair,
				0, pItemElem->m_byFlag,
				pItemElem->GetSerialNumber(), pItemElem->GetOption(), 
  				pItemElem->m_bItemResist, pItemElem->m_nResistAbilityOption,
  				pItemElem->m_idGuild,
				pItemElem->m_nResistSMItemId
			);
#endif // __MA_VER11_05	// Äɸ¯ÅÍ ºÀÀÎ °Å·¡ ±â´É world,database,neuz

		// ext
#if __VER >= 11 // __SYS_IDENTIFY
		sprintf( pItemStruct->szExt, "%d,%d,%I64d"
#if __VER >= 15 // __PETVIS	
			",%d"
#endif // __PETVIS
			"/", pItemElem->m_bCharged, pItemElem->m_dwKeepTime, pItemElem->GetRandomOptItemId()
#if __VER >= 15 // __PETVIS
			, static_cast<int>( pItemElem->m_bTranformVisPet )
#endif // __PETVIS
			);
#else	// __SYS_IDENTIFY
		sprintf( pItemStruct->szExt, "%d,%d,%d/", pItemElem->m_bCharged, pItemElem->m_dwKeepTime, pItemElem->GetRandomOptItemId() );
#endif	// __SYS_IDENTIFY

		// piercing
#if __VER >= 12 // __EXT_PIERCING
		ItemProp* itemProp = prj.GetItemProp( pItemElem->m_dwItemId );
		if( itemProp && itemProp->IsUltimate() )
		{
			sprintf( pItemStruct->szPiercing, "%d", pItemElem->GetUltimatePiercingSize() );
			for( int nPirecing = 0 ; nPirecing < pItemElem->GetUltimatePiercingSize(); ++nPirecing )
			{
				sprintf( szPiercing, ",%d", pItemElem->GetUltimatePiercingItem( nPirecing ) );
				strncat( pItemStruct->szPiercing, szPiercing, sizeof(szPiercing) );
			}
			if( pItemElem->GetPiercingSize() > 0 )
			{
				sprintf( szPiercing, ",%d", pItemElem->GetPiercingSize() );
				strncat( pItemStruct->szPiercing, szPiercing, sizeof(szPiercing) );
			}
		}
		else
#endif // __EXT_PIERCING
			sprintf( pItemStruct->szPiercing, "%d", pItemElem->GetPiercingSize() );

		for( int nPirecing = 0 ; nPirecing < pItemElem->GetPiercingSize(); ++nPirecing )
		{
			sprintf( szPiercing, ",%d", pItemElem->GetPiercingItem( nPirecing ) );
			strncat( pItemStruct->szPiercing, szPiercing, sizeof(szPiercing) );
		}
#if __VER >= 15 // __PETVIS
		if( pItemElem->IsVisPet() )
		{
			for( nPirecing = 0; nPirecing < pItemElem->GetPiercingSize(); ++nPirecing )
			{
				sprintf( szPiercing, ",%d", pItemElem->GetVisKeepTime( nPirecing ) );
				strncat( pItemStruct->szPiercing, szPiercing, sizeof(szPiercing) );
			}
		}
#endif // __PETVIS
		strcat( pItemStruct->szPiercing, "/" );

		// pet
		if( pItemElem->m_pPet )
		{
			sprintf( pItemStruct->szPet, "1,%d,%d,%d,%d,%d", 
				pItemElem->m_pPet->GetKind(), pItemElem->m_pPet->GetLevel(),
				pItemElem->m_pPet->GetExp(), pItemElem->m_pPet->GetEnergy(),
				pItemElem->m_pPet->GetLife() );
			for( int i = PL_D; i <= pItemElem->m_pPet->GetLevel(); i++ )
			{
				char szAvailLevel[16]	= { 0,};
				sprintf( szAvailLevel, ",%d", pItemElem->m_pPet->GetAvailLevel( i ) );
				strcat( pItemStruct->szPet, szAvailLevel );
			}
#ifdef __PET_1024
			char szTemp[MAX_PET_NAME_FMT+1]		= { 0,};
			char szFmt[MAX_PET_NAME_FMT]	= { 0,};
			SetDBFormatStr( szFmt, MAX_PET_NAME_FMT, pItemElem->m_pPet->GetName() );
			sprintf( szTemp, ",%s", szFmt );
			strcat( pItemStruct->szPet, szTemp );
#endif	// __PET_1024
			strcat( pItemStruct->szPet, "/" );
		}
		else
		{
			sprintf( pItemStruct->szPet, "0/" );
		}
	}
	else
	{
		// item
		ZeroMemory( pItemStruct->szItem, sizeof(pItemStruct->szItem) );
		// ext
		sprintf( pItemStruct->szExt, "%d,%d,%d/", 0, 0, 0 );
		// piercing
		sprintf( pItemStruct->szPiercing, "%d/", 0 );
		// pet
		sprintf( pItemStruct->szPet, "0/" );
	}
}