summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/skill.c34
3 files changed, 16 insertions, 20 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 16f33ea0a..8ec02ca77 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3628,7 +3628,6 @@ static const struct _battle_data {
{ "mob_max_skilllvl", &battle_config.mob_max_skilllvl, MAX_SKILL_LEVEL, 1, MAX_SKILL_LEVEL, },
{ "retaliate_to_master", &battle_config.retaliate_to_master, 1, 0, 1, },
{ "rare_drop_announce", &battle_config.rare_drop_announce, 0, 0, 10000, },
- { "firewall_hits_on_undead", &battle_config.firewall_hits_on_undead, 1, 1, 255, },
{ "title_lvl1", &battle_config.title_lvl1, 1, 0, 100, },
{ "title_lvl2", &battle_config.title_lvl2, 10, 0, 100, },
{ "title_lvl3", &battle_config.title_lvl3, 20, 0, 100, },
diff --git a/src/map/battle.h b/src/map/battle.h
index f82e8a3de..3ee7d24e5 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -396,7 +396,6 @@ extern struct Battle_Config
int rare_drop_announce; // chance <= to show rare drops global announces
int retaliate_to_master; //Whether when a mob is attacked by another mob, it will retaliate versus the mob or the mob's master. [Skotlex]
- int firewall_hits_on_undead; //Number of hits firewall does at a time on undead. [Skotlex]
int title_lvl1; // Players titles [Lupus]
int title_lvl2; // Players titles [Lupus]
diff --git a/src/map/skill.c b/src/map/skill.c
index 130087e33..a73a820e7 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -758,6 +758,7 @@ const char* skill_get_desc( int id ){
int skill_tree_get_max(int id, int b_class)
{
int i, skillid;
+ b_class = pc_class2idx(b_class);
for(i=0;(skillid=skill_tree[b_class][i].id)>0;i++)
if (id == skillid) return skill_tree[b_class][i].max;
return skill_get_max (id);
@@ -7324,23 +7325,19 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
{
case UNT_FIREWALL:
case UNT_KAENSIN:
- if (tstatus->def_ele == ELE_FIRE || battle_check_undead(tstatus->race, tstatus->def_ele)) {
- int count=0;
- //Fire property mobs and Undeads are never knocked back
- //Should hit every 20ms [Playtester]
- while (count++ < battle_config.firewall_hits_on_undead && !status_isdead(bl) && src->val2--)
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,1);
- } else {
- int count=0;
- int x = bl->x, y = bl->y;
- //If target isn't knocked back it should hit every 20ms [Playtester]
- while (count++ < battle_config.firewall_hits_on_undead && x == bl->x && y == bl->y && !status_isdead(bl) && src->val2--)
- skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*20,0);
- }
+ {
+ int count=0;
+ const int x = bl->x, y = bl->y;
+ //Take into account these hit more times than the timer interval
+ //can handle.
+ do
+ skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0);
+ while(--src->val2 && x == bl->x && y == bl->y &&
+ ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl));
if (src->val2<=0)
skill_delunit(src);
break;
-
+ }
case UNT_SANCTUARY:
if (battle_check_undead(tstatus->race, tstatus->def_ele) || tstatus->race==RC_DEMON)
{ //Only damage enemies with offensive Sanctuary. [Skotlex]
@@ -7397,20 +7394,21 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
case SG_STAR_WARM:
{
int count=0;
- int x = bl->x, y = bl->y;
+ const 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) )
+ do
{
if( bl->type == BL_PC )
status_zap(bl, 0, 15); //Only damage SP [Skotlex]
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);
+ skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0);
else { //should end when out of sp.
sg->limit = DIFF_TICK(tick,sg->tick);
break;
}
- }
+ } while( x == bl->x && y == bl->y &&
+ ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status_isdead(bl) );
}
break;
case WZ_STORMGUST: