diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-01 18:18:32 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-01 18:18:32 +0000 |
commit | 7564712d7fc9d13890011fdd22215e9ff912e1a4 (patch) | |
tree | 029e50b1c4a0f231a784b8aae076926043dfb17a /src/map/battle.c | |
parent | a6bc36f6d9a6bbf163554e9cf9523b43216c0c04 (diff) | |
download | hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.tar.gz hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.tar.bz2 hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.tar.xz hercules-7564712d7fc9d13890011fdd22215e9ff912e1a4.zip |
- Turn Undead and Offensive Resurrection should now work on undead players.
- Fixed the range checking of Repair weapon
- Rude attacked is now also triggered when you hit a target that can't move out of their melee attack range.
- Mob ai will attempt to do a long-range attacked condition skill before unlocking a target when it is attacked and said target is out of melee range of a non-walking mob.
- Corrected mobskill event to set the target_id before triggering.
- Moved MSC_SKILLUSED trigger to mobskill_event which is triggered in battle_calc_damage. It is also triggered on skill_castend_nodamage_id
- Added party_share_loot for handling party-share loot. it should now work with autoloot as well.
- Fixed skill_break_rate breaking stuff even if the rate is 0.
- pc_stopwalking will not send a fixpos packet if you are sitting.
- mob_can_reach rude-attacked condition now uses the mob's field of view.
- SC_NOCHAT is automatically started on pc_authok if manner is negative.
- Map server now refuses to start if you try to define a label with the same name as some const.txt defined character parameter.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5414 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r-- | src/map/battle.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 6913c0294..ee7c4e6a8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -755,8 +755,12 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,int damage,i damage = div_;
}
- if( md!=NULL && md->hp>0 && damage > 0 ) // ”½Œ‚‚È‚Ç‚ÌMOBƒXƒLƒ‹”»’è
- mobskill_event(md,flag);
+ if( md && !status_isdead(bl) && src != bl) {
+ if (damage > 0 )
+ mobskill_event(md,src,gettick(),flag);
+ if (skill_num)
+ mobskill_event(md,src,gettick(),MSC_SKILLUSED|(skill_num<<16));
+ }
return damage;
}
@@ -2268,7 +2272,8 @@ static struct Damage battle_calc_weapon_attack( if(sc->data[SC_MAXOVERTHRUST].timer!=-1)
breakrate += 10;
}
- skill_break_equip(src, EQP_WEAPON, breakrate, BCT_SELF);
+ if (breakrate)
+ skill_break_equip(src, EQP_WEAPON, breakrate, BCT_SELF);
}
if (battle_config.equip_skill_break_rate)
{ // Target equipment breaking
@@ -2471,7 +2476,7 @@ struct Damage battle_calc_magic_attack( break;
case ALL_RESURRECTION:
case PR_TURNUNDEAD:
- if(!tsd && battle_check_undead(t_race,t_ele)){
+ if(battle_check_undead(t_race,t_ele)){
int hp, mhp, thres;
hp = status_get_hp(target);
mhp = status_get_max_hp(target);
|