diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-26 07:16:47 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-10-26 07:16:47 +0000 |
commit | 9befe305370ddcc177ca36f1d4d6c295ddfb7533 (patch) | |
tree | 78136667031cc9c59a011db60b60bab5bab88f87 /src/map | |
parent | ab7aaa8732cebbd42348b04647d55d30162b97b7 (diff) | |
download | hercules-9befe305370ddcc177ca36f1d4d6c295ddfb7533.tar.gz hercules-9befe305370ddcc177ca36f1d4d6c295ddfb7533.tar.bz2 hercules-9befe305370ddcc177ca36f1d4d6c295ddfb7533.tar.xz hercules-9befe305370ddcc177ca36f1d4d6c295ddfb7533.zip |
- Removed the config setting firewall_hits_on_undead setting, Firewall and kaensin now automatically calculate the number of hits they should do per iteration based on the skill trigger frequency (you may want to raise that delay of 1ms in the db, though)
- Cleaned a bit the loop for the Warmth skills.
- Added a mising pc_class2idx invocation (fixes a very minor bug when you request max skill lv for a skill in your tree with different max than the skill_db max)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11578 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/skill.c | 34 |
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: |