summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-11 23:44:35 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-12-11 23:44:35 +0000
commit290a5c8b93c7361c80e8328197c5a25dcf5aebce (patch)
treeecfe6ef0b394d48b8225531c722458dae1cc9f2d /src/map/battle.c
parent415e738feb188909dea60831aef07c4fb0fe0f17 (diff)
downloadhercules-290a5c8b93c7361c80e8328197c5a25dcf5aebce.tar.gz
hercules-290a5c8b93c7361c80e8328197c5a25dcf5aebce.tar.bz2
hercules-290a5c8b93c7361c80e8328197c5a25dcf5aebce.tar.xz
hercules-290a5c8b93c7361c80e8328197c5a25dcf5aebce.zip
Renewal Weapon MATK boost fix, bugreport:5115
Fixed Renewal DEF (r15051) char/short issue git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15066 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 8b0aa22fb..0df68a572 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2092,7 +2092,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (!flag.idef || !flag.idef2)
{ //Defense reduction
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.
+#endif
short def2 = (short)tstatus->def2;
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:
* -> the mdef part is not applied at this point, but later.
**/ //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
if (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 RRMODE
+ short mdef = tstatus->mdef;
+#else
char mdef = tstatus->mdef;
+#endif
int mdef2= tstatus->mdef2;
if(sd) {
i = sd->ignore_mdef[is_boss(target)?RC_BOSS:RC_NONBOSS];