public void run(IDataSet dataSet)
        {
            IStreamObj roleObj = dataSet.getData(JObjectType.create_role);

            if (null == roleObj)
            {
                JLog.Error("JProcessorCreateRole.run roleObj is null.");
                return;
            }
            JCreateRoleReqObject createRoleReqObj = roleObj as JCreateRoleReqObject;

            if (null == createRoleReqObj)
            {
                JLog.Error("JProcessorCreateRole.run createRoleReqObj is null.");
                return;
            }

            try {
                JNetworkDataOperator.SendDataToServer(JPacketType.pt_createRole_req, createRoleReqObj);
                JLogicUserData.setLocalData(createRoleReqObj);
            } catch (Exception e) {
                JLog.Debug("JProcessorCreateRole 发送数据失败");
                JLog.Error("JProcessorCreateRole 发送数据失败 " + e.Message);
                return;
            }
        }
Exemple #2
0
 public static void addData(JPacketType type, IStreamObj obj)
 {
     try
     {
         JLogicUserData.setLocalData(obj);
         lock (_locker)
         {
             JLocalDataProcessors.Data.Enqueue(type);
         }
         _semaphore.Release();
     }
     catch (Exception e) {
         JLog.Error("JLocalDataHelper: addData " + e.Message);
     }
 }
        public void run(IDataSet dataSet)
        {
            IStreamObj obj = dataSet.getData(JObjectType.sign_in_ret);

            if (null == obj || null == (obj as JObj_SignRet))
            {
                JLog.Error("JProcesserSignInGet : obj is empty!");
            }

            if ((obj as JObj_SignRet).Result == false)
            {
                JLog.Info("Received JObj_SignRet but account and code is not registed!");
            }
            //todo:...remind to regist
            else if (null != toSignIn)
            {
                JLogicUserData.setLocalData(obj);
                toSignIn();
            }
        }