- Changed the exp tables format.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@5135 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
@@ -1258,12 +1258,12 @@ int charcommand_baselevel(
|
||||
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change base level only lower or same gm level
|
||||
|
||||
if (level > 0) {
|
||||
if (pl_sd->status.base_level == battle_config.max_base_level) { // check for max level by Valaris
|
||||
if (pl_sd->status.base_level == pc_maxbaselv(sd)) { // check for max level by Valaris
|
||||
clif_displaymessage(fd, msg_table[91]); // Character's base level can't go any higher.
|
||||
return 0;
|
||||
} // End Addition
|
||||
if ((unsigned int)level > battle_config.max_base_level || (unsigned int)level > (battle_config.max_base_level - pl_sd->status.base_level)) // fix positiv overflow
|
||||
level = battle_config.max_base_level - pl_sd->status.base_level;
|
||||
if (level > pc_maxbaselv(pl_sd) || level > (pc_maxbaselv(pl_sd)- pl_sd->status.base_level)) // fix positiv overflow
|
||||
level = pc_maxbaselv(pl_sd) - pl_sd->status.base_level;
|
||||
for (i = 1; i <= level; i++)
|
||||
pl_sd->status.status_point += (pl_sd->status.base_level + i + 14) / 5;
|
||||
pl_sd->status.base_level += level;
|
||||
@@ -1279,7 +1279,7 @@ int charcommand_baselevel(
|
||||
clif_displaymessage(fd, msg_table[193]); // Character's base level can't go any lower.
|
||||
return -1;
|
||||
}
|
||||
if (level < -(int)battle_config.max_base_level || level < (1 - (int)pl_sd->status.base_level)) // fix negativ overflow
|
||||
if (level < -(int)pc_maxbaselv(pl_sd) || level < (1 - (int)pl_sd->status.base_level)) // fix negativ overflow
|
||||
level = 1 - pl_sd->status.base_level;
|
||||
if (pl_sd->status.status_point > 0) {
|
||||
for (i = 0; i > level; i--)
|
||||
@@ -1316,7 +1316,6 @@ int charcommand_joblevel(
|
||||
const char* command, const char* message)
|
||||
{
|
||||
struct map_session_data *pl_sd;
|
||||
unsigned int max_level = battle_config.max_job_level;
|
||||
char player[NAME_LENGTH];
|
||||
int level = 0;
|
||||
//転生や養子の場合の元の職業を算出する
|
||||
@@ -1329,20 +1328,13 @@ int charcommand_joblevel(
|
||||
|
||||
if ((pl_sd = map_nick2sd(player)) != NULL) {
|
||||
if (pc_isGM(sd) >= pc_isGM(pl_sd)) { // you can change job level only lower or same gm level
|
||||
if ((pl_sd->class_&MAPID_UPPERMASK) == MAPID_NOVICE)
|
||||
max_level = 10; //Novice
|
||||
else if ((pl_sd->class_&MAPID_BASEMASK) == MAPID_NOVICE)
|
||||
max_level = battle_config.max_sn_level; //S. Novice
|
||||
else if (pl_sd->class_&JOBL_UPPER && pl_sd->class_&JOBL_2)
|
||||
max_level = battle_config.max_adv_level; //Adv. Class
|
||||
|
||||
if (level > 0) {
|
||||
if (pl_sd->status.job_level == max_level) {
|
||||
if (pl_sd->status.job_level == pc_maxjoblv(pl_sd)) {
|
||||
clif_displaymessage(fd, msg_table[67]); // Character's job level can't go any higher.
|
||||
return -1;
|
||||
}
|
||||
if (pl_sd->status.job_level + level > max_level)
|
||||
level = max_level - pl_sd->status.job_level;
|
||||
if (pl_sd->status.job_level + level > pc_maxjoblv(pl_sd))
|
||||
level = pc_maxjoblv(pl_sd) - pl_sd->status.job_level;
|
||||
pl_sd->status.job_level += level;
|
||||
clif_updatestatus(pl_sd, SP_JOBLEVEL);
|
||||
clif_updatestatus(pl_sd, SP_NEXTJOBEXP);
|
||||
|
||||
Reference in New Issue
Block a user