| summaryrefslogtreecommitdiff | 
diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/shared/struct/inventory/shr_equipment.erl | 17 | ||||
| -rw-r--r-- | src/shared/struct/inventory/shr_weapon.erl.m4 | 4 | 
2 files changed, 16 insertions, 5 deletions
| diff --git a/src/shared/struct/inventory/shr_equipment.erl b/src/shared/struct/inventory/shr_equipment.erl index 830896c..ceeefd1 100644 --- a/src/shared/struct/inventory/shr_equipment.erl +++ b/src/shared/struct/inventory/shr_equipment.erl @@ -468,14 +468,20 @@ ataxia_set_glyph_ids (V, VUpdate, Eq) ->  -spec default () -> type().  default () -> +   DefaultGlyphBoard = shr_glyph_board:default(),     #shr_eq     {        primary = shr_weapon:default(),        secondary = shr_weapon:default(),        armor = shr_armor:default(),        portrait = shr_portrait:default(), -      glyph_board = shr_glyph_board:default(), -      glyphs = [] +      glyph_board = DefaultGlyphBoard, +      glyphs = +         lists:map +         ( +            fun (_E) -> shr_glyph:default() end, +            shr_glyph_board:get_slots(DefaultGlyphBoard) +         )     }.  -spec default_unresolved () -> unresolved(). @@ -487,7 +493,12 @@ default_unresolved () ->        armor = shr_armor:default_id(),        portrait = shr_portrait:default_id(),        glyph_board = shr_glyph_board:default_id(), -      glyphs = [] +      glyphs = +         lists:map +         ( +            fun (_E) -> shr_glyph:default() end, +            shr_glyph_board:get_slots(shr_glyph_board:default()) +         )     }.  -spec decode (map()) -> unresolved(). diff --git a/src/shared/struct/inventory/shr_weapon.erl.m4 b/src/shared/struct/inventory/shr_weapon.erl.m4 index 8492189..ce87045 100644 --- a/src/shared/struct/inventory/shr_weapon.erl.m4 +++ b/src/shared/struct/inventory/shr_weapon.erl.m4 @@ -82,7 +82,7 @@ from_id (_) ->     default().  -spec default () -> type(). -default () -> from_id(<<"0">>). +default () -> from_id(<<"s0">>).  -spec default_id () -> id(). -default_id () -> <<"0">>. +default_id () -> <<"s0">>. | 


