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/skill.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index a25a523a2..905e2c1fb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2887,15 +2887,11 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case ASC_METEORASSAULT: case GS_DESPERADO: case GS_SPREADATTACK: - case KN_BRANDISHSPEAR: if (flag&1) { //Invoked from map_foreachinarea, skill_area_temp[0] holds number of targets to divide damage by. if (skill_area_temp[1] != bl->id) skill_attack(skill_get_type(skillid), src, src, bl, skillid, skilllv, tick, skill_area_temp[0]|SD_ANIMATION); - else if (skillid == KN_BRANDISHSPEAR) - skill_attack(skill_get_type(skillid), src, src, bl, - skillid, skilllv, tick, skill_area_temp[0]); break; } if ( skillid == NJ_BAKUENRYU ) @@ -2926,6 +2922,16 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int } break; + case KN_BRANDISHSPEAR: + //Coded apart for it needs the flag passed to the damage calculation. + if (skill_area_temp[1] != bl->id) + skill_attack(skill_get_type(skillid), src, src, bl, + skillid, skilllv, tick, flag|SD_ANIMATION); + else + skill_attack(skill_get_type(skillid), src, src, bl, + skillid, skilllv, tick, flag); + break; + case KN_BOWLINGBASH: if(flag&1){ if(bl->id==skill_area_temp[1]) @@ -6838,7 +6844,7 @@ int skill_unit_onplace (struct skill_unit *src, struct block_list *bl, unsigned if((!sd->chatID || battle_config.chat_warpportal) && sd->ud.to_x == src->bl.x && sd->ud.to_y == src->bl.y) { if (pc_setpos(sd,sg->val3,sg->val2>>16,sg->val2&0xffff,3) == 0) { - if (--sg->val1<=0 || sg->src_id == bl->id) + if (--sg->val1<=0) skill_delunitgroup(NULL, sg); } } -- cgit v1.2.3-60-g2f50