
Originally Posted by
PiECLOUD
go to gmmng.cpp
search for
Code:
case COMMAND_ADDCOM:
the function should look like this
Code:
case COMMAND_ADDCOM: {
int iPoints = this->GetTokenNumber();
// ----
if( lpObj->Class != CLASS_DARKLORD )
{
return FALSE;
}
// ----
if( lpObj->Leadership + iPoints > g_MaxStat )
{
GCServerMsgStringSend("You can't add more stats", lpObj->m_Index, 1);
return FALSE;
}
// ----
if( iPoints == NULL )
{
GCServerMsgStringSend("Error in syntax of command", lpObj->m_Index, 1);
return FALSE;
}
// ----
if( lpObj->LevelUpPoint < iPoints || iPoints < 1 )
{
GCServerMsgStringSend("Not enough points to add", lpObj->m_Index, 1);
return FALSE;
}
// ----
lpObj->Leadership += iPoints;
lpObj->LevelUpPoint -= iPoints;
// ----
GCReFillSend(aIndex, (int)lpObj->MaxLife + lpObj->AddLife, 0xFE, 0, lpObj->iMaxShield + lpObj->iAddShield);
gObjSetBP(aIndex);
GCManaSend(aIndex,(int)lpObj->MaxMana + lpObj->AddMana, 0xFE, 0, lpObj->MaxBP + lpObj->AddBP);
gObjCalCharacter(aIndex);
UpdateCharInfo(aIndex);
// ----
return TRUE;
}
break;