diff options
author | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-08-27 20:55:18 +0000 |
---|---|---|
committer | flaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2011-08-27 20:55:18 +0000 |
commit | 8c784e637b9dd44dfde54a0c770f46a9a5d86cf0 (patch) | |
tree | 3385ce1c60fab2814b67aa1c3d1099f62711417b | |
parent | b7bdf4ebdbff065e8f38e6758761e08163c774ff (diff) | |
download | hercules-8c784e637b9dd44dfde54a0c770f46a9a5d86cf0.tar.gz hercules-8c784e637b9dd44dfde54a0c770f46a9a5d86cf0.tar.bz2 hercules-8c784e637b9dd44dfde54a0c770f46a9a5d86cf0.tar.xz hercules-8c784e637b9dd44dfde54a0c770f46a9a5d86cf0.zip |
* Quick fix for crash when blessing a mob.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/renewal@14943 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | src/map/status.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/map/status.c b/src/map/status.c index 8294d4873..b1df18ee6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3021,13 +3021,16 @@ void status_calc_bl_main(struct block_list *bl, enum scb_flag flag) status->matk_min = status_base_matk_min(status); status->matk_max = status_base_matk_max(status); - // iRO Wiki states as of 2011/02/24: - // Status MATK = floor(Base Level/4 + INT + INT/2 + DEX/5 + LUK/3) - status->status_matk = status_get_lv(bl)/4 + status->int_ + status->int_/2 + status->dex/5 + status->luk/3; - wmatk = sd->weapon_matk + sd->battle_status.rhw.atk2 + sd->equipment_matk; + if( sd ) + { + // iRO Wiki states as of 2011/02/24: + // Status MATK = floor(Base Level/4 + INT + INT/2 + DEX/5 + LUK/3) + status->status_matk = status_get_lv(bl)/4 + status->int_ + status->int_/2 + status->dex/5 + status->luk/3; + wmatk = sd->weapon_matk + sd->battle_status.rhw.atk2 + sd->equipment_matk; - if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON ) - wlv = sd->inventory_data[index]->wlv; + if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON ) + wlv = sd->inventory_data[index]->wlv; + } // Variance = ± 0.1 * Weapon Level * Base Weapon MATK // Used in a lot of magical attack calculations still. |