summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-24 12:14:18 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-24 12:14:18 +0000
commit3ecde465534c93315a1f88430129e8400f4d9fe2 (patch)
treefb1153e7be48da7d89b9697be733124650045fdf /src/map/skill.c
parent04580084c4ac2113d06a23fdf2ca4596dd04011b (diff)
downloadhercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.gz
hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.bz2
hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.tar.xz
hercules-3ecde465534c93315a1f88430129e8400f4d9fe2.zip
* 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
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c17
1 files changed, 9 insertions, 8 deletions
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.