Пример #1
0
        private void ISetPlayer()
        {
            pnCli2Auth_AcctSetPlayerRequest req = new pnCli2Auth_AcctSetPlayerRequest();
            req.Read(fStream);

            if (fAcctGuid == Guid.Empty) {
                pnAuth2Cli_AcctSetPlayerReply reply = new pnAuth2Cli_AcctSetPlayerReply();
                reply.fResult = ENetError.kNetErrPlayerNotFound;
                reply.fTransID = req.fTransID;
                reply.Send(fStream);
            } else {
                fVaultCli.SetPlayer(req.fPlayerID, fAcctGuid,
                    new pnCallback(new pnVaultPlayerSet(IOnPlayerSet), new PlayerSetData(req.fTransID, req.fPlayerID)));
            }
        }
Пример #2
0
        private void IOnPlayerSet(ENetError result, object param)
        {
            PlayerSetData tag = (PlayerSetData)param;
            fPlayerID = tag.fPlayerID;

            pnAuth2Cli_AcctSetPlayerReply reply = new pnAuth2Cli_AcctSetPlayerReply();
            reply.fResult = result;
            reply.fTransID = tag.fTransID;
            lock (fStream) reply.Send(fStream);
        }