summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
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;