summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-22 12:14:54 +0000
committerInkfish <Inkfish@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-05-22 12:14:54 +0000
commit0f481d207534f270140f2d7aeb92125f08333ffe (patch)
tree8c791ea9c8f25cae6885b2b3606bfc038fa6a9dd /src
parentbacc1d9094c4a11fa66eae8136f72069d9acca7f (diff)
downloadhercules-0f481d207534f270140f2d7aeb92125f08333ffe.tar.gz
hercules-0f481d207534f270140f2d7aeb92125f08333ffe.tar.bz2
hercules-0f481d207534f270140f2d7aeb92125f08333ffe.tar.xz
hercules-0f481d207534f270140f2d7aeb92125f08333ffe.zip
Splash attack doesn't cause any status effects or autocasts any more.(bugreport:2661)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13801 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/skill.c16
2 files changed, 15 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f26a56b89..410413e7b 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -1044,9 +1044,11 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
s_ele = s_ele_ = wflag; //element comes in flag.
break;
- case LK_SPIRALPIERCE:
- if (!sd) nk &= ~NK_NO_ELEFIX; //forced neutral for monsters
- break;
+ // TODO: A patch here doesn't work anymore since mechanism has changed.
+ // If mob's spiral pierce is forced neutral is under investigation.
+ //case LK_SPIRALPIERCE:
+ // if (!sd) nk &= ~NK_NO_ELEFIX; //forced neutral for monsters
+ // break;
}
if(!skill_num)
diff --git a/src/map/skill.c b/src/map/skill.c
index bb18f0e12..208b6afd5 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -550,6 +550,8 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int
{
case 0: // Normal attacks (no skill used)
{
+ if( !(attack_type&BF_WEAPON) )
+ break; // If a normal attack is not a weapon attack, it's splash damage. [Inkfish]
if(sd) {
// Automatic trigger of Blitz Beat
if (pc_isfalcon(sd) && sd->status.weapon == W_BOW && (skill=pc_checkskill(sd,HT_BLITZBEAT))>0 &&
@@ -1568,8 +1570,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
if (sc && sc->data[SC_TRICKDEAD] && !(sstatus->mode&MD_BOSS))
return 0;
- dmg=battle_calc_attack(attack_type,src,bl,skillid,skilllv,flag&0xFFF);
- attack_type|=dmg.flag; //Add on the rest of attack properties.
+ dmg = battle_calc_attack(attack_type,src,bl,skillid,skilllv,flag&0xFFF);
//Skotlex: Adjusted to the new system
if(src->type==BL_PET)
@@ -1589,7 +1590,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
}
}
- if (attack_type&BF_MAGIC) {
+ if (dmg.flag&BF_MAGIC) {
if( !(sstatus->mode&MD_BOSS) && (dmg.damage || dmg.damage2) && skill_magic_reflect(src, bl, src==dsrc) )
{ //Magic reflection, switch caster/target
struct block_list *tbl = bl;
@@ -1829,13 +1830,16 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
ud->attackabletime = tick + type;
}
+ if( !skillid && flag&1 )
+ dmg.flag &= ~BF_WEAPON; // hack to make splash attack not trigger anything else.
+
if( !dmg.amotion )
{ //Instant damage
status_fix_damage(src,bl,damage,dmg.dmotion); //Deal damage before knockback to allow stuff like firewall+storm gust combo.
if( !status_isdead(bl) )
- skill_additional_effect(src,bl,skillid,skilllv,attack_type,dmg.dmg_lv,tick);
+ skill_additional_effect(src,bl,skillid,skilllv,dmg.flag,dmg.dmg_lv,tick);
if( damage > 0 ) //Counter status effects [Skotlex]
- skill_counter_additional_effect(dsrc,bl,skillid,skilllv,attack_type,tick);
+ skill_counter_additional_effect(dsrc,bl,skillid,skilllv,dmg.flag,tick);
}
//Only knockback if it's still alive, otherwise a "ghost" is left behind. [Skotlex]
@@ -1854,7 +1858,7 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
//Delayed damage must be dealt after the knockback (it needs to know actual position of target)
if (dmg.amotion)
- battle_delay_damage(tick, dmg.amotion,src,bl,attack_type,skillid,skilllv,damage,dmg.dmg_lv,dmg.dmotion);
+ battle_delay_damage(tick, dmg.amotion,src,bl,dmg.flag,skillid,skilllv,damage,dmg.dmg_lv,dmg.dmotion);
if(skillid == RG_INTIMIDATE && damage > 0 && !(tstatus->mode&MD_BOSS)) {
int rate = 50 + skilllv * 5;