From 22c75b070526de8b103032f5bf13504af81e0095 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sun, 8 Jul 2012 17:38:44 +0000 Subject: Hello World. Initial support for the new homunculus has been added, credits to brAthena for the base. Not all skills are yet supported, when a non-supported skill is used rather than the usual warning in the console you'll get a red-coloured message in-game "this skill is not yet supported". please step by our bug tracker should you step by any bugs. thank you very much, you're a great crowd. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16381 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/clif.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/map/clif.c') diff --git a/src/map/clif.c b/src/map/clif.c index 4153130e5..a35e0fa49 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -10582,6 +10582,27 @@ static void clif_parse_UseSkillToId_homun(struct homun_data *hd, struct map_sess unit_skilluse_id(&hd->bl, target_id, skillnum, skilllv); } +static void clif_parse_UseSkillToPos_homun(struct homun_data *hd, struct map_session_data *sd, unsigned int tick, short skillnum, short skilllv, short x, short y, int skillmoreinfo) +{ + int lv; + if( !hd ) + return; + if( skillnotok_hom(skillnum, hd) ) + return; + if( hd->ud.skilltimer != INVALID_TIMER ) { + if( skillnum != SA_CASTCANCEL && skillnum != SO_SPELLFIST ) return; + } else if( DIFF_TICK(tick, hd->ud.canact_tick) < 0 ) + return; + + if( hd->sc.data[SC_BASILICA] ) + return; + lv = merc_hom_checkskill(hd, skillnum); + if( skilllv > lv ) + skilllv = lv; + if( skilllv ) + unit_skilluse_pos(&hd->bl, x, y, skillnum, skilllv); +} + static void clif_parse_UseSkillToId_mercenary(struct mercenary_data *md, struct map_session_data *sd, unsigned int tick, short skillnum, short skilllv, int target_id) { int lv; @@ -10743,6 +10764,11 @@ static void clif_parse_UseSkillToPosSub(int fd, struct map_session_data *sd, sho if( !(skill_get_inf(skillnum)&INF_GROUND_SKILL) ) return; //Using a target skill on the ground? WRONG. + + if( skillnum >= HM_SKILLBASE && skillnum < HM_SKILLBASE + MAX_HOMUNSKILL ) { + clif_parse_UseSkillToPos_homun(sd->hd, sd, tick, skillnum, skilllv, x, y, skillmoreinfo); + return; + } if( skillnum >= MC_SKILLBASE && skillnum < MC_SKILLBASE + MAX_MERCSKILL ) { -- cgit v1.2.3-70-g09d2