- Joined
- Feb 21, 2012
- Messages
- 285
- Reaction score
- 26
Hello, this be quick.
WorldServer -> CMover:ropItem( CMover* pAttacker )
Next to this if statement:
You see this:
The code should explain it. As to mine, I want it to be max gap of 9 with different drop chance for the item/s and penye. I made it to this:
~Flies awayy
WorldServer -> CMover:ropItem( CMover* pAttacker )
Next to this if statement:
Code:
if( prj.m_EventLua.IsEventSpawnMonster( lpMoverProp->dwID ) )
bAdjDropRate = FALSE;
Code:
if( bAdjDropRate )
{
int d = pAttacker->m_nLevel - (int)lpMoverProp->dwLevel;
if( d <= 1 ) { nProbability = 100; nPenyaRate = 100; }
else if( d <= 2 ) { nProbability = 80; nPenyaRate = 100; }
else if( d <= 4 ) { nProbability = 60; nPenyaRate = 80; }
else if( d <= 7 ) { nProbability = 30; nPenyaRate = 65; }
else { nProbability = 10; nPenyaRate = 50; }
}
The code should explain it. As to mine, I want it to be max gap of 9 with different drop chance for the item/s and penye. I made it to this:
Code:
if (bAdjDropRate) {
static const int values[] = {100, 100, 90, 80, 70, 60, 50, 50, 50, 50};
int d = pAttacker->m_nLevel - (int)lpMoverProp->dwLevel;
nProbability = nPenyaRate = (d >= 1 && d <= 9) ? values[d] : 0;
}
~Flies awayy