summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-10 18:10:08 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-10 18:10:08 +0100 |
commit | d7b161da1c502402e0c0063c3ffbaa9042bfb24d (patch) | |
tree | 354ac75eb8a140dff80d7a5175b660eeeca35500 /src/reply/add_char.erl | |
parent | 73f531db4d999217447aff616313f6532a579610 (diff) |
Starting to add weapons to the mix.stats_calc
Diffstat (limited to 'src/reply/add_char.erl')
-rw-r--r-- | src/reply/add_char.erl | 6 |
1 files changed, 4 insertions, 2 deletions
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} ] } ). |