diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-28 16:47:19 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-08-28 16:47:19 +0000 |
commit | a69dd0853debc38b7e83e460fb94b21661dea9f8 (patch) | |
tree | 2e36587eccb302b9f12ae21d4230bdd73db9c231 /src/map/skill.c | |
parent | 229fb46f2c42aaf6a1977d122122af4b641b3819 (diff) | |
download | hercules-a69dd0853debc38b7e83e460fb94b21661dea9f8.tar.gz hercules-a69dd0853debc38b7e83e460fb94b21661dea9f8.tar.bz2 hercules-a69dd0853debc38b7e83e460fb94b21661dea9f8.tar.xz hercules-a69dd0853debc38b7e83e460fb94b21661dea9f8.zip |
- Changed the produce_db format, now there's a skill-lv column right after the skill-id column to specify required skill-level to craft this item.
- Modified the skill produce_db code to take into account the new skill-lv requirement.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8523 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 75283e2bb..90d996361 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10308,7 +10308,8 @@ int skill_can_produce_mix (struct map_session_data *sd, int nameid, int trigger, return 0; } } - if( (j=skill_produce_db[i].req_skill)>0 && pc_checkskill(sd,j)<=0 ) + if((j=skill_produce_db[i].req_skill)>0 && + pc_checkskill(sd,j) < skill_produce_db[i].req_skill_lv) return 0; for(j=0;j<MAX_PRODUCE_RESOURCE;j++){ @@ -11333,12 +11334,12 @@ int skill_readdb (void) } k=0; while(fgets(line,1020,fp)){ - char *split[6 + MAX_PRODUCE_RESOURCE * 2]; + char *split[7 + MAX_PRODUCE_RESOURCE * 2]; int x,y; if(line[0]=='/' && line[1]=='/') continue; malloc_tsetdword(split,0,sizeof(split)); - j = skill_split_str(line,split,(3 + MAX_PRODUCE_RESOURCE * 2)); + j = skill_split_str(line,split,(4 + MAX_PRODUCE_RESOURCE * 2)); if(split[0]==0) //fixed by Lupus continue; i=atoi(split[0]); @@ -11347,8 +11348,9 @@ int skill_readdb (void) skill_produce_db[k].nameid=i; skill_produce_db[k].itemlv=atoi(split[1]); skill_produce_db[k].req_skill=atoi(split[2]); + skill_produce_db[k].req_skill_lv=atoi(split[3]); - for(x=3,y=0; split[x] && split[x+1] && y<MAX_PRODUCE_RESOURCE; x+=2,y++){ + for(x=4,y=0; split[x] && split[x+1] && y<MAX_PRODUCE_RESOURCE; x+=2,y++){ skill_produce_db[k].mat_id[y]=atoi(split[x]); skill_produce_db[k].mat_amount[y]=atoi(split[x+1]); } |