summaryrefslogtreecommitdiff
path: root/src/map/elemental.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-02 20:16:51 -0300
committershennetsind <ind@henn.et>2013-03-02 20:16:51 -0300
commitea001385e0b98e63cfde00158fd5b7739aaa659e (patch)
tree2c1ec751af1f6349bdf045f4eebe9fea061c2cef /src/map/elemental.c
parent3654f06f8563a7ee3df6f01552bdee9902d47fd2 (diff)
downloadhercules-ea001385e0b98e63cfde00158fd5b7739aaa659e.tar.gz
hercules-ea001385e0b98e63cfde00158fd5b7739aaa659e.tar.bz2
hercules-ea001385e0b98e63cfde00158fd5b7739aaa659e.tar.xz
hercules-ea001385e0b98e63cfde00158fd5b7739aaa659e.zip
Hercules Renewal: skill.c
http://hercules.ws/board/topic/237-hercules-renewal/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/elemental.c')
-rw-r--r--src/map/elemental.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/map/elemental.c b/src/map/elemental.c
index fc7d1cd36..c5b6302d5 100644
--- a/src/map/elemental.c
+++ b/src/map/elemental.c
@@ -422,20 +422,20 @@ int elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned
ed->last_thinktime = tick;
// Not in skill range.
- if( !battle->check_range(&ed->bl,bl,skill_get_range(skill_id,skill_lv)) ) {
+ if( !battle->check_range(&ed->bl,bl,skill->get_range(skill_id,skill_lv)) ) {
// Try to walk to the target.
- if( !unit_walktobl(&ed->bl, bl, skill_get_range(skill_id,skill_lv), 2) )
+ if( !unit_walktobl(&ed->bl, bl, skill->get_range(skill_id,skill_lv), 2) )
elemental_unlocktarget(ed);
else {
// Walking, waiting to be in range. Client don't handle it, then we must handle it here.
- int walk_dist = distance_bl(&ed->bl,bl) - skill_get_range(skill_id,skill_lv);
+ int walk_dist = distance_bl(&ed->bl,bl) - skill->get_range(skill_id,skill_lv);
ed->ud.skill_id = skill_id;
ed->ud.skill_lv = skill_lv;
- if( skill_get_inf(skill_id) & INF_GROUND_SKILL )
- ed->ud.skilltimer = add_timer( tick+status_get_speed(&ed->bl)*walk_dist, skill_castend_pos, ed->bl.id, 0 );
+ if( skill->get_inf(skill_id) & INF_GROUND_SKILL )
+ ed->ud.skilltimer = add_timer( tick+status_get_speed(&ed->bl)*walk_dist, skill->castend_pos, ed->bl.id, 0 );
else
- ed->ud.skilltimer = add_timer( tick+status_get_speed(&ed->bl)*walk_dist, skill_castend_id, ed->bl.id, 0 );
+ ed->ud.skilltimer = add_timer( tick+status_get_speed(&ed->bl)*walk_dist, skill->castend_id, ed->bl.id, 0 );
}
return 1;
@@ -455,7 +455,7 @@ int elemental_action(struct elemental_data *ed, struct block_list *bl, unsigned
}
//Otherwise, just cast the skill.
- if( skill_get_inf(skill_id) & INF_GROUND_SKILL )
+ if( skill->get_inf(skill_id) & INF_GROUND_SKILL )
unit_skilluse_pos(&ed->bl, bl->x, bl->y, skill_id, skill_lv);
else
unit_skilluse_id(&ed->bl, bl->id, skill_id, skill_lv);
@@ -499,7 +499,7 @@ int elemental_change_mode_ack(struct elemental_data *ed, int mode) {
ed->target_id = bl->id; // Set new target
ed->last_thinktime = gettick();
- if( skill_get_inf(skill_id) & INF_GROUND_SKILL )
+ if( skill->get_inf(skill_id) & INF_GROUND_SKILL )
unit_skilluse_pos(&ed->bl, bl->x, bl->y, skill_id, skill_lv);
else
unit_skilluse_id(&ed->bl,bl->id,skill_id,skill_lv);
@@ -556,18 +556,18 @@ int elemental_unlocktarget(struct elemental_data *ed) {
}
int elemental_skillnotok(uint16 skill_id, struct elemental_data *ed) {
- int idx = skill_get_index(skill_id);
+ int idx = skill->get_index(skill_id);
nullpo_retr(1,ed);
if (idx == 0)
return 1; // invalid skill id
- return skillnotok(skill_id, ed->master);
+ return skill->not_ok(skill_id, ed->master);
}
struct skill_condition elemental_skill_get_requirements(uint16 skill_id, uint16 skill_lv){
struct skill_condition req;
- int idx = skill_get_index(skill_id);
+ int idx = skill->get_index(skill_id);
memset(&req,0,sizeof(req));