summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-16 13:45:02 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-16 13:45:02 +0000
commitb8dd9a491e2e31d43862a03bba3b5295afdc6d8c (patch)
tree57e012af30f80798bdcb82d652ddad977498f1aa /src/map/skill.c
parent677160aa238c1d5b58a3e2139f5e6a701d2c1531 (diff)
downloadhercules-b8dd9a491e2e31d43862a03bba3b5295afdc6d8c.tar.gz
hercules-b8dd9a491e2e31d43862a03bba3b5295afdc6d8c.tar.bz2
hercules-b8dd9a491e2e31d43862a03bba3b5295afdc6d8c.tar.xz
hercules-b8dd9a491e2e31d43862a03bba3b5295afdc6d8c.zip
- Overlapping song/dances will now cause dissonance/ugly-dance level 1 instead of retaining the level of their song/dance.
- Fixed the misleading description of what item_avail does. - Fixed wrong check in @petrename, thanks to The Ultra Mage. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9228 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 60d992671..aa79bf71d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6435,6 +6435,7 @@ static int skill_dance_switch_sub(struct skill_unit *unit, struct skill_unit_gro
memset(&uglydance, 0, sizeof(uglydance));
group2 = &dissonance;
group2->skill_id = BA_DISSONANCE;
+ group2->skill_lv = 1;
group2->unit_id = skill_get_unit_id(group2->skill_id,0);
group2->target_flag = skill_get_unit_target(group2->skill_id);
group2->bl_flag= skill_get_unit_bl_target(group2->skill_id);
@@ -6442,6 +6443,7 @@ static int skill_dance_switch_sub(struct skill_unit *unit, struct skill_unit_gro
group2 = &uglydance;
group2->skill_id = DC_UGLYDANCE;
+ group2->skill_lv = 1;
group2->unit_id = skill_get_unit_id(group2->skill_id,0);
group2->target_flag = skill_get_unit_target(group2->skill_id);
group2->bl_flag= skill_get_unit_bl_target(group2->skill_id);
@@ -6454,12 +6456,14 @@ static int skill_dance_switch_sub(struct skill_unit *unit, struct skill_unit_gro
memcpy(&original, group, sizeof(struct skill_unit_group)); //Backup
group2 = unit->val2&UF_SONG?&dissonance:&uglydance;
group->skill_id = group2->skill_id;
+ group->skill_lv = group2->skill_lv;
group->unit_id = group2->unit_id;
group->target_flag = group2->target_flag;
group->bl_flag= group2->bl_flag;
group->interval = group2->interval;
} else { //Restore only relevant values (should the backup be 5 ints rather than the whole structure?)
group->skill_id = original.skill_id;
+ group->skill_lv = original.skill_lv;
group->unit_id = original.unit_id;
group->target_flag = original.target_flag;
group->bl_flag = original.bl_flag;
@@ -9325,7 +9329,7 @@ int skill_cell_overlap(struct block_list *bl, va_list ap)
}
//Delete the rest of types.
case HW_GANBANTEIN:
- if(!skill_get_inf2(unit->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP))
+ if(!(skill_get_inf2(unit->group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)))
{ //It deletes everything except songs/dances
skill_delunit(unit, 1);
return 1;