- Implemented SL_SUPERNOVICE erasing the death record 1% of the casts.
- Implemented current exp being capped to the exp required to level up from the previous level when we are at max level (required for some S. Novice buffs) git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@11764 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
53d5219da6
commit
e96015d64b
@ -3,6 +3,11 @@ Date Added
|
|||||||
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
|
||||||
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
||||||
|
|
||||||
|
2007/11/20
|
||||||
|
* Implemented SL_SUPERNOVICE erasing the death record 1% of the casts.
|
||||||
|
* Implemented current exp being capped to the exp required to level up from
|
||||||
|
the previous level when we are at max level (required for some S. Novice
|
||||||
|
buffs) [Skotlex]
|
||||||
2007/11/19
|
2007/11/19
|
||||||
* Nullpo's disabled on release builds.
|
* Nullpo's disabled on release builds.
|
||||||
* Added timestamps to the log of memory leaks.
|
* Added timestamps to the log of memory leaks.
|
||||||
|
53
src/map/pc.c
53
src/map/pc.c
@ -4098,7 +4098,6 @@ int pc_checkbaselevelup(struct map_session_data *sd)
|
|||||||
|
|
||||||
if (!next || sd->status.base_exp < next)
|
if (!next || sd->status.base_exp < next)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
sd->status.base_exp -= next;
|
sd->status.base_exp -= next;
|
||||||
//Kyoki pointed out that the max overcarry exp is the exp needed for the previous level -1. [Skotlex]
|
//Kyoki pointed out that the max overcarry exp is the exp needed for the previous level -1. [Skotlex]
|
||||||
@ -4272,24 +4271,26 @@ int pc_gainexp(struct map_session_data *sd, struct block_list *src, unsigned int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Overflow checks... think we'll ever really need'em? [Skotlex]
|
//Cap exp to the level up requirement of the previous level when you are at max level, otherwise cap at UINT_MAX (this is required for some S. Novice bonuses). [Skotlex]
|
||||||
if (base_exp && sd->status.base_exp > UINT_MAX - base_exp)
|
if (base_exp) {
|
||||||
sd->status.base_exp = UINT_MAX;
|
nextb = nextb?UINT_MAX:pc_thisbaseexp(sd);
|
||||||
else
|
if(sd->status.base_exp > nextb - base_exp)
|
||||||
sd->status.base_exp += base_exp;
|
sd->status.base_exp = nextb;
|
||||||
|
else
|
||||||
|
sd->status.base_exp += base_exp;
|
||||||
|
pc_checkbaselevelup(sd);
|
||||||
|
clif_updatestatus(sd,SP_BASEEXP);
|
||||||
|
}
|
||||||
|
|
||||||
pc_checkbaselevelup(sd);
|
if (job_exp) {
|
||||||
|
nextj = nextj?UINT_MAX:pc_thisjobexp(sd);
|
||||||
clif_updatestatus(sd,SP_BASEEXP);
|
if(sd->status.job_exp > nextj - job_exp)
|
||||||
|
sd->status.job_exp = nextj;
|
||||||
if (job_exp && sd->status.job_exp > UINT_MAX - job_exp)
|
else
|
||||||
sd->status.job_exp = UINT_MAX;
|
sd->status.job_exp += job_exp;
|
||||||
else
|
pc_checkjoblevelup(sd);
|
||||||
sd->status.job_exp += job_exp;
|
clif_updatestatus(sd,SP_JOBEXP);
|
||||||
|
}
|
||||||
pc_checkjoblevelup(sd);
|
|
||||||
|
|
||||||
clif_updatestatus(sd,SP_JOBEXP);
|
|
||||||
|
|
||||||
if(sd->state.showexp){
|
if(sd->state.showexp){
|
||||||
sprintf(output,
|
sprintf(output,
|
||||||
@ -4326,6 +4327,15 @@ unsigned int pc_nextbaseexp(struct map_session_data *sd)
|
|||||||
return exp_table[pc_class2idx(sd->status.class_)][0][sd->status.base_level-1];
|
return exp_table[pc_class2idx(sd->status.class_)][0][sd->status.base_level-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int pc_thisbaseexp(struct map_session_data *sd)
|
||||||
|
{
|
||||||
|
if(sd->status.base_level>pc_maxbaselv(sd) || sd->status.base_level<=1)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return exp_table[pc_class2idx(sd->status.class_)][0][sd->status.base_level-2];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
* job level側必要??値計算
|
* job level側必要??値計算
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
@ -4338,6 +4348,13 @@ unsigned int pc_nextjobexp(struct map_session_data *sd)
|
|||||||
return exp_table[pc_class2idx(sd->status.class_)][1][sd->status.job_level-1];
|
return exp_table[pc_class2idx(sd->status.class_)][1][sd->status.job_level-1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int pc_thisjobexp(struct map_session_data *sd)
|
||||||
|
{
|
||||||
|
if(sd->status.job_level>pc_maxjoblv(sd) || sd->status.job_level<=1)
|
||||||
|
return 0;
|
||||||
|
return exp_table[pc_class2idx(sd->status.class_)][1][sd->status.job_level-2];
|
||||||
|
}
|
||||||
|
|
||||||
/*==========================================
|
/*==========================================
|
||||||
* 必要ステ?タスポイント計算
|
* 必要ステ?タスポイント計算
|
||||||
*------------------------------------------*/
|
*------------------------------------------*/
|
||||||
|
@ -205,7 +205,9 @@ int pc_checkbaselevelup(struct map_session_data *sd);
|
|||||||
int pc_checkjoblevelup(struct map_session_data *sd);
|
int pc_checkjoblevelup(struct map_session_data *sd);
|
||||||
int pc_gainexp(struct map_session_data*,struct block_list*,unsigned int,unsigned int);
|
int pc_gainexp(struct map_session_data*,struct block_list*,unsigned int,unsigned int);
|
||||||
unsigned int pc_nextbaseexp(struct map_session_data *);
|
unsigned int pc_nextbaseexp(struct map_session_data *);
|
||||||
|
unsigned int pc_thisbaseexp(struct map_session_data *);
|
||||||
unsigned int pc_nextjobexp(struct map_session_data *);
|
unsigned int pc_nextjobexp(struct map_session_data *);
|
||||||
|
unsigned int pc_thisjobexp(struct map_session_data *);
|
||||||
int pc_need_status_point(struct map_session_data *,int);
|
int pc_need_status_point(struct map_session_data *,int);
|
||||||
int pc_statusup(struct map_session_data*,int);
|
int pc_statusup(struct map_session_data*,int);
|
||||||
int pc_statusup2(struct map_session_data*,int,int);
|
int pc_statusup2(struct map_session_data*,int,int);
|
||||||
|
@ -4883,6 +4883,13 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
|
|||||||
clif_skill_fail(sd,skillid,0,0);
|
clif_skill_fail(sd,skillid,0,0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (skillid == SL_SUPERNOVICE && dstsd && dstsd->die_counter && !(rand()%100))
|
||||||
|
{ //Erase death count 1% of the casts
|
||||||
|
dstsd->die_counter = 0;
|
||||||
|
pc_setglobalreg(dstsd,"PC_DIE_COUNTER", 0);
|
||||||
|
clif_misceffect2(bl, 0x152);
|
||||||
|
//SC_SPIRIT invokes status_calc_pc for us.
|
||||||
|
}
|
||||||
clif_skill_nodamage(src,bl,skillid,skilllv,
|
clif_skill_nodamage(src,bl,skillid,skilllv,
|
||||||
sc_start4(bl,SC_SPIRIT,100,skilllv,skillid,0,0,skill_get_time(skillid,skilllv)));
|
sc_start4(bl,SC_SPIRIT,100,skilllv,skillid,0,0,skill_get_time(skillid,skilllv)));
|
||||||
sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv));
|
sc_start(src,SC_SMA,100,skilllv,skill_get_time(SL_SMA,skilllv));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user