summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-13 14:35:43 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-11-13 14:35:43 +0000
commit18282ae649b0c2d54deaba32132171cbf56a1868 (patch)
tree9c14a42cb333a4e6dc4f512c050b54b37fddcff7 /src/map/skill.c
parent61ac274ddcc1307b86d31d152260bf6dcd1360c3 (diff)
downloadhercules-18282ae649b0c2d54deaba32132171cbf56a1868.tar.gz
hercules-18282ae649b0c2d54deaba32132171cbf56a1868.tar.bz2
hercules-18282ae649b0c2d54deaba32132171cbf56a1868.tar.xz
hercules-18282ae649b0c2d54deaba32132171cbf56a1868.zip
- Volcano/Deluge/Violent Gale are now interchangeable, in the sense that as long as one of these is out, casting any of the three will not consume gems, and will use the remaining time of the previous one. In turn, Land Protector will now always consume gems on every cast.
- Small cleanup in the Land protector code which may fix it not blocking AoE skills. - Fixed the interpretation of "head_dir". Removed setting head_dir to match character direction in the whole code. Now it is only reset to 0 (look forward) when unit_setpos is invoked, or when a character begins walking. Thanks to FlavioJS for figuring out how the client parses the head direction. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9206 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index e11fc54f0..98f11a2dd 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -6577,8 +6577,13 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
{
struct skill_unit_group *old_sg;
if ((old_sg = skill_locate_element_field(src)) != NULL)
- {
- if (old_sg->skill_id == skillid && old_sg->limit > 0)
+ { //HelloKitty confirmed that these are interchangeable,
+ //so you can change element and not consume gemstones.
+ if ((
+ old_sg->skill_id == SA_VOLCANO ||
+ old_sg->skill_id == SA_DELUGE ||
+ old_sg->skill_id == SA_VIOLENTGALE
+ ) && old_sg->limit > 0)
{ //Use the previous limit (minus the elapsed time) [Skotlex]
limit = old_sg->limit - DIFF_TICK(gettick(), old_sg->tick);
if (limit < 0) //This can happen...
@@ -8204,14 +8209,18 @@ int skill_check_condition (struct map_session_data *sd, int skill, int lv, int t
case SA_DELUGE:
case SA_VOLCANO:
case SA_VIOLENTGALE:
- case SA_LANDPROTECTOR:
{ //Does not consumes if the skill is already active. [Skotlex]
struct skill_unit_group *sg;
- if ((sg= skill_locate_element_field(&sd->bl)) != NULL && sg->skill_id == skill)
- {
+ if ((sg= skill_locate_element_field(&sd->bl)) != NULL &&
+ (
+ sg->skill_id == SA_VOLCANO ||
+ sg->skill_id == SA_DELUGE ||
+ sg->skill_id == SA_VIOLENTGALE
+ )) {
if (sg->limit - DIFF_TICK(gettick(), sg->tick) > 0)
checkitem_flag = delitem_flag = 0;
- else sg->limit = 0; //Disable it.
+ else
+ sg->limit = 0; //Disable it.
}
break;
}
@@ -9940,7 +9949,7 @@ int skill_unit_timer_sub_onplace (struct block_list *bl, va_list ap)
nullpo_retr(0, group=unit->group);
- if (!skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP)
+ if (!(skill_get_inf2(group->skill_id)&(INF2_SONG_DANCE|INF2_TRAP))
&& map_getcell(bl->m, bl->x, bl->y, CELL_CHKLANDPROTECTOR))
return 0; //AoE skills are ineffective. [Skotlex]