From 5fd8f5d303e8915cc74a52e5b86d1fd8f073cb4d Mon Sep 17 00:00:00 2001 From: nsensfel Date: Thu, 6 Jun 2019 17:54:05 +0200 Subject: Fixes some of the issues I've found. --- src/shared/struct/inventory/shr_equipment.erl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/shared/struct/inventory/shr_equipment.erl') diff --git a/src/shared/struct/inventory/shr_equipment.erl b/src/shared/struct/inventory/shr_equipment.erl index b56a83c..830896c 100644 --- a/src/shared/struct/inventory/shr_equipment.erl +++ b/src/shared/struct/inventory/shr_equipment.erl @@ -502,16 +502,16 @@ decode (Map) -> glyphs = maps:get(?GLYPHS_FIELD, Map) }. --spec encode (unresolved()) -> {list({binary(), any()})}. -encode (EqRef) -> +-spec encode (either()) -> {list({binary(), any()})}. +encode (Eq) -> { [ - {?PRIMARY_WEAPON_FIELD, EqRef#shr_eq_ref.primary}, - {?SECONDARY_WEAPON_FIELD, EqRef#shr_eq_ref.secondary}, - {?ARMOR_FIELD, EqRef#shr_eq_ref.armor}, - {?PORTRAIT_FIELD, EqRef#shr_eq_ref.portrait}, - {?GLYPH_BOARD_FIELD, EqRef#shr_eq_ref.glyph_board}, - {?GLYPHS_FIELD, EqRef#shr_eq_ref.glyphs} + {?PRIMARY_WEAPON_FIELD, get_primary_weapon_id(Eq)}, + {?SECONDARY_WEAPON_FIELD, get_secondary_weapon_id(Eq)}, + {?ARMOR_FIELD, get_armor_id(Eq)}, + {?PORTRAIT_FIELD, get_portrait_id(Eq)}, + {?GLYPH_BOARD_FIELD, get_glyph_board_id(Eq)}, + {?GLYPHS_FIELD, get_glyph_ids(Eq)} ] }. -- cgit v1.2.3-70-g09d2