diff options
author | shennetsind <ind@henn.et> | 2013-06-23 16:35:42 -0300 |
---|---|---|
committer | shennetsind <ind@henn.et> | 2013-06-23 16:35:42 -0300 |
commit | fcba8a2161a392369db99ab9a516a24470c54796 (patch) | |
tree | dc223cbd60e53b57eee6ff5e03a3a6bfea76e516 /src/map/skill.c | |
parent | a48f523555f02b4245cfc0313cb35f8a332cac50 (diff) | |
download | hercules-fcba8a2161a392369db99ab9a516a24470c54796.tar.gz hercules-fcba8a2161a392369db99ab9a516a24470c54796.tar.bz2 hercules-fcba8a2161a392369db99ab9a516a24470c54796.tar.xz hercules-fcba8a2161a392369db99ab9a516a24470c54796.zip |
Official Item Group/Package/Chain
http://hercules.ws/board/topic/1244-official-item-grouppackagechain/
Also
Further implemented itemdb.c/storage.c interfaces, and a minor update to db2sql plugin.
Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index aec1ebbfc..509de6f4a 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6474,7 +6474,7 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui return 1; } if( sd ) { - int x,bonus=100; + int x,bonus=100, potion = min(500+skill_lv,505); x = skill_lv%11 - 1; i = pc->search_inventory(sd,skill_db[skill_id].itemid[x]); if( i < 0 || skill_db[skill_id].itemid[x] <= 0 ) { @@ -6523,11 +6523,14 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui } } - if (sd->itemgrouphealrate[IG_POTION]>0) { - hp += hp * sd->itemgrouphealrate[IG_POTION] / 100; - sp += sp * sd->itemgrouphealrate[IG_POTION] / 100; + for(i = 0; i < ARRAYLENGTH(sd->itemhealrate) && sd->itemhealrate[i].nameid; i++) { + if (sd->itemhealrate[i].nameid == potion) { + hp += hp * sd->itemhealrate[i].rate / 100; + sp += sp * sd->itemhealrate[i].rate / 100; + break; + } } - + if( (i = pc->skillheal_bonus(sd, skill_id)) ) { hp += hp * i / 100; sp += sp * i / 100; @@ -9936,7 +9939,7 @@ int skill_castend_pos2(struct block_list* src, int x, int y, uint16 skill_id, ui int i = skill_lv%11 - 1; struct item_data *item; i = skill_db[skill_id].itemid[i]; - item = itemdb_search(i); + item = itemdb->search(i); potion_flag = 1; potion_hp = 0; potion_sp = 0; @@ -15925,7 +15928,7 @@ int skill_produce_mix (struct map_session_data *sd, uint16 skill_id, int nameid, if( skill_id == RK_RUNEMASTERY ) { int temp_qty, skill_lv = pc->checkskill(sd,skill_id); - data = itemdb_search(nameid); + data = itemdb->search(nameid); if( skill_lv == 10 ) temp_qty = 1 + rnd()%3; else if( skill_lv > 5 ) temp_qty = 1 + rnd()%2; |