|
You last visited: Today at 18:21
Advertisement
Custom Grade Item
Discussion on Custom Grade Item within the Flyff Private Server forum part of the Flyff category.
07/10/2016, 19:26
|
#1
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
Custom Grade Item
Hi,
I'm here to ask for help after 2 days of search and fixing for the Custom grade Item system released buy Avalion.
I fixed the database saving problem, the +0% problem but there is one last thing who happens and its pretty strange.
If i drop one item with bonus for exemple :
+50 DEX
+50 STR
And then i restart the server, values will change. I looked into database on INVENTORY_TBL and values just swap place. Like that :
Good bonus (The real one dropped on server)
0,199,0,0,,1,0,7200000,0,0,0,-1036260812,0,0,0,0,0,2,185017091,460553,0,0
Wrong bonus (The one who is used when i restart the server)
0,199,0,0,,1,0,7200000,0,0,0,-1036260812,0,0,0,0,0,2,460553,185017091,0,0
And if i restart more than once, if i'm lucky, values just swap back and goes in the good position, and the bonus are correct again.
Do you know what's wrong with this ?
Thanks alot =)
Sorry for my bad english i'm belgium :/
|
|
|
07/10/2016, 22:08
|
#2
|
elite*gold: 0
Join Date: Jan 2015
Posts: 183
Received Thanks: 699
|
Check your GetOneItem and SaveOneItem function.
|
|
|
07/10/2016, 22:56
|
#3
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
Everything seems good =/
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 )
#if __VER >= 19
sprintf( pItemStruct->szItem, "%d,%d,%d,%d,,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d" ,
#else
sprintf( pItemStruct->szItem, "%d,%d,%d,%d,,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d ,%d/",
#endif
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
#if __VER >= 19
sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% d"
#ifdef __ITEMGRADE
",%d,%d,%I64d"
#endif
#ifdef __OLD_NEW_GLOW_V2
",%d"
#endif // __OLD_NEW_GLOW_V2
#ifdef __BLING_BLING
",%d"
#endif
#ifdef __MODEL_CHANGE
",%d"
#endif // __MODEL_CHANGE
"/",
#else
sprintf( pItemStruct->szItem, "%d,%d,%d,%d,%s,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,% d/",
#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 __ITEMGRADE
, pItemElem->nGetGrade()
, pItemElem->GetItemGradeMain()
, pItemElem->GetItemGradeOpt()
#endif
#ifdef __OLD_NEW_GLOW_V2
, pItemElem->m_nNewGlow
#endif // __OLD_NEW_GLOW_V2
#ifdef __BLING_BLING
, pItemElem->m_nReflect
#endif
#ifdef __MODEL_CHANGE
, pItemElem->m_dwnewID
#endif // __MODEL_CHANGE
);
int CDbManager::GetOneItem( CItemElem* pItemElem, char* pstrItem, int *pLocation )
{
int IndexItem = 0;
IndexItem = GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_dwItemId = (DWORD)GetIntPaFromStr( pstrItem, pLocation );
BOOL bEquip = GetIntPaFromStr( pstrItem, pLocation );
int nTrade = GetIntPaFromStr( pstrItem, pLocation );
GetStrPaFromStr( pstrItem, pItemElem->m_szItemText, pLocation );
pItemElem->m_nItemNum = GetIntPaFromStr( pstrItem, pLocation );
if( CheckValidItem( pItemElem->m_dwItemId, pItemElem->m_nItemNum ) == FALSE )
pItemElem->m_nItemNum = 1;
pItemElem->m_nRepairNumber = (BYTE)GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_nHitPoint = GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_nRepair = GetIntPaFromStr( pstrItem, pLocation );
int nMaterial = GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_byFlag = (BYTE)GetIntPaFromStr( pstrItem, pLocation );
pItemElem->SetSerialNumber( GetSerialNumberPaFromStr( pstrItem, pLocation ) );
pItemElem->SetOption( GetIntPaFromStr( pstrItem, pLocation ) );
pItemElem->m_bItemResist = (BYTE)GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_nResistAbilityOption = GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_idGuild = (u_long)GetIntPaFromStr( pstrItem, pLocation );
pItemElem->m_nResistSMItemId = GetIntPaFromStr( pstrItem, pLocation );
#ifdef __ITEMGRADE
pItemElem->nSetGrade(GetIntPaFromStr(pstrItem, pLocation));
pItemElem->SetItemGradeMain(GetIntPaFromStr(pstrItem, pLocation));
pItemElem->SetItemGradeOpt(GetInt64PaFromStr(pstrItem, pLocation));
#endif
// #ifdef __WEAPON_MERGE
// if( pItemElem->IsMerged() )
// {
// pItemElem->SetMergedRandomOptItemId(GetInt64PaFromStr( pstrItem, pLocation ));
// pItemElem->SetMergedWeaponATK(GetIntPaFromStr( pstrItem, pLocation ));
// }
// #endif
pItemElem->m_dwObjId = IndexItem;
#if __VER >= 11 // __MA_VER11_05 // 케릭터 봉인 거래 기능 world,database,neuz
if( pItemElem->m_dwItemId == II_SYS_SYS_SCR_SEALCHARACTER )
{
#if __VER >= 11 // __SYS_PLAYER_DATA
CPlayerDataCenter::GetInstance()->m_Access.Enter();
const char* lpszPlayer = CPlayerDataCenter::GetInstance()->GetPlayerString( pItemElem->m_nHitPoint );
#else // __SYS_PLAYER_DATA
LPCSTR lpszPlayer = prj.GetPlayerString( pItemElem->m_nHitPoint );
#endif // __SYS_PLAYER_DATA
if( lpszPlayer != NULL)
memcpy(pItemElem->m_szItemText,lpszPlayer,sizeof(pItemElem->m_szItemText));
#if __VER >= 11 // __SYS_PLAYER_DATA
CPlayerDataCenter::GetInstance()->m_Access.Leave();
#endif // __SYS_PLAYER_DATA
}
#endif // __MA_VER11_05 // 케릭터 봉인 거래 기능 world,database,neuz
#ifdef __OLD_NEW_GLOW_V2
pItemElem->m_nNewGlow = GetIntPaFromStr( pstrItem, pLocation );
if( pItemElem->m_nNewGlow < FALSE )
pItemElem->m_nNewGlow = NULL;
else
if( pItemElem->m_nNewGlow > TRUE )
pItemElem->m_nNewGlow = NULL;
#endif // __OLD_NEW_GLOW_V2
// #ifdef __BLING_BLING
// pItemElem->m_nReflect = GetIntPaFromStr( pstrItem, pLocation );
// if( pItemElem->m_nReflect < FALSE )
// pItemElem->m_nReflect = NULL;
// else
// if( pItemElem->m_nReflect > TRUE )
// pItemElem->m_nReflect = NULL;
// #endif
#ifdef __MODEL_CHANGE
pItemElem->m_dwnewID = GetIntPaFromStr( pstrItem, pLocation);
ItemProp * pItemProp = prj.GetItemProp( pItemElem->m_dwnewID);
if(!pItemProp)
{
pItemElem->m_dwnewID = NULL;
}
else if(pItemElem->m_dwnewID == NULL_ID)
{
pItemElem->m_dwnewID = NULL;
}
#endif
++*pLocation;
return IndexItem;
}
|
|
|
07/12/2016, 01:17
|
#4
|
elite*gold: 0
Join Date: Apr 2011
Posts: 91
Received Thanks: 10
|
UP !
|
|
|
|
Similar Threads
|
[Help] Item drop/grade/&co.
11/28/2014 - Shaiya PServer Development - 5 Replies
Yes, another thread like that XD.
First off, this is my first thread in this forum and I want to thank the community for all the usefull info about the game. I don't usually ask anything 'cuz many answers are already given here and there, I just put all of them together and made a working EP4.5 server on my own.
Thank you all.
Back to the topic.
I changed mob drops with ShStudio, planning a think like the following:
- Grade 1: items that every mob always drop with 50% rate (lapisia,...
|
Skyline Online 110 Cap // +10 Egypt b grade item / Free Silk / PVP SERVER /
03/15/2014 - SRO PServer Advertising - 9 Replies
Hello all
Start level : 110
Added npc items :
http://img493.yukle.tc/thumbs/6981.JPG
http://img493.yukle.tc/thumbs/23712.JPG
http://img493.yukle.tc/thumbs/32123.JPG
|
Duping S grade crystals or any item
12/31/2006 - Lineage 2 - 1 Replies
i have hlapex, nice program, woring fine until i find this server that hlapex doesn't work on so i have to gather 5kk crystals S grade to get a nice skill on the server now i have a couple of crystals and i need a duping item hack, program or method, pls or the hlapex code for S grade crystals, maybe i got it wrong :D thx!
|
All times are GMT +2. The time now is 18:21.
|
|