Renewal Weapon MATK boost fix, bugreport:5115
Fixed Renewal DEF (r15051) char/short issue git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15066 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
1810f2efcc
commit
3e9302c1f6
@ -2092,7 +2092,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
|
|||||||
if (!flag.idef || !flag.idef2)
|
if (!flag.idef || !flag.idef2)
|
||||||
{ //Defense reduction
|
{ //Defense reduction
|
||||||
short vit_def;
|
short vit_def;
|
||||||
|
#if RRMODE
|
||||||
|
short def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
||||||
|
#else
|
||||||
signed char def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
signed char def1 = status_get_def(target); //Don't use tstatus->def1 due to skill timer reductions.
|
||||||
|
#endif
|
||||||
short def2 = (short)tstatus->def2;
|
short def2 = (short)tstatus->def2;
|
||||||
|
|
||||||
if( sd )
|
if( sd )
|
||||||
@ -2708,7 +2712,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
* -> statusMATK holds the %Matk modifier stuff from earlier and lastly:
|
* -> statusMATK holds the %Matk modifier stuff from earlier and lastly:
|
||||||
* -> the mdef part is not applied at this point, but later.
|
* -> the mdef part is not applied at this point, but later.
|
||||||
**/ //1:bugreport:5101 //1:bugreport:5101
|
**/ //1:bugreport:5101 //1:bugreport:5101
|
||||||
MATK_ADD((1+sstatus->matk_max) * 2 + 15/10 * sstatus->matk_min + rand()% ( sstatus->matk_max + (1 + (sstatus->matk_max*sstatus->wlv) / 10 * 2 * 10/15 * sstatus->matk_min ) ));
|
MATK_ADD((1+sstatus->matk_max) * 2 + 15/10 * sstatus->matk_min + rand()% ( sstatus->matk_max + (1 + (sstatus->matk_max*sstatus->wlv) / 10 * 2 + 10/15 * sstatus->matk_min ) ));
|
||||||
#else //Ancient MATK Appliance
|
#else //Ancient MATK Appliance
|
||||||
if (sstatus->matk_max > sstatus->matk_min) {
|
if (sstatus->matk_max > sstatus->matk_min) {
|
||||||
MATK_ADD(sstatus->matk_min+rand()%(1+sstatus->matk_max-sstatus->matk_min));
|
MATK_ADD(sstatus->matk_min+rand()%(1+sstatus->matk_max-sstatus->matk_min));
|
||||||
@ -3021,7 +3025,11 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!flag.imdef){
|
if(!flag.imdef){
|
||||||
|
#if RRMODE
|
||||||
|
short mdef = tstatus->mdef;
|
||||||
|
#else
|
||||||
char mdef = tstatus->mdef;
|
char mdef = tstatus->mdef;
|
||||||
|
#endif
|
||||||
int mdef2= tstatus->mdef2;
|
int mdef2= tstatus->mdef2;
|
||||||
if(sd) {
|
if(sd) {
|
||||||
i = sd->ignore_mdef[is_boss(target)?RC_BOSS:RC_NONBOSS];
|
i = sd->ignore_mdef[is_boss(target)?RC_BOSS:RC_NONBOSS];
|
||||||
|
@ -4782,8 +4782,11 @@ struct status_data *status_get_base_status(struct block_list *bl)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#if RRMODE
|
||||||
signed char status_get_def(struct block_list *bl)
|
short status_get_def(struct block_list *bl)
|
||||||
|
#else
|
||||||
|
signed char status_get_def(struct block_list *bl)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct unit_data *ud;
|
struct unit_data *ud;
|
||||||
struct status_data *status = status_get_status_data(bl);
|
struct status_data *status = status_get_status_data(bl);
|
||||||
|
@ -1494,7 +1494,11 @@ int status_get_lv(struct block_list *bl);
|
|||||||
#define status_get_luk(bl) status_get_status_data(bl)->luk
|
#define status_get_luk(bl) status_get_status_data(bl)->luk
|
||||||
#define status_get_hit(bl) status_get_status_data(bl)->hit
|
#define status_get_hit(bl) status_get_status_data(bl)->hit
|
||||||
#define status_get_flee(bl) status_get_status_data(bl)->flee
|
#define status_get_flee(bl) status_get_status_data(bl)->flee
|
||||||
signed char status_get_def(struct block_list *bl);
|
#if RRMODE
|
||||||
|
short status_get_def(struct block_list *bl);
|
||||||
|
#else
|
||||||
|
signed char status_get_def(struct block_list *bl);
|
||||||
|
#endif
|
||||||
#define status_get_mdef(bl) status_get_status_data(bl)->mdef
|
#define status_get_mdef(bl) status_get_status_data(bl)->mdef
|
||||||
#define status_get_flee2(bl) status_get_status_data(bl)->flee2
|
#define status_get_flee2(bl) status_get_status_data(bl)->flee2
|
||||||
#define status_get_def2(bl) status_get_status_data(bl)->def2
|
#define status_get_def2(bl) status_get_status_data(bl)->def2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user