| summaryrefslogtreecommitdiff | 
diff options
| -rw-r--r-- | src/battle/reply/btl_add_char.erl | 13 | ||||
| -rw-r--r-- | src/shared/struct/inventory/shr_inventory.erl | 14 | 
2 files changed, 15 insertions, 12 deletions
| diff --git a/src/battle/reply/btl_add_char.erl b/src/battle/reply/btl_add_char.erl index 9518677..d2fe255 100644 --- a/src/battle/reply/btl_add_char.erl +++ b/src/battle/reply/btl_add_char.erl @@ -31,22 +31,18 @@ rank_to_string (Rank) ->     )     -> {list(any())}.  generate (IX, Character, PlayerIX) -> -   {ActiveWeapon, SecondaryWeapon} = btl_character:get_weapon_ids(Character),     CharacterPlayerIX = btl_character:get_player_index(Character), -   Location = btl_character:get_location(Character),     {        [           {<<"msg">>, <<"add_char">>},           {<<"ix">>, IX}, -         {<<"nam">>, btl_character:get_name(Character)},           {<<"rnk">>, rank_to_string(btl_character:get_rank(Character))}, -         {<<"prt">>, btl_character:get_portrait_id(Character)},           {              <<"hea">>,              btl_character:get_current_health(Character)           }, -         {<<"lc">>, shr_location:encode(Location)}, +         {<<"lc">>, shr_location:encode(btl_character:get_location(Character))},           {<<"pla">>, CharacterPlayerIX},           {              <<"ena">>, @@ -56,12 +52,9 @@ generate (IX, Character, PlayerIX) ->              )           },           {<<"dea">>, btl_character:get_is_defeated(Character)}, -         {<<"awp">>, ActiveWeapon}, -         {<<"swp">>, SecondaryWeapon}, -         {<<"ar">>, btl_character:get_armor_id(Character)},           { -            <<"pomni">>, -            shr_omnimods:encode(btl_character:get_permanent_omnimods(Character)) +            <<"bas">>, +            shr_character:encode(btl_character:get_base_character(Character))           }        ]     }. diff --git a/src/shared/struct/inventory/shr_inventory.erl b/src/shared/struct/inventory/shr_inventory.erl index d6e6dbe..0670546 100644 --- a/src/shared/struct/inventory/shr_inventory.erl +++ b/src/shared/struct/inventory/shr_inventory.erl @@ -99,7 +99,12 @@ default () ->        glyphs = EmptySet     }. --spec allows_equipment (shr_equipment:type(), type()) -> boolean(). +-spec allows_equipment +   ( +      (shr_equipment:type()|shr_equipment:unresolved()), +      type() +   ) +   -> boolean().  allows_equipment (Eq, Inv) ->     Weapons = Inv#inventory.weapons,     Glyphs = Inv#inventory.glyphs, @@ -133,7 +138,12 @@ allows_equipment (Eq, Inv) ->        )     ). --spec add_equipment (shr_equipment:type(), type()) -> type(). +-spec add_equipment +   ( +      (shr_equipment:type()|shr_equipment:unresolved()), +      type() +   ) +   -> type().  add_equipment (Eq, Inv) ->     Inv#inventory     { | 


