From a2185d8ccf800a0d5412a19404218c7a99921fdf Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 10 Jan 2008 13:10:13 +0000 Subject: - Removed 'skill_steal_type' from skill.conf as said config no longer exists. - Corrected @slaveclone/@clone behaving as @evilclone when you change the @ symbol. - Modified SC_ARMOR_ELEMENT so it grants elemental resist as if it they were card granted bonuses. - fixed a SA_DISPELL crash when casted on an object with no status changes. - Adjusted the autospell code so that it does not relies on card_id == 0 for subtracting rates. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12041 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 6d59c1897..d524a5766 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -1279,7 +1279,7 @@ static int pc_bonus_autospell_del(struct s_autospell *spell, int max, short id, spell[j].id = id; spell[j].lv = lv; spell[j].rate = -rate; - spell[j].card_id = 0; + spell[j].card_id = card_id; } return rate; } @@ -1291,13 +1291,12 @@ static int pc_bonus_autospell(struct s_autospell *spell, int max, short id, shor pc_bonus_autospell_del(spell, max, id, lv, -rate, card_id); for (i = 0; i < max && spell[i].id; i++) { - if ((spell[i].card_id == card_id || !spell[i].card_id) && + if ((spell[i].card_id == card_id || spell[i].rate < 0) && spell[i].id == id && spell[i].lv == lv) { if (!battle_config.autospell_stacking && spell[i].rate > 0) return 0; rate += spell[i].rate; - if (rate < 0) card_id = 0; //Reduced from debted autospell. break; } } -- cgit v1.2.3-70-g09d2