summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-18 02:50:39 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-03-18 02:50:39 +0000
commit53a59a6135eb43e1db0cf82d0d367e4258ff6b86 (patch)
tree387a862d12692ce458b79f3db8c91321452f9615 /src/map/status.c
parent14593221de9da87afddc5b6fb9e261160f673a7e (diff)
downloadhercules-53a59a6135eb43e1db0cf82d0d367e4258ff6b86.tar.gz
hercules-53a59a6135eb43e1db0cf82d0d367e4258ff6b86.tar.bz2
hercules-53a59a6135eb43e1db0cf82d0d367e4258ff6b86.tar.xz
hercules-53a59a6135eb43e1db0cf82d0d367e4258ff6b86.zip
- Implemented new item and bonuses for Kreiger Von Midgard rewards.
* Execute script on skill (bonusautoscript3) * Add effect on skill (bAddEffOnSkill) * Execute skill on skill (bAutoSpellOnSkill) - Fixed some boxes Rental time according to item descriptions. - Implemented SC_ITEMSCRIPT, a status that gives you temporally the effect of an item. Check items 14597 to 14605 if you want to get the idea. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13596 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 10eb77053..ae0da921f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -193,7 +193,7 @@ void initChangeTables(void)
set_sc( MG_ENERGYCOAT , SC_ENERGYCOAT , SI_ENERGYCOAT , SCB_NONE );
set_sc( NPC_EMOTION , SC_MODECHANGE , SI_BLANK , SCB_MODE );
add_sc( NPC_EMOTION_ON , SC_MODECHANGE );
- set_sc( NPC_ATTRICHANGE , SC_ELEMENTALCHANGE , SI_BLANK , SCB_DEF_ELE );
+ set_sc( NPC_ATTRICHANGE , SC_ELEMENTALCHANGE , SI_ARMOR_RESIST , SCB_DEF_ELE );
add_sc( NPC_CHANGEWATER , SC_ELEMENTALCHANGE );
add_sc( NPC_CHANGEGROUND , SC_ELEMENTALCHANGE );
add_sc( NPC_CHANGEFIRE , SC_ELEMENTALCHANGE );
@@ -529,6 +529,7 @@ void initChangeTables(void)
StatusChangeFlagTable[SC_ARMOR_RESIST] |= SCB_PC;
StatusChangeFlagTable[SC_SPCOST_RATE] |= SCB_PC;
StatusChangeFlagTable[SC_WALKSPEED] |= SCB_SPEED;
+ StatusChangeFlagTable[SC_ITEMSCRIPT] |= SCB_PC;
// Mercenary Bonus Effects
StatusChangeFlagTable[SC_MERC_FLEEUP] |= SCB_FLEE;
StatusChangeFlagTable[SC_MERC_ATKUP] |= SCB_WATK;
@@ -1749,8 +1750,10 @@ int status_calc_pc(struct map_session_data* sd,int first)
//zero up structures...
memset(&sd->autospell,0,sizeof(sd->autospell)
+ sizeof(sd->autospell2)
+ + sizeof(sd->autospell3)
+ sizeof(sd->addeff)
+ sizeof(sd->addeff2)
+ + sizeof(sd->addeff3)
+ sizeof(sd->skillatk)
+ sizeof(sd->skillheal)
+ sizeof(sd->skillheal2)
@@ -1769,6 +1772,7 @@ int status_calc_pc(struct map_session_data* sd,int first)
// clear autoscripts...
pc_autoscript_clear(sd->autoscript, ARRAYLENGTH(sd->autoscript));
pc_autoscript_clear(sd->autoscript2, ARRAYLENGTH(sd->autoscript2));
+ pc_autoscript_clear(sd->autoscript3, ARRAYLENGTH(sd->autoscript3));
// vars zeroing. ints, shorts, chars. in that order.
memset (&sd->arrow_atk, 0,sizeof(sd->arrow_atk)
@@ -1966,6 +1970,13 @@ int status_calc_pc(struct map_session_data* sd,int first)
}
}
+ if( sc->count && sc->data[SC_ITEMSCRIPT] )
+ {
+ struct item_data *data = itemdb_exists(sc->data[SC_ITEMSCRIPT]->val1);
+ if( data && data->script )
+ run_script(data->script,0,sd->bl.id,0);
+ }
+
if( sd->pd )
{ // Pet Bonus
struct pet_data *pd = sd->pd;