summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-07 03:36:14 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-07 03:36:14 +0000
commite08ebfb66b255385436786db6e95cf9089db25d2 (patch)
tree894241162d630c61618ceb3b7cc83783564d1025 /src/map/pc.c
parentb4ae63a63186b89d9b4012b1bc4e802ca37cb74e (diff)
downloadhercules-e08ebfb66b255385436786db6e95cf9089db25d2.tar.gz
hercules-e08ebfb66b255385436786db6e95cf9089db25d2.tar.bz2
hercules-e08ebfb66b255385436786db6e95cf9089db25d2.tar.xz
hercules-e08ebfb66b255385436786db6e95cf9089db25d2.zip
Implemented "cooking exp" that increases the success chance of cooking by 0.05% per try and the max bonus is 20%.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13854 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c8
1 files changed, 8 insertions, 0 deletions
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;