fixed mapserv crash (divide by zero in Earthquake)
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@12618 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
2577ffdf25
commit
ba5c9df29d
@ -9,6 +9,7 @@ IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
|
|||||||
item_avail in the shop (the real one was added in inventory).
|
item_avail in the shop (the real one was added in inventory).
|
||||||
* Implemented config setting 'vending_over_max', to let people configure
|
* Implemented config setting 'vending_over_max', to let people configure
|
||||||
the behavior of vending items over the MAX_ZENY limit [ultramage]
|
the behavior of vending items over the MAX_ZENY limit [ultramage]
|
||||||
|
* Fixed mapserv crash, thanks to Konard [Lupus]
|
||||||
2008/04/15
|
2008/04/15
|
||||||
* Use the same code for script commands getitem & getitem2 as @item to avoid
|
* Use the same code for script commands getitem & getitem2 as @item to avoid
|
||||||
bug in bugreport:1324 (non-stackable items are stacked) [Toms]
|
bug in bugreport:1324 (non-stackable items are stacked) [Toms]
|
||||||
|
@ -2346,7 +2346,10 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
|
|||||||
if (skill_num == NPC_EARTHQUAKE)
|
if (skill_num == NPC_EARTHQUAKE)
|
||||||
{ //Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex]
|
{ //Adds atk2 to the damage, should be influenced by number of hits and skill-ratio, but not mdef reductions. [Skotlex]
|
||||||
//Also divide the extra bonuses from atk2 based on the number in range [Kevin]
|
//Also divide the extra bonuses from atk2 based on the number in range [Kevin]
|
||||||
ad.damage+= (sstatus->rhw.atk2*skillratio/100)/mflag;
|
if(mflag>0)
|
||||||
|
ad.damage+= (sstatus->rhw.atk2*skillratio/100)/mflag;
|
||||||
|
else
|
||||||
|
ShowError("Zero range by %d:%s, divide per 0 avoided!\n", skill_num, skill_get_name(skill_num));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(ad.damage<1)
|
if(ad.damage<1)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user