summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-26 07:16:47 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-10-26 07:16:47 +0000
commit9befe305370ddcc177ca36f1d4d6c295ddfb7533 (patch)
tree78136667031cc9c59a011db60b60bab5bab88f87
parentab7aaa8732cebbd42348b04647d55d30162b97b7 (diff)
downloadhercules-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
-rw-r--r--Changelog-Trunk.txt5
-rw-r--r--conf/Changelog.txt3
-rw-r--r--conf/battle/skill.conf6
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/skill.c34
6 files changed, 24 insertions, 26 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 700bf564b..dd130f6b2 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,11 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2007/10/26
+ * 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). [Skotlex]
2007/10/24
* Corrected a fex misshaps from r11571:
- disabling the memory manager
diff --git a/conf/Changelog.txt b/conf/Changelog.txt
index d998a5d1d..16f89f004 100644
--- a/conf/Changelog.txt
+++ b/conf/Changelog.txt
@@ -1,5 +1,8 @@
Date Added
+2007/10/26
+ * Removed the config setting firewall_hits_on_undead setting. The code
+ handles this now using the delay defined in skill_unit_db. [Skotlex]
2007/10/23
* Rev. 11559 Added Arunafeltz State WoE maps. [L0ne_W0lf]
2007/10/22
diff --git a/conf/battle/skill.conf b/conf/battle/skill.conf
index 70bde1ba1..877465496 100644
--- a/conf/battle/skill.conf
+++ b/conf/battle/skill.conf
@@ -169,12 +169,6 @@ sense_type: 3
// 1 = Athena style (multiple consecutive attacks)
finger_offensive_type: 0
-// Number of hits at a time that undead/fire elemental enemies receive from firewall.
-// NOTE: Officially, it is one hit at a time on a very fast rate, however eA's timer system
-// doesn't triggers enough "hits" to exhaust the firewall before the mob walks through it.
-// A value of 5 would suffice for a vertical firewall to take full effect on undead.
-firewall_hits_on_undead: 5
-
// Grandcross Settings (Dont mess with these)
// If set to no, hit interval is increased based on the amount of mobs standing on the same cell
// (means that when there's stacked mobs in the same cell, they won't receive all hits)
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: