From 84f83d1034146b36bb3855ef654548f0802093a3 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 24 Aug 2006 14:49:16 +0000 Subject: - Added setting clear_skills_on_warp to specify when a character's land-based skills are deleted when the caster changes maps. Defaults to all types. - Should have fixed Brandish Spear not passing the flag to skill_attack, causing it to do miserable damage. - Warp Portal will no longer be removed when caster steps through it (this is left to the new clear_skills_on_warp setting) - Cleaned up status_percent_change to switch equations when the target has high hp to prevent overflows, also it will directly take hp/maxhp when a rate of 100 or higher is passed to prevent calculations. - Traps and Land Elemental fields are no longer automatically removed on map change (handled now by clear_skills_on_warp) - traps_setting &2 no longer does anything (handled now by blah blah) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8469 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 1fa676823..af77ce7f9 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -534,13 +534,17 @@ int unit_warp(struct block_list *bl,int m,short x,short y,int type) return 2; } } - + if (bl->type == BL_PC) //Use pc_setpos return pc_setpos((TBL_PC*)bl, map[m].index, x, y, type); if (!unit_remove_map(bl, type)) return 3; + if (bl->m != m && battle_config.clear_unit_onwarp && + battle_config.clear_unit_onwarp&bl->type) + skill_clear_unitgroup(bl); + bl->x=ud->to_x=x; bl->y=ud->to_y=y; bl->m=m; -- cgit v1.2.3-70-g09d2