Hello everybody okay? I'm trying to make a change in bonus attribute that a character gets to evolve to a certain level of job.
I tried to make the following changes in job_db2:
JobLVL 1: str +2 vit +1, dex +1
JobLVL 2: str +1, vit +1
So the character would get the total: +3 str, vit +2, dex +1, in joblvl 2.
In practice I want to add more than one attribute per class level.
More than one attribute per column "joblvl"
I was in src> map> status.c and found this:
static char job_bonus[CLASS_COUNT][MAX_LEVEL];
// Job bonuses
index = pc_class2idx(sd->status.class_);
for(i=0;i<(int)sd->status.job_level && i<MAX_LEVEL;i++){
if(!job_bonus[index][i])
continue;
switch(job_bonus[index][i]) {
case 1: status->str++; break;
case 2: status->agi++; break;
case 3: status->vit++; break;
case 4: status->int_++; break;
case 5: status->dex++; break;
case 6: status->luk++; break;
}
}
static bool status_readdb_job2(char* fields[], int columns, int current)
{
int idx, class_, i;
class_ = atoi(fields[0]);
if(!pcdb_checkid(class_))
{
ShowWarning("status_readdb_job2: Classe invalida %d especificada.\n", class_);
return false;
}
idx = pc_class2idx(class_);
for(i = 1; i < columns; i++)
{
job_bonus[idx][i-1] = atoi(fields[i]);
}
return true;
}
// job_db2.txt
memset(job_bonus,0,sizeof(job_bonus)); // Job-specific stats bonus
// read databases
sv_readdb(db_path, "job_db2.txt", ',', 1, 1+MAX_LEVEL, -1, &status_readdb_job2);
PS: Sorry my English, I'm using google translator.