From c786a93e91adaf68780a5fd7585f51d0528f92ed Mon Sep 17 00:00:00 2001 From: mekolat Date: Mon, 18 Apr 2016 13:36:59 -0400 Subject: fix ELTLVL and ELTTYPE params --- src/map/pc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/pc.cpp') diff --git a/src/map/pc.cpp b/src/map/pc.cpp index 066484d..bf75852 100644 --- a/src/map/pc.cpp +++ b/src/map/pc.cpp @@ -3482,8 +3482,8 @@ int pc_readparam(dumb_ptr bl, SP type) case SP::INT: case SP::DEX: case SP::LUK: - if (bl && bl->bl_type == BL::PC) - val = bl->is_player()->status.attrs[sp_to_attr(type)]; + if (sd) + val = sd->status.attrs[sp_to_attr(type)]; else val = battle_get_stat(type, bl); break; @@ -3530,10 +3530,10 @@ int pc_readparam(dumb_ptr bl, SP type) val = sd ? unwrap(sd->status_key.char_id) : 0; break; case SP::ELTLVL: - val = static_cast(battle_get_element(sd).level); + val = static_cast(battle_get_element(bl).level); break; case SP::ELTTYPE: - val = static_cast(battle_get_element(sd).element); + val = static_cast(battle_get_element(bl).element); break; } -- cgit v1.2.3-70-g09d2