diff options
author | glighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-02-21 06:59:42 +0000 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-04-11 15:52:04 -0300 |
commit | 0e6dcf7291164716aa47940e5967489e13cebfb6 (patch) | |
tree | e6bd3418317fefe876dd5a9b29a537c8693d8b04 /src/map/battle.c | |
parent | cafe335b38d41ec3986eedf5ecd156f354ea2c37 (diff) | |
download | hercules-0e6dcf7291164716aa47940e5967489e13cebfb6.tar.gz hercules-0e6dcf7291164716aa47940e5967489e13cebfb6.tar.bz2 hercules-0e6dcf7291164716aa47940e5967489e13cebfb6.tar.xz hercules-0e6dcf7291164716aa47940e5967489e13cebfb6.zip |
-Fix SC__SHADOWFORM not ending if target does not move after being warp. bugreport:7271
-- Thus allowing to inflict damage between map (only if both player don't move).
-- Cleanup old map-check on move check.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17148 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index d06e02f6c..c8af6badc 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1143,7 +1143,7 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag if( sc && sc->data[SC__SHADOWFORM] ) { struct block_list *s_bl = map_id2bl(sc->data[SC__SHADOWFORM]->val2); - if( !s_bl ) { // If the shadow form target is not present remove the sc. + if( !s_bl || s_bl->m != bl->m ) { // If the shadow form target is not present remove the sc. status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); } else if( status_isdead(s_bl) || !battle->check_target(src,s_bl,BCT_ENEMY)) { // If the shadow form target is dead or not your enemy remove the sc in both. status_change_end(bl, SC__SHADOWFORM, INVALID_TIMER); @@ -1833,7 +1833,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list wd.div_ = skill->get_num(GS_CHAINACTION,skill_lv); wd.type = 0x08; } - else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW + else if(sc && sc->data[SC_FEARBREEZE] && sd->weapontype1==W_BOW && (i = sd->equip_index[EQI_AMMO]) >= 0 && sd->inventory_data[i] && sd->status.inventory[i].amount > 1){ int chance = rand()%100; wd.type = 0x08; @@ -6166,4 +6166,4 @@ void battle_defaults(void) { battle->config_adjust = battle_adjust_conf; battle->get_enemy_area = battle_getenemyarea; battle->damage_area = battle_damage_area; -}
\ No newline at end of file +} |