I just decided to create a "unique drop system" such that items dropping are statted with different kind of stats. I increased and edited the number of available kind of stats up to 773 types.
The problem is that not all of those can be dropped. I edited the randomly chosen
DWORD dwRandom = xRandom(3000000000);
in the function GenRandomOptItem of Project.cpp to
DWORD dwRandom = xRandom(773);
The last stat i dropped has got ID 257.
Maybe you have an idea to help me out.
Greetz
This is the important part of LoadPiercingAvail:
else if( s.Token == _T( "RandomOptItem" ) )
{
RANDOMOPTITEM randomOptItem;
randomOptItem.nId = s.GetNumber();
s.GetToken();
lstrcpy( randomOptItem.pszString, s.Token );
randomOptItem.nLevel = s.GetNumber();
randomOptItem.dwProbability = s.GetNumber();
s.GetToken(); // {
int nDstParam = s.GetNumber();
while( *s.token != '}' )
{
int nAdjParam = s.GetNumber();
randomOptItem.ia.anDstParam[randomOptItem.ia.nSize] = nDstParam;
randomOptItem.ia.anAdjParam[randomOptItem.ia.nSize] = nAdjParam;
randomOptItem.ia.nSize++;
nDstParam = s.GetNumber();
}
CRandomOptItemGen::GetInstance()->AddRandomOption( &randomOptItem );
}
s.GetToken();
And here is the last entry of propItemEtc.inc:
RandomOptItem 773 IDS_PROPITEMETC_INC_000130 1 500000
{
DST_PVP_DMG_RATE 10
}
I really need help
Greetz
Push






