diff options
-rw-r--r-- | Changelog.txt | 16 | ||||
-rw-r--r-- | src/map/battle.c | 20 |
2 files changed, 20 insertions, 16 deletions
diff --git a/Changelog.txt b/Changelog.txt index 6d04fc00a..7eda65135 100644 --- a/Changelog.txt +++ b/Changelog.txt @@ -1,18 +1,22 @@ Date Added 01/02 + * Re-fixed map-server crashing if an empty line is in skill_castnodex.txt, + thanks to Alex14 for pointing it out (SVN 899) [celest] + * Modified breaking rates calculating - meltdown's chances is separated from + self breaking chances (SVN 900) [celest] * Reduced MAX_SKILL_LEVEL to 10 to save a bit of memory and speed [celest] - * Tidied up parts in skill_castfix a bit [celest] + * Tidied up parts in skill_castfix a bit (SVN 895) [celest] * Fixed map-server crashing if an empty line was added in any of the skill-xx - db files [celest] + db files (SVN 895) [celest] * Updated skill_castnodex reading - An *optional* 3rd value can be added to set - whether a skill's delay time can be affected by dex [celest] + whether a skill's delay time can be affected by dex (SVN 895) [celest] Example: 46,1,1 - double strafe's delay is not affected by dex 46,1,0:0:0:0:1 - only level 5 double strafe is not affected by dex * More atempts at memory leak fixes [Codemaster] [SVN 890] - * Updated weapon breaking rates, thanks to DracoRPG [celest] + * Updated weapon breaking rates, thanks to DracoRPG (SVN 891) [celest] * Optimized enchanting skills success rates calculation, thanks to Wallex - (you were right! ^^; ) [celest] - * Modified Spiral Pierce and Breaker to type ranged [celest] + (you were right! ^^; ) (SVN 891) [celest] + * Modified Spiral Pierce and Breaker to type ranged (SVN 891) [celest] 01/01 * Attempted to fix a memory leak [Codemaster] - tell me if it works XD (NPC/Mob memory leak in npc_parse_mob(...)) [SVN 886] diff --git a/src/map/battle.c b/src/map/battle.c index 9da0b51b2..60e038fd0 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4045,31 +4045,31 @@ struct Damage battle_calc_weapon_attack( if(sd->status.weapon && sd->status.weapon != 11) { if(sd->sc_data[SC_MELTDOWN].timer!=-1) { -// breakrate += 100*sd->sc_data[SC_MELTDOWN].val1; // since we don't know if there are any other factors for breaking yet, [celest] - breakrate += 100*sd->sc_data[SC_MELTDOWN].val1; - if(rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000) { + int breakrate_; // separate breaking rates for meltdown [Celest] + breakrate_ = 100*sd->sc_data[SC_MELTDOWN].val1; + if(rand()%10000 < breakrate_*battle_config.equipment_break_rate/100 || breakrate_ >= 10000) { if (target->type == BL_PC) pc_breakweapon((struct map_session_data *)target); else skill_status_change_start(target,SC_STRIPWEAPON,1,75,0,0,skill_get_time2(WS_MELTDOWN,1),0 ); } - breakrate = 70*sd->sc_data[SC_MELTDOWN].val1; - if (rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000) { + breakrate_ = 70*sd->sc_data[SC_MELTDOWN].val1; + if (rand()%10000 < breakrate_*battle_config.equipment_break_rate/100 || breakrate_ >= 10000) { if (target->type == BL_PC) pc_breakarmor((struct map_session_data *)target); else skill_status_change_start(target,SC_STRIPSHIELD,1,75,0,0,skill_get_time2(WS_MELTDOWN,1),0 ); } } - if(sd->sc_data[SC_OVERTHRUST].timer!=-1) { + if(sd->sc_data[SC_OVERTHRUST].timer!=-1) breakrate += 10; //+ 0.1% whatever skill level you use [DracoRPG] + //if(wd.type==0x0a) //removed! because CRITS don't affect on breaking chance [Lupus] // breakrate*=2; - if(rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000) { - if(pc_breakweapon(sd)==1) - wd = battle_calc_pc_weapon_attack(src,target,skill_num,skill_lv,wflag); - } + if(rand()%10000 < breakrate*battle_config.equipment_break_rate/100 || breakrate >= 10000) { + if(pc_breakweapon(sd)==1) + wd = battle_calc_pc_weapon_attack(src,target,skill_num,skill_lv,wflag); } } } |