summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/roster/query/rst_update.erl7
-rw-r--r--src/shared/struct/shr_db_query.erl7
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),