summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 22:47:43 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-02-23 22:47:43 +0100 |
commit | 96c35eb8c79826fa07d2b00bbac039d9ec95eb3c (patch) | |
tree | 94d7fef850637be6fd800f139a59d578763ba671 /src/struct/character.erl | |
parent | 959b994bced0863d4b8a984f38f5ac61aa3620e0 (diff) |
...
Diffstat (limited to 'src/struct/character.erl')
-rw-r--r-- | src/struct/character.erl | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/src/struct/character.erl b/src/struct/character.erl index 03906e3..0459214 100644 --- a/src/struct/character.erl +++ b/src/struct/character.erl @@ -8,13 +8,14 @@ character, { id, + owner_id, name, icon, portrait, attributes, - weapons, + statistics, glyphs, - armors + weapon_ids } ). @@ -26,13 +27,17 @@ ( [ get_id/1, + get_owner_id/1, get_name/1, get_icon/1, get_portrait/1, get_attributes/1, - get_weapons/1, - get_armors/1, - get_glyphs/1 + get_statistics/1, + get_weapon_ids/1, + get_glyphs/1, + + set_weapon_ids/2, + set_statistics/2 ] ). @@ -45,10 +50,24 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%% Accessors get_id (Char) -> Char#character.id. +get_owner_id (Char) -> Char#character.owner_id. get_name (Char) -> Char#character.name. get_icon (Char) -> Char#character.icon. get_portrait (Char) -> Char#character.portrait. get_attributes (Char) -> Char#character.attributes. -get_weapons (Char) -> Char#character.weapons. -get_armors (Char) -> Char#character.armors. +get_weapon_ids (Char) -> Char#character.weapon_ids. get_glyphs (Char) -> Char#character.glyphs. + +get_statistics (Char) -> Char#character.statistics. + +set_weapon_ids (WeaponIDs, Char) -> + Char#character + { + weapon_ids = WeaponIDs + }. + +set_statistics (Stats, Char) -> + Char#character + { + statistics = Stats + }. |