From fe433ddb58316dcb2479ff6a2c6ee2546e552e0d Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 10 Oct 2007 23:47:02 +0000 Subject: * Implemented more official Warp Portal behavior - the transition from active to waiting mode is now done as a simple appearance change instead of deleting one and creating the other - due to the above, an opening warp is now properly accompanied by the log-in like sound effect git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11404 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index dc26db4ab..00b9a49d7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7041,9 +7041,9 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid, group->limit = unit->limit; } + // execute on all targets standing on this cell if (range==0 && active_flag) - map_foreachincell(skill_unit_effect,unit->bl.m, - unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1); + map_foreachincell(skill_unit_effect,unit->bl.m, unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1); } } @@ -10262,8 +10262,14 @@ int skill_unit_timer_sub (struct block_list* bl, va_list ap) break; case UNT_WARP_ACTIVE: - skill_unitsetting(&unit->bl,group->skill_id,group->skill_lv,unit->bl.x,unit->bl.y,1); - skill_delunit(unit); + // warp portal opens (morph to a UNT_WARP_WAITING cell) + group->unit_id = UNT_WARP_WAITING; + clif_changelook(&unit->bl, LOOK_BASE, group->unit_id); + // restart timers + group->limit = skill_get_time(group->skill_id,group->skill_lv); + unit->limit = skill_get_time(group->skill_id,group->skill_lv); + // apply effect to all units standing on it + map_foreachincell(skill_unit_effect,unit->bl.m,unit->bl.x,unit->bl.y,group->bl_flag,&unit->bl,gettick(),1); break; case UNT_CALLFAMILY: -- cgit v1.2.3-70-g09d2