From 7b8633608695d81e79282057b0f2c771a4c694d7 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 27 Apr 2006 16:15:41 +0000 Subject: - Changed in the behaviour of wedding skills, should invoke skill_castend_pos when skill_castend_id triggers, should enable all the config settings for land skills to apply to the wedding skills. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6321 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index 67c55ac85..26fd2b181 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -3179,21 +3179,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case NPC_SMOKING: //Since it is a self skill, this one ends here rather than in damage_id. [Skotlex] return skill_castend_damage_id (src, bl, skillid, skilllv, tick, flag); - case WE_CALLPARTNER: - case WE_CALLPARENT: - case WE_CALLBABY: - { //Find a random spot to place the skill. [Skotlex] - short x,y; - i = skill_get_splash(skillid, skilllv); - x = src->x + i; - y = src->y + i; - if (map_random_dir(src, &x, &y)) - return skill_castend_pos2(src,x,y,skillid,skilllv,tick,0); - else { - if (sd) clif_skill_fail(sd,skillid,0,0); - return 0; - } - } //These are actually ground placed. case CR_GRANDCROSS: case NPC_GRANDDARKNESS: @@ -5605,6 +5590,21 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data ) return 0; } + switch (ud->skillid) { + //These three should become skill_castend_pos + case WE_CALLPARTNER: + case WE_CALLPARENT: + case WE_CALLBABY: + //Find a random spot to place the skill. [Skotlex] + inf2 = skill_get_splash(ud->skillid, ud->skilllv); + ud->skillx = src->x + inf2; + ud->skilly = src->y + inf2; + if (!map_random_dir(src, &ud->skillx, &ud->skilly)) { + ud->skillx = src->x; + ud->skilly = src->y; + } + return skill_castend_pos(tid,tick,id,data); + } if(ud->skillid != SA_CASTCANCEL ) { if( ud->skilltimer != tid ) { -- cgit v1.2.3-70-g09d2