summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-28 16:47:19 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-28 16:47:19 +0000
commita69dd0853debc38b7e83e460fb94b21661dea9f8 (patch)
tree2e36587eccb302b9f12ae21d4230bdd73db9c231 /src/map
parent229fb46f2c42aaf6a1977d122122af4b641b3819 (diff)
downloadhercules-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')
-rw-r--r--src/map/skill.c10
-rw-r--r--src/map/skill.h2
2 files changed, 7 insertions, 5 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]);
}
diff --git a/src/map/skill.h b/src/map/skill.h
index 0619088d8..90622b9ba 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -109,7 +109,7 @@ enum {
// アイテム作成デ?タベ?ス
struct skill_produce_db {
int nameid, trigger;
- int req_skill,itemlv;
+ int req_skill,req_skill_lv,itemlv;
int mat_id[MAX_PRODUCE_RESOURCE],mat_amount[MAX_PRODUCE_RESOURCE];
};
extern struct skill_produce_db skill_produce_db[MAX_SKILL_PRODUCE_DB];