diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-01-09 15:23:25 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2013-01-09 15:23:25 +0000 |
commit | ca217557a8f647f06e11a1d89592bc0b1c4d1b3e (patch) | |
tree | 3b1e7cd42aeb1227e90088a5776e6a6c59881a62 /src | |
parent | 97d488e67801d315730cbe20eef9e0f70e56c0a6 (diff) | |
download | hercules-ca217557a8f647f06e11a1d89592bc0b1c4d1b3e.tar.gz hercules-ca217557a8f647f06e11a1d89592bc0b1c4d1b3e.tar.bz2 hercules-ca217557a8f647f06e11a1d89592bc0b1c4d1b3e.tar.xz hercules-ca217557a8f647f06e11a1d89592bc0b1c4d1b3e.zip |
Fixed bugreport:7105 where pierce defense must ignore def and add (def/2) as additional ATK damage.
Fixed bugreport:7148 where r17072 broke the ability of smiths to forge weapons.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17089 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 11 | ||||
-rw-r--r-- | src/map/clif.c | 4 | ||||
-rw-r--r-- | src/map/clif.h | 2 |
3 files changed, 8 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index e67cf16ed..8fb9512f8 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3226,24 +3226,23 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo /** * RE DEF Reduction * Damage = Attack * (4000+eDEF)/(4000+eDEF) - sDEF - * Icepick no longer bypasses defense, but gains 1 atk per def/2 + * Pierce defence gains 1 atk per def/2 **/ ATK_ADD2( flag.pdef ?(def1/2):0, flag.pdef2?(def1/2):0 ); - if( !flag.idef ) + if( !flag.idef && !flag.pdef ) wd.damage = wd.damage * (4000+def1) / (4000+10*def1) - vit_def; - if( flag.lh && !flag.idef2 ) + if( flag.lh && !flag.idef2 && !flag.pdef2 ) wd.damage2 = wd.damage2 * (4000+def1) / (4000+10*def1) - vit_def; - #else if (def1 > 100) def1 = 100; ATK_RATE2( - flag.idef ?100:(flag.pdef ? (def1+vit_def) : (100-def1)), - flag.idef2?100:(flag.pdef2? (def1+vit_def) : (100-def1)) + flag.idef ?100:(flag.pdef ? (int64)flag.pdef*(def1+vit_def) : (100-def1)), + flag.idef2?100:(flag.pdef2? (int64)flag.pdef2*(def1+vit_def) : (100-def1)) ); ATK_ADD2( flag.idef ||flag.pdef ?0:-vit_def, diff --git a/src/map/clif.c b/src/map/clif.c index cc4100487..06c74a5f8 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -5239,7 +5239,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst) /// 018d <packet len>.W { <name id>.W { <material id>.W }*3 }* /// material id: /// unused by the client -void clif_skill_produce_mix_list(struct map_session_data *sd, uint16 skill_id , int trigger) +void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id , int trigger) { int i,c,view,fd; nullpo_retv(sd); @@ -5255,7 +5255,7 @@ void clif_skill_produce_mix_list(struct map_session_data *sd, uint16 skill_id , for(i=0,c=0;i<MAX_SKILL_PRODUCE_DB;i++){ if( skill_can_produce_mix(sd,skill_produce_db[i].nameid, trigger, 1) && - ( skill_id > 0 && skill_produce_db[i].req_skill == skill_id ) + ( skill_id > 0 && skill_produce_db[i].req_skill == skill_id || skill_id < 0 ) ){ if((view = itemdb_viewid(skill_produce_db[i].nameid)) > 0) WFIFOW(fd,c*8+ 4)= view; diff --git a/src/map/clif.h b/src/map/clif.h index 723c55cf8..cd7fbdb35 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -442,7 +442,7 @@ void clif_skill_estimation(struct map_session_data *sd,struct block_list *dst); void clif_skill_warppoint(struct map_session_data* sd, uint16 skill_id, uint16 skill_lv, unsigned short map1, unsigned short map2, unsigned short map3, unsigned short map4); void clif_skill_memomessage(struct map_session_data* sd, int type); void clif_skill_teleportmessage(struct map_session_data *sd, int type); -void clif_skill_produce_mix_list(struct map_session_data *sd, uint16 skill_id, int trigger); +void clif_skill_produce_mix_list(struct map_session_data *sd, int skill_id, int trigger); void clif_cooking_list(struct map_session_data *sd, int trigger, uint16 skill_id, int qty, int list_type); void clif_produceeffect(struct map_session_data* sd,int flag,int nameid); |