summaryrefslogtreecommitdiff |
diff options
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 + }. |