예제 #1
0
 public void OnLeaveGame(AgentGameProto.LeaveGameRequest request, long clientId)
 {
     if (_clientRoleDict.TryGetValue(clientId, out var roleId))
     {
         Items.Remove(roleId);
         _clientRoleDict.Remove(clientId);
     }
 }
예제 #2
0
        public void OnLeaveGame(AgentGameProto.LeaveGameRequest request, long clientId)
        {
            RemoveItem(request.UserId);

            var timeoutLinker = _userTimeoutLinker.GetValueOrDefault(clientId);

            if (timeoutLinker != null)
            {
                timeoutLinker.Valid = false;
                _userTimeoutLinker.Remove(clientId);
            }

            _userTick.Remove(clientId);
        }