summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorGepard <Gepard@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-15 09:20:53 +0000
committerGepard <Gepard@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-05-15 09:20:53 +0000
commit6af2f57a569cb3c8949ea84029e169daecf24548 (patch)
tree4671e4ef95c1273513fc1c1ed501f8d5e9eb9c03 /src/map
parentda193f6ae35ba2a1558ddee8e505a07a401c9603 (diff)
downloadhercules-6af2f57a569cb3c8949ea84029e169daecf24548.tar.gz
hercules-6af2f57a569cb3c8949ea84029e169daecf24548.tar.bz2
hercules-6af2f57a569cb3c8949ea84029e169daecf24548.tar.xz
hercules-6af2f57a569cb3c8949ea84029e169daecf24548.zip
* Added support for increased max statistics (parameters) for 3rd classes (regular and baby).
* Updated amounts of status points given at Base Level up for levels over 99. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14823 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h2
-rw-r--r--src/map/pc.c40
-rw-r--r--src/map/pc.h2
4 files changed, 36 insertions, 10 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 11e696a7f..aea2f2da4 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3771,6 +3771,8 @@ static const struct _battle_data {
{ "max_cart_weight", &battle_config.max_cart_weight, 8000, 100, 1000000, },
{ "max_parameter", &battle_config.max_parameter, 99, 10, 10000, },
{ "max_baby_parameter", &battle_config.max_baby_parameter, 80, 10, 10000, },
+ { "max_third_parameter", &battle_config.max_third_parameter, 120, 10, 10000, },
+ { "max_baby_third_parameter", &battle_config.max_baby_third_parameter, 108, 10, 10000, },
{ "max_def", &battle_config.max_def, 99, 0, INT_MAX, },
{ "over_def_bonus", &battle_config.over_def_bonus, 0, 0, 1000, },
{ "skill_log", &battle_config.skill_log, BL_NUL, BL_NUL, BL_ALL, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 58f622321..8d014c5f9 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -236,7 +236,7 @@ extern struct Battle_Config
int max_hp;
int max_sp;
int max_lv, aura_lv;
- int max_parameter, max_baby_parameter;
+ int max_parameter, max_baby_parameter, max_third_parameter, max_baby_third_parameter;
int max_cart_weight;
int skill_log;
int battle_log;
diff --git a/src/map/pc.c b/src/map/pc.c
index f55a77b6a..13e6fae57 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5040,11 +5040,16 @@ int pc_checkbaselevelup(struct map_session_data *sd)
sd->status.base_level ++;
- if (battle_config.use_statpoint_table)
+ //Give status points
+ if (battle_config.use_statpoint_table) //Use values from "db/statpoint.txt"
next = statp[sd->status.base_level] - statp[sd->status.base_level-1];
- else //Estimated way.
- next = (sd->status.base_level+14) / 5 ;
-
+ else //Default increase
+ {
+ if (sd->status.base_level <= 100)
+ next = (sd->status.base_level+14) / 5;
+ else
+ next = (sd->status.base_level+129) / 10;
+ }
sd->status.status_point += next;
} while ((next=pc_nextbaseexp(sd)) > 0 && sd->status.base_exp >= next);
@@ -5365,7 +5370,15 @@ static int pc_setstat(struct map_session_data* sd, int type, int val)
/// Returns the number of stat points needed to raise the specified stat by 1.
int pc_need_status_point(struct map_session_data* sd, int type)
{
- return ( 1 + (pc_getstat(sd,type) + 9) / 10 );
+ int stat = pc_getstat(sd, type);
+
+ if( stat >= pc_maxparameter(sd) )
+ return 0; // Official servers show '0' when max is reached
+
+ if( stat < 100 )
+ return ( 1 + (stat + 9) / 10 );
+ else
+ return ( 16 + 4*((stat - 100) / 5) );
}
/// Raises a stat by 1.
@@ -6598,6 +6611,14 @@ int pc_jobchange(struct map_session_data *sd,int job, int upper)
clif_updatestatus(sd,SP_JOBEXP);
clif_updatestatus(sd,SP_NEXTJOBEXP);
+ //New job may have new max_parameter, so update stat points needed to raise a stat
+ clif_updatestatus(sd,SP_USTR);
+ clif_updatestatus(sd,SP_UAGI);
+ clif_updatestatus(sd,SP_UVIT);
+ clif_updatestatus(sd,SP_UINT);
+ clif_updatestatus(sd,SP_UDEX);
+ clif_updatestatus(sd,SP_ULUK);
+
for(i=0;i<EQI_MAX;i++) {
if(sd->equip_index[i] >= 0)
if(!pc_isequip(sd,sd->equip_index[i]))
@@ -8307,9 +8328,12 @@ int pc_readdb(void)
}
// generate the remaining parts of the db if necessary
statp[0] = 45; // seed value
- for (; i <= MAX_LEVEL; i++)
- statp[i] = statp[i-1] + (i-1+15)/5;
-
+ for (; i <= MAX_LEVEL; i++) {
+ if(i <= 100)
+ statp[i] = statp[i-1] + (i+14)/5;
+ else
+ statp[i] = statp[i-1] + (i+129)/10;
+ }
return 0;
}
diff --git a/src/map/pc.h b/src/map/pc.h
index b6b6fb851..029630eec 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -540,7 +540,7 @@ enum equip_index {
#define pc_isinvisible(sd) ( (sd)->sc.option&OPTION_INVISIBLE )
#define pc_is50overweight(sd) ( (sd)->weight*100 >= (sd)->max_weight*battle_config.natural_heal_weight_rate )
#define pc_is90overweight(sd) ( (sd)->weight*10 >= (sd)->max_weight*9 )
-#define pc_maxparameter(sd) ( (sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter )
+#define pc_maxparameter(sd) ( ((sd)->class_&JOBL_3 ? ((sd)->class_&JOBL_BABY ? battle_config.max_baby_third_parameter : battle_config.max_third_parameter) : ((sd)->class_&JOBL_BABY ? battle_config.max_baby_parameter : battle_config.max_parameter)) )
#define pc_stop_walking(sd, type) unit_stop_walking(&(sd)->bl, type)
#define pc_stop_attack(sd) unit_stop_attack(&(sd)->bl)