| summaryrefslogtreecommitdiff | 
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2018-08-24 13:02:16 +0200 | 
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2018-08-24 13:02:16 +0200 | 
| commit | 67345d58c55e513f9b11a5b3e1af33164a4103ef (patch) | |
| tree | f8352892fdc002d43bf4b4d381264262351cabd1 /src/character/reply/chr_add_char.erl | |
| parent | 6b1f8c043b61d27be473b90cf79a09a49297ce0f (diff) | |
Working on the character editor...
Diffstat (limited to 'src/character/reply/chr_add_char.erl')
| -rw-r--r-- | src/character/reply/chr_add_char.erl | 39 | 
1 files changed, 39 insertions, 0 deletions
| diff --git a/src/character/reply/chr_add_char.erl b/src/character/reply/chr_add_char.erl new file mode 100644 index 0000000..53a62d6 --- /dev/null +++ b/src/character/reply/chr_add_char.erl @@ -0,0 +1,39 @@ +-module(chr_add_char). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% TYPES %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-export([generate/2]). + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% LOCAL FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% EXPORTED FUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +-spec generate +   ( +      non_neg_integer(), +      chr_character:type() +   ) +   -> {list(any())}. +generate (IX, Character) -> +   {ActiveWeapon, SecondaryWeapon} = chr_character:get_weapon_ids(Character), + +   { +      [ +         {<<"msg">>, <<"add_char">>}, +         {<<"ix">>, IX}, +         {<<"nam">>, chr_character:get_name(Character)}, +         {<<"awp">>, ActiveWeapon}, +         {<<"swp">>, SecondaryWeapon}, +         {<<"ar">>, chr_character:get_armor_id(Character)}, +         {<<"gls">>, array:to_list(chr_character:get_glyph_ids(Character))}, +         {<<"gb">>, chr_character:get_glyph_board_id(Character)} +      ] +   }. | 


