summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-04 18:20:02 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-04 18:20:02 +0000
commit06387a85ce94281d1652ab4bc61c5b9c0971832a (patch)
tree1a0252e640010de1834a5013a9e9bce55f33c286 /src/map/skill.c
parente40c33a87b1c84767c6823de1fdd2051ca13f3d1 (diff)
downloadhercules-06387a85ce94281d1652ab4bc61c5b9c0971832a.tar.gz
hercules-06387a85ce94281d1652ab4bc61c5b9c0971832a.tar.bz2
hercules-06387a85ce94281d1652ab4bc61c5b9c0971832a.tar.xz
hercules-06387a85ce94281d1652ab4bc61c5b9c0971832a.zip
- Some minor code cleanups.
- Cleaned up skill code for NJ_BAKUENRYU - Unified splash-damage packet display for NJ_HUUMA and other splash skills (like Brandish spear) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8134 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c26
1 files changed, 2 insertions, 24 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index c52bb1729..db62dd23e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2004,21 +2004,13 @@ int skill_attack (int attack_type, struct block_list* src, struct block_list *ds
break;
case KN_BRANDISHSPEAR:
case NJ_KAMAITACHI:
- { //Only display skill animation for skill's target.
- struct unit_data *ud = unit_bl2ud(src);
- if (ud && ud->skilltarget == bl->id)
- dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, type);
- else
- dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5);
- break;
- }
case NJ_HUUMA:
{ //Only display skill animation for skill's target.
struct unit_data *ud = unit_bl2ud(src);
if (ud && ud->skilltarget == bl->id)
dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, (lv!=0)?lv:skilllv, type);
else
- dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, 0, -1, type); // Skill_id = 0 => no effect on other targets
+ dmg.dmotion = clif_skill_damage(dsrc,bl,tick,dmg.amotion,dmg.dmotion, damage, dmg.div_, skillid, -1, 5); //TODO: Check whether it's better to send -1 in skilllv or also send 0 as skillid, maybe even change this to a clif_damage packet?
break;
}
case PA_GOSPEL: //Should look like Holy Cross [Skotlex]
@@ -2836,6 +2828,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
case MC_CARTREVOLUTION:
case NPC_SPLASHATTACK:
case AC_SHOWER: //Targetted skill implementation.
+ case NJ_BAKUENRYU:
if(flag&1){
if(bl->id!=skill_area_temp[1]){
skill_attack(skill_get_type(skillid),src,src,bl,skillid,skilllv,tick,
@@ -3184,21 +3177,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
skill_castend_damage_id);
}
break;
- case NJ_BAKUENRYU:
- if (flag & 1) {
- skill_attack(BF_MAGIC, src, src, bl, skillid, skilllv, tick, skill_area_temp[0]);
- } else {
- clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_area_temp[0] = 0;
- map_foreachinrange(skill_area_sub, bl,
- skill_get_splash(skillid, skilllv), BL_CHAR,
- src, skillid, skilllv, tick, BCT_ENEMY, skill_area_sub_count);
- map_foreachinrange(skill_area_sub, bl,
- skill_get_splash(skillid, skilllv), BL_CHAR,
- src, skillid, skilllv, tick, BCT_ENEMY|1,
- skill_castend_damage_id);
- }
- break;
case NJ_KASUMIKIRI:
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
sc_start(src,SC_HIDING,100,skilllv,skill_get_time(skillid,skilllv));