diff options
author | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-26 14:28:19 +0000 |
---|---|---|
committer | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-26 14:28:19 +0000 |
commit | 7923c32b8ebfbebd09dc0d783e93fef51a4ec38b (patch) | |
tree | 9ab81fa169eb48e71e208f080e5f776f066cad51 /src/map/battle.c | |
parent | 8ca00fc7e0e1457b1cb1537e2caeefa150344360 (diff) | |
download | hercules-7923c32b8ebfbebd09dc0d783e93fef51a4ec38b.tar.gz hercules-7923c32b8ebfbebd09dc0d783e93fef51a4ec38b.tar.bz2 hercules-7923c32b8ebfbebd09dc0d783e93fef51a4ec38b.tar.xz hercules-7923c32b8ebfbebd09dc0d783e93fef51a4ec38b.zip |
* Fixed a bug in gettick cache when compiling in Windows
- Changed "read_map_from_bitmap" to "read_map_from_cache" in map_athena, "map_bitmap_path" to "map_cache_file"
- Fixed item effects not showing when only one was used
- Fixed a bug in Safety Wall
- Allow only either Storm Gust or Lord of Vermillion to cause damage if stacked together
- Added path_search_long, map_find_skill_unit_oncell
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@998 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 31041f405..3be28ecbc 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -252,14 +252,18 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i sc_count=status_get_sc_count(bl); if(sc_count!=NULL && *sc_count>0){ - - if(sc_data[SC_SAFETYWALL].timer!=-1 && damage>0 && flag&BF_WEAPON && flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK){ + if (sc_data[SC_SAFETYWALL].timer!=-1 && damage>0 && flag&BF_WEAPON && + flag&BF_SHORT && skill_num != NPC_GUIDEDATTACK) { // セーフティウォール - struct skill_unit *unit=(struct skill_unit*)sc_data[SC_SAFETYWALL].val2; - if( unit && unit->alive && (--unit->group->val2)<=0 ) - skill_delunit(unit); - skill_unit_move(bl,gettick(),1); // 重ね掛けチェック - damage=0; + struct skill_unit *unit; + unit = map_find_skill_unit_oncell(bl->m,bl->x,bl->y,MG_SAFETYWALL); + if (unit) { + if ((--unit->group->val2)<=0) + skill_delunit(unit); + damage=0; + } else { + status_change_end(bl,SC_SAFETYWALL,-1); + } } if(sc_data[SC_PNEUMA].timer!=-1 && damage>0 && ((flag&BF_WEAPON && flag&BF_LONG && skill_num != NPC_GUIDEDATTACK) || (flag&BF_MISC && (skill_num == HT_BLITZBEAT || skill_num == SN_FALCONASSAULT)))){ // [DracoRPG] @@ -3792,7 +3796,6 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range) { int dx,dy; - struct walkpath_data wpd; int arange; nullpo_retr(0, src); @@ -3815,16 +3818,7 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range) // return 1; // 障害物判定 - wpd.path_len=0; - wpd.path_pos=0; - wpd.path_half=0; - if(path_search(&wpd,src->m,src->x,src->y,bl->x,bl->y,0x10001)!=-1) - return 1; - - dx=(dx>0)?1:((dx<0)?-1:0); - dy=(dy>0)?1:((dy<0)?-1:0); - return (path_search(&wpd,src->m,src->x+dx,src->y+dy, - bl->x-dx,bl->y-dy,0x10001)!=-1)?1:0; + return path_search_long(src->m,src->x,src->y,bl->x,bl->y); } /*========================================== |