diff options
author | mekolat <mekolat@users.noreply.github.com> | 2016-04-18 13:36:59 -0400 |
---|---|---|
committer | mekolat <mekolat@users.noreply.github.com> | 2016-04-18 13:36:59 -0400 |
commit | c786a93e91adaf68780a5fd7585f51d0528f92ed (patch) | |
tree | 7e2645f6fdec1dcc63ae56366371246f62865dcd /src/map | |
parent | 982dc85b60d5dff796ab87de052279350d5e1450 (diff) | |
download | tmwa-c786a93e91adaf68780a5fd7585f51d0528f92ed.tar.gz tmwa-c786a93e91adaf68780a5fd7585f51d0528f92ed.tar.bz2 tmwa-c786a93e91adaf68780a5fd7585f51d0528f92ed.tar.xz tmwa-c786a93e91adaf68780a5fd7585f51d0528f92ed.zip |
fix ELTLVL and ELTTYPE params
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/pc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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<block_list> 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<block_list> bl, SP type) val = sd ? unwrap<CharId>(sd->status_key.char_id) : 0; break; case SP::ELTLVL: - val = static_cast<int>(battle_get_element(sd).level); + val = static_cast<int>(battle_get_element(bl).level); break; case SP::ELTTYPE: - val = static_cast<int>(battle_get_element(sd).element); + val = static_cast<int>(battle_get_element(bl).element); break; } |