diff --git a/include/records.hrl b/include/records.hrl index 3a40fa7..e8c0af1 100644 --- a/include/records.hrl +++ b/include/records.hrl @@ -18,7 +18,7 @@ %% along with EGS. If not, see . %% @doc Per-process state used by the various EGS modules. --record(state, {socket, gid, lid=16#ffff, areanb=0}). +-record(state, {socket, gid, slot, lid=16#ffff, areanb=0}). %% @doc Table containing counters current values. -record(counters, {name, id}). diff --git a/src/egs_char_select.erl b/src/egs_char_select.erl index e509cf3..659b641 100644 --- a/src/egs_char_select.erl +++ b/src/egs_char_select.erl @@ -86,7 +86,7 @@ event({char_select_enter, Slot, _BackToPreviousField}, State=#state{gid=GID}) -> egs_user_model:item_add(GID, 16#01010b00, #psu_striking_weapon_item_variables{current_pp=99, max_pp=100, element=#psu_element{type=3, percent=50}}), {ok, User3} = egs_user_model:read(GID), psu_game:char_load(User3), - {ok, egs_game, State}. + {ok, egs_game, State#state{slot=Slot}}. %% Internal.