diff --git a/src/item.cpp b/src/item.cpp index 94626353d472e..b1e7f0bb82647 100644 --- a/src/item.cpp +++ b/src/item.cpp @@ -343,8 +343,8 @@ item::item( const itype *type, time_point turn, int qty ) : type( type ), bday( if( has_flag( flag_ENERGY_SHIELD ) ) { const islot_armor *sh = find_armor_data(); - set_var( "MAX_ENERGY_SHIELD_HP", sh->max_energy_shield_hp ); - set_var( "ENERGY_SHIELD_HP", sh->max_energy_shield_hp ); + set_var( "npctalk_var_MAX_ENERGY_SHIELD_HP", sh->max_energy_shield_hp ); + set_var( "npctalk_var_ENERGY_SHIELD_HP", sh->max_energy_shield_hp ); } if( has_flag( flag_COLLAPSE_CONTENTS ) ) { @@ -9055,10 +9055,10 @@ item::armor_status item::damage_armor_durability( damage_unit &du, damage_unit & { //Energy shields aren't damaged by attacks but do get their health variable reduced. They are also only //damaged by the damage types they actually protect against. - if( has_var( "ENERGY_SHIELD_HP" ) && resist( du.type, false, bp ) > 0.0f ) { - double shield_hp = get_var( "ENERGY_SHIELD_HP", 0.0 ); + if( has_var( "npctalk_var_ENERGY_SHIELD_HP" ) && resist( du.type, false, bp ) > 0.0f ) { + double shield_hp = get_var( "npctalk_var_ENERGY_SHIELD_HP", 0.0 ); shield_hp -= premitigated.amount; - set_var( "ENERGY_SHIELD_HP", shield_hp ); + set_var( "npctalk_var_ENERGY_SHIELD_HP", shield_hp ); if( shield_hp > 0 ) { return armor_status::UNDAMAGED; } else {