Skip to content

Commit

Permalink
add missed deserialization code
Browse files Browse the repository at this point in the history
  • Loading branch information
GuardianDll committed Dec 10, 2024
1 parent 78d2f90 commit f623637
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/magic_enchantment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -700,6 +700,36 @@ void enchant_cache::serialize( JsonOut &jsout ) const
}
jsout.end_array();

jsout.member( "incoming_damage_mod" );
jsout.start_array();
for( const damage_type &dt : damage_type::get_all() ) {
jsout.start_object();
jsout.member( "type", dt.id );
if( get_damage_add( dt.id ) != 0 ) {
jsout.member( "add", get_damage_add( dt.id ) );
}
if( get_damage_multiply( dt.id ) != 0 ) {
jsout.member( "multiply", get_damage_multiply( dt.id ) );
}
jsout.end_object();
}
jsout.end_array();

jsout.member( "incoming_damage_mod_post_absorbed" );
jsout.start_array();
for( const damage_type &dt : damage_type::get_all() ) {
jsout.start_object();
jsout.member( "type", dt.id );
if( get_damage_add( dt.id ) != 0 ) {
jsout.member( "add", get_damage_add( dt.id ) );
}
if( get_damage_multiply( dt.id ) != 0 ) {
jsout.member( "multiply", get_damage_multiply( dt.id ) );
}
jsout.end_object();
}
jsout.end_array();

jsout.member( "special_vision" );
jsout.start_array();
for( const special_vision &struc : special_vision_vector ) {
Expand Down

0 comments on commit f623637

Please sign in to comment.