From d7b161da1c502402e0c0063c3ffbaa9042bfb24d Mon Sep 17 00:00:00 2001 From: nsensfel Date: Sat, 10 Feb 2018 18:10:08 +0100 Subject: Starting to add weapons to the mix. --- src/reply/add_char.erl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/reply') diff --git a/src/reply/add_char.erl b/src/reply/add_char.erl index c730c24..64fc26c 100644 --- a/src/reply/add_char.erl +++ b/src/reply/add_char.erl @@ -27,8 +27,8 @@ attributes_as_json (Atts) -> encode (Char, CharInstance, IsEnabled) -> {X, Y} = character_instance:get_location(CharInstance), Atts = character:get_attributes(Char), + {Wp0, Wp1} = character:get_weapons(Char), ActWeapon = character_instance:get_active_weapon(CharInstance, Char), - {_MinRg, MaxRg} = weapon:get_ranges(ActWeapon), jiffy:encode ( { @@ -43,7 +43,9 @@ encode (Char, CharInstance, IsEnabled) -> {<<"team">>, character_instance:get_owner(CharInstance)}, {<<"enabled">>, IsEnabled}, {<<"att">>, attributes_as_json(Atts)}, - {<<"atk_rg">>, MaxRg} + {<<"wp_0">>, Wp0}, + {<<"wp_1">>, Wp1}, + {<<"act_wp">>, ActWeapon} ] } ). -- cgit v1.2.3-70-g09d2