summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-20 18:30:05 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-10-20 18:30:05 +0000
commit54a7f124543239c98d696da37c91eb5e2e99b25d (patch)
tree03c1c0d7148de31a112f2c3d82c7eabf910dd351 /src/map/battle.c
parent1893d0bc7b07a362ac6efcd8de4af056544bad3a (diff)
downloadhercules-54a7f124543239c98d696da37c91eb5e2e99b25d.tar.gz
hercules-54a7f124543239c98d696da37c91eb5e2e99b25d.tar.bz2
hercules-54a7f124543239c98d696da37c91eb5e2e99b25d.tar.xz
hercules-54a7f124543239c98d696da37c91eb5e2e99b25d.zip
- Fixed Charge Atk being able to go through chasm/pits.
- Moved the homunculus DB information from the player structure to the homun structure. Modified the homunculus creation packets to hold this information during creation, also, all initial values are handled by the map-server, the char server only assigns it a homun ID. - Removed target_id/attacked_id from homun_data as it wasn't really used. - Codes cleanup (removing of commented code mostly) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9031 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index da209b2a1..95a4ac49f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -101,7 +101,7 @@ int battle_gettarget(struct block_list *bl)
case BL_PET:
return ((struct pet_data*)bl)->target_id;
case BL_HOM:
- return ((struct homun_data*)bl)->target_id;
+ return ((struct homun_data*)bl)->ud.target;
}
return 0;
}
@@ -300,6 +300,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i
if(sc->data[SC_DODGE].timer != -1 && !sc->opt1 &&
(flag&BF_LONG || sc->data[SC_SPURT].timer != -1)
&& rand()%100 < 20) {
+ if (sd && pc_issit(sd)) pc_setstand(sd); //Stand it to dodge.
clif_skill_nodamage(bl,bl,TK_DODGE,1,1);
if (sc->data[SC_COMBO].timer == -1)
sc_start4(bl, SC_COMBO, 100, TK_JUMPKICK, src->id, 1, 0, 2000);
@@ -1231,8 +1232,8 @@ static struct Damage battle_calc_weapon_attack(
break;
}
case HFLI_SBR44: //[orn]
- if(src->type == BL_HOM && ((TBL_HOM*)src)->master) {
- wd.damage = ((TBL_HOM*)src)->master->homunculus.intimacy ;
+ if(src->type == BL_HOM) {
+ wd.damage = ((TBL_HOM*)src)->homunculus.intimacy ;
break;
}
default:
@@ -1508,7 +1509,6 @@ static struct Damage battle_calc_weapon_attack(
//Preserve damage ratio when max cart weight is changed.
if(sd && sd->cart_weight && sd->cart_max_weight)
skillratio += sd->cart_weight/i * 80000/sd->cart_max_weight - 100;
-// skillratio += sd->cart_weight/i - 100;
else if (!sd)
skillratio += 80000 / i - 100;
flag.cardfix = 0;