| summaryrefslogtreecommitdiff | 
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-11-08 21:05:47 +0100 | 
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2018-11-08 21:05:47 +0100 | 
| commit | a0d1713808f0682180fa04492a8ccc14627c0748 (patch) | |
| tree | dc6c0fb410c287139010bc3fd0fac22995ddeb65 | |
| parent | 2c0a651bbf8b5521157679bf03f12ceddc80aad4 (diff) | |
Makes roster updates work.
| -rw-r--r-- | src/roster/query/rst_update.erl | 7 | ||||
| -rw-r--r-- | src/shared/struct/shr_db_query.erl | 7 | 
2 files changed, 7 insertions, 7 deletions
| diff --git a/src/roster/query/rst_update.erl b/src/roster/query/rst_update.erl index f2d4942..af421ea 100644 --- a/src/roster/query/rst_update.erl +++ b/src/roster/query/rst_update.erl @@ -79,10 +79,11 @@ authenticate_user (Input) ->  fetch_data (Player, Input) ->     PlayerID = Input#input.player_id,     RosterID = shr_player:get_roster_id(Player), -   InventoryID = shr_player:get_inventory_id(Player), +   _InventoryID = shr_player:get_inventory_id(Player),     Roster = shr_timed_cache:fetch(roster_db, PlayerID, RosterID), -   Inventory = shr_timed_cache:fetch(roster_db, PlayerID, InventoryID), +%   Inventory = shr_timed_cache:fetch(inventory_db, PlayerID, InventoryID), +   Inventory = shr_inventory:new(PlayerID),     #query_state     { @@ -98,7 +99,7 @@ update_data (QueryState, Input) ->     lists:map     ( -      fun (Character) -> +      fun ({_IX, Character}) ->           rst_character:validate(Inventory, Character)        end,        Characters diff --git a/src/shared/struct/shr_db_query.erl b/src/shared/struct/shr_db_query.erl index 8cd7b8a..af8b080 100644 --- a/src/shared/struct/shr_db_query.erl +++ b/src/shared/struct/shr_db_query.erl @@ -148,6 +148,9 @@ apply_set_field (Op, Elem) ->  -spec apply_op_to (db_query_op(), any()) -> any().  apply_op_to (Op, Elem) when is_record(Op, set_field) ->     apply_set_field(Op, Elem); +apply_op_to (MOp, _Elem) when is_record(MOp, set_val) -> +   NewVal = MOp#set_val.val, +   NewVal;  apply_op_to (Op, Elem) when is_record(Op, add_to_field) ->     apply_add_to_field(Op, Elem);  apply_op_to (Op, Elem) when is_record(Op, update_indexed) -> @@ -167,10 +170,6 @@ apply_master_op_to (MOp, Elem) when is_record(MOp, set_write_perm) ->     NewPerm = MOp#set_write_perm.perm,     shr_db_item:set_write_permission(NewPerm, Elem); -apply_master_op_to (MOp, Elem) when is_record(MOp, set_val) -> -   NewVal = MOp#set_val.val, - -   shr_db_item:set_value(NewVal, Elem);  apply_master_op_to (MOp, Elem) ->     OldValue = shr_db_item:get_value(Elem),     NewValue = apply_op_to(MOp, OldValue), | 


