From 97607005941e41e60a8025c53f585c7927306fd7 Mon Sep 17 00:00:00 2001 From: skotlex Date: Sun, 4 Mar 2007 16:39:30 +0000 Subject: - Added the +20hit that were missing the NPC elemental attack skills. - Added support for autospells using "a random skill level". The last value of bonus4 bAutoSpell is used for determining this as well as the target. &1 is to cast on target (otherwise cast on self), and &2 is to use a random level UP to the level specified in the script (otherwise always cast the specified level) - Updated item_bonus.txt with the documentation for the bAutoSpell/bAutoSpellWhenHit changes. - Corrected @refresh not reupdating the basic stat bonuses. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9952 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 5f16e01c0..de5977bcf 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2397,12 +2397,12 @@ int pc_bonus4(struct map_session_data *sd,int type,int type2,int type3,int type4 switch(type){ case SP_AUTOSPELL: if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id); + pc_bonus_autospell(sd->autospell, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, current_equip_card_id); break; case SP_AUTOSPELL_WHENHIT: if(sd->state.lr_flag != 2) - pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val?type2:-type2), type3, type4, current_equip_card_id); + pc_bonus_autospell(sd->autospell2, MAX_PC_BONUS, (val&1?type2:-type2), (val&2?-type3:type3), type4, current_equip_card_id); break; default: if(battle_config.error_log) -- cgit v1.2.3-60-g2f50