From 3ecde465534c93315a1f88430129e8400f4d9fe2 Mon Sep 17 00:00:00 2001 From: ultramage Date: Wed, 24 Oct 2007 12:14:18 +0000 Subject: * Cleaned up some messy guild code (more to come) * Cleaned up the mail code, no more pointless dynamic allocation * Added upgrade_svn11548.sql to convert the mail table to new format * Updated vs7 and vs6 project files * Increased the max. send buffer size to 5M since 1M is not enough * Please complain if something stops working ^^; git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11571 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/skill.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'src/map/skill.c') diff --git a/src/map/skill.c b/src/map/skill.c index bd58f6a9b..130087e33 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7399,15 +7399,17 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns int count=0; int x = bl->x, y = bl->y; //If target isn't knocked back it should hit every 20ms [Playtester] - while (count++ < SKILLUNITTIMER_INTERVAL/sg->interval && x == bl->x && y == bl->y && !status_isdead(bl)){ - if (bl->type==BL_PC) + while( count++ < SKILLUNITTIMER_INTERVAL/sg->interval && x == bl->x && y == bl->y && !status_isdead(bl) ) + { + if( bl->type == BL_PC ) status_zap(bl, 0, 15); //Only damage SP [Skotlex] - else if (!status_charge(ss, 0, 2)){ //should end when out of sp. - sg->limit=DIFF_TICK(tick,sg->tick); + else // mobs + if( status_charge(ss, 0, 2) ) // costs 2 SP per hit + skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0); + else { //should end when out of sp. + sg->limit = DIFF_TICK(tick,sg->tick); break; } - else - skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0); } } break; @@ -8020,8 +8022,7 @@ int skill_check_pc_partner (struct map_session_data *sd, short skill_id, short* //Else: new search for partners. c = 0; memset (p_sd, 0, sizeof(p_sd)); - i = map_foreachinrange(skill_check_condition_char_sub, &sd->bl, - range, BL_PC, &sd->bl, &c, &p_sd, skill_id); + i = map_foreachinrange(skill_check_condition_char_sub, &sd->bl, range, BL_PC, &sd->bl, &c, &p_sd, skill_id); if (skill_id != PR_BENEDICTIO) //Apply the average lv to encore skills. *skill_lv = (i+(*skill_lv))/(c+1); //I know c should be one, but this shows how it could be used for the average of n partners. -- cgit v1.2.3-60-g2f50