diff options
-rw-r--r-- | Changelog-Trunk.txt | 2 | ||||
-rw-r--r-- | src/map/pc.c | 8 | ||||
-rw-r--r-- | src/map/pc.h | 1 | ||||
-rw-r--r-- | src/map/skill.c | 4 |
4 files changed, 14 insertions, 1 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index 9adb358f7..b8e59565d 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -3,6 +3,8 @@ Date Added AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK. +09/06/07 + * Implemented "cooking exp" that increases the success chance of cooking by 0.05% per try and the max bonus is 20%. [Inkfish] 09/06/05 * Job_Battle_Manual and Battle_Manual can be used simultaneously. [Inkfish] * Fixed "sleep" after "attachrid" (a different rid) halts the script. [Inkfish] diff --git a/src/map/pc.c b/src/map/pc.c index b750c582f..6edc70d96 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -971,6 +971,9 @@ int pc_reg_received(struct map_session_data *sd) sd->cashPoints = pc_readaccountreg(sd,"#CASHPOINTS"); sd->kafraPoints = pc_readaccountreg(sd,"#KAFRAPOINTS"); + // Cooking Exp + sd->cooking_attempt = pc_readglobalreg(sd,"COOKING_ATTEMPT"); + if( (sd->class_&MAPID_BASEMASK) == MAPID_TAEKWON ) { // Better check for class rather than skill to prevent "skill resets" from unsetting this sd->mission_mobid = pc_readglobalreg(sd,"TK_MISSION_ID"); @@ -6470,6 +6473,11 @@ int pc_setregistry(struct map_session_data *sd,const char *reg,int val,int type) if( i ) status_calc_pc(sd,0); // Lost the bonus. } + else if( !strcmp(reg,"COOKING_ATTEMPT") && sd->cooking_attempt != val ) + { + val = cap_value(val, 0, 400); + sd->cooking_attempt = val; + } sd_reg = sd->save_reg.global; max = &sd->save_reg.global_num; regmax = GLOBAL_REG_NUM; diff --git a/src/map/pc.h b/src/map/pc.h index 21ae9a094..df6f0ae93 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -177,6 +177,7 @@ struct map_session_data { short skillitem,skillitemlv; short skillid_old,skilllv_old; short skillid_dance,skilllv_dance; + short cooking_attempt; // max: 400 [Inkfish] unsigned char blockskill[MAX_SKILL]; int cloneskill_id; int menuskill_id, menuskill_val; diff --git a/src/map/skill.c b/src/map/skill.c index df46f2212..6dc3a1bf4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10909,7 +10909,9 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in make_per = 1200*(sd->menuskill_val-10) //12% chance per set level. + 1000 - 500*(skill_produce_db[idx].itemlv-10) //10% - 5% per dish level + 20*status->dex + 10*status->luk //0.2% per DEX, 0.1% per LUK - + 1000; //TODO: Replace with MIN(5*COOKINGATTEMPTS;2000) + + 5*sd->cooking_attempt; //+0.05% per try + if( sd->cooking_attempt < 400 ) + pc_setglobalreg(sd, "COOKING_ATTEMPT", sd->cooking_attempt+1); break; } make_per = 5000; |