summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.c12
-rw-r--r--src/map/pc.h10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index c0f4d47ef..6be974e3b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6839,7 +6839,7 @@ int pc_maxjoblv(const struct map_session_data *sd)
*------------------------------------------*/
//Base exp needed for next level.
-unsigned int pc_nextbaseexp(struct map_session_data *sd)
+unsigned int pc_nextbaseexp(const struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -6850,7 +6850,7 @@ unsigned int pc_nextbaseexp(struct map_session_data *sd)
}
//Base exp needed for this level.
-unsigned int pc_thisbaseexp(struct map_session_data *sd)
+unsigned int pc_thisbaseexp(const struct map_session_data *sd)
{
if ((int)sd->status.base_level > pc->maxbaselv(sd) || sd->status.base_level <= 1) // FIXME
return 0;
@@ -6866,7 +6866,7 @@ unsigned int pc_thisbaseexp(struct map_session_data *sd)
*------------------------------------------*/
//Job exp needed for next level.
-unsigned int pc_nextjobexp(struct map_session_data *sd)
+unsigned int pc_nextjobexp(const struct map_session_data *sd)
{
nullpo_ret(sd);
@@ -6876,7 +6876,7 @@ unsigned int pc_nextjobexp(struct map_session_data *sd)
}
//Job exp needed for this level.
-unsigned int pc_thisjobexp(struct map_session_data *sd)
+unsigned int pc_thisjobexp(const struct map_session_data *sd)
{
if ((int)sd->status.job_level > pc->maxjoblv(sd) || sd->status.job_level <= 1) // FIXME
return 0;
@@ -7984,7 +7984,7 @@ void pc_revive(struct map_session_data *sd,unsigned int hp, unsigned int sp) {
/*==========================================
* script reading pc status registry
*------------------------------------------*/
-int pc_readparam(struct map_session_data* sd,int type)
+int pc_readparam(const struct map_session_data *sd, int type)
{
int val = 0;
@@ -8042,7 +8042,7 @@ int pc_readparam(struct map_session_data* sd,int type)
case SP_VARCASTRATE:
#endif
case SP_CASTRATE:
- val = sd->castrate+=val;
+ val = sd->castrate;
break;
case SP_MAXHPRATE: val = sd->hprate; break;
case SP_MAXSPRATE: val = sd->sprate; break;
diff --git a/src/map/pc.h b/src/map/pc.h
index f3b2c1ff6..a3a7b780d 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -914,10 +914,10 @@ END_ZEROED_BLOCK; /* End */
int (*checkbaselevelup) (struct map_session_data *sd);
int (*checkjoblevelup) (struct map_session_data *sd);
bool (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest);
- unsigned int (*nextbaseexp) (struct map_session_data *sd);
- unsigned int (*thisbaseexp) (struct map_session_data *sd);
- unsigned int (*nextjobexp) (struct map_session_data *sd);
- unsigned int (*thisjobexp) (struct map_session_data *sd);
+ unsigned int (*nextbaseexp) (const struct map_session_data *sd);
+ unsigned int (*thisbaseexp) (const struct map_session_data *sd);
+ unsigned int (*nextjobexp) (const struct map_session_data *sd);
+ unsigned int (*thisjobexp) (const struct map_session_data *sd);
int (*gets_status_point) (int level);
int (*need_status_point) (struct map_session_data *sd,int type,int val);
int (*maxparameterincrease) (struct map_session_data* sd, int type);
@@ -958,7 +958,7 @@ END_ZEROED_BLOCK; /* End */
int (*changelook) (struct map_session_data *sd,int type,int val);
int (*equiplookall) (struct map_session_data *sd);
- int (*readparam) (struct map_session_data *sd,int type);
+ int (*readparam) (const struct map_session_data *sd, int type);
int (*setparam) (struct map_session_data *sd,int type,int val);
int (*readreg) (struct map_session_data *sd, int64 reg);
void (*setreg) (struct map_session_data *sd, int64 reg,int val);