Fixed Monster SkilL Crash bugreport:5101

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15019 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
shennetsind 2011-12-06 19:54:50 +00:00
parent d0ffc2423c
commit 31446113e8

View File

@ -2707,8 +2707,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
* yes this formula MATCHES their site: matk_max already holds weaponmatk+upgradematk, and * yes this formula MATCHES their site: matk_max already holds weaponmatk+upgradematk, and
* -> statusMATK holds the %Matk modifier stuff from earlier and lastly: * -> statusMATK holds the %Matk modifier stuff from earlier and lastly:
* -> the mdef part is not applied at this point, but later. * -> the mdef part is not applied at this point, but later.
**/ **/ //1:bugreport:5101 //1:bugreport:5101
MATK_ADD(sstatus->matk_max * 2 + 15/10 * sstatus->matk_min + rand()% ( sstatus->matk_max + (sstatus->matk_max*sstatus->wlv) / 10 * 2 * 10/15 * sstatus->matk_min ) ); MATK_ADD((1+sstatus->matk_max) * 2 + 15/10 * sstatus->matk_min + rand()% ( sstatus->matk_max + (1 + (sstatus->matk_max*sstatus->wlv) / 10 * 2 * 10/15 * sstatus->matk_min ) ));
#else //Ancient MATK Appliance #else //Ancient MATK Appliance
if (sstatus->matk_max > sstatus->matk_min) { if (sstatus->matk_max > sstatus->matk_min) {
MATK_ADD(sstatus->matk_min+rand()%(1+sstatus->matk_max-sstatus->matk_min)); MATK_ADD(sstatus->matk_min+rand()%(1+sstatus->matk_max-sstatus->matk_min));