Ejemplo n.º 1
0
 public QueryUserInfoTask(ISocketHander socketHdr, string nickName, bool isNickName)
 {
     this.socketHdr = socketHdr;
     this.nickName = nickName;
     this.isNickName = isNickName;
     Description = "执行查询用户信息任务.";
 }
Ejemplo n.º 2
0
 public ModifyInsurePassTask(ISocketHander socketHdr, string oldPassword, string newPassword)
 {
     this.socketHdr = socketHdr;
     this.oldPassword = oldPassword;
     this.newPassword = newPassword;
     Description = "执行修改密码任务.";
 }
Ejemplo n.º 3
0
 public HallLoginTask(ISocketHander socketHdr, string Account, string Pwd)
 {
     this.socketHdr = socketHdr;
     mAccount = Account;
     mPwd = Pwd;
     Description = "正在验证用户的和密码.";
 }
Ejemplo n.º 4
0
 public HallConnectTask(ISocketHander socketHdr, string IPAddress, ushort Port)
 {
     this.socketHdr = socketHdr;
     mIPAddress = IPAddress;
     mPort = Port;
     Description = "正在连接到登录服务器.";
 }
Ejemplo n.º 5
0
 private void UnInit()
 {
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_USER_SERVICE, (ushort)USER_SERVICE_SUB.SUB_GP_USER_INSURE_LOGON_SUCCESS);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_USER_SERVICE, (ushort)USER_SERVICE_SUB.SUB_GP_USER_INSURE_LOGON_FAILURE);
     socketHdr = null;
 }
Ejemplo n.º 6
0
 public SafeScoreTask(ISocketHander socketHdr, long score, ushort kindID)
 {
     this.socketHdr = socketHdr;
     this.score = score;
     this.kindID = kindID;
     Description = "执行存款任务.";
 }
Ejemplo n.º 7
0
 public TransScoreTask(ISocketHander socketHdr, long score, string nickName, bool isNickName)
 {
     this.socketHdr = socketHdr;
     this.score = score;
     this.nickName = nickName;
     this.isNickName = isNickName;
     Description = "执行赠送任务.";
 }
Ejemplo n.º 8
0
 public UserManager(IRoom room)
 {
     mRoom = (Room)room;
     mSocketHander = mRoom.SocketHander;
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnUserEnterEvent, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_ENTER, typeof(tagUserInfo));
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnUserStatusEvent, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_STATUS, typeof(CMD_GR_UserStatus));
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnUserScoreEvent, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_SCORE, typeof(CMD_GR_UserScore));
 }
Ejemplo n.º 9
0
 private void UnInit()
 {
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_NODE);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_PAGE);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_SERVER);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_SERVER_FINISH);
     socketHdr = null;
 }
Ejemplo n.º 10
0
        public TableManager(IRoom room)
        {
            mRoom = (Room)room;
            mSocketHander = mRoom.SocketHander;

            //桌子信息
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnTableStatusEvent, (ushort)MAIN_CMD.MDM_GR_STATUS, (ushort)STATUS_SUB_CMD.SUB_GR_TABLE_STATUS, typeof(CMD_GR_TableStatus));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnTableInfoEvent, (ushort)MAIN_CMD.MDM_GR_STATUS, (ushort)STATUS_SUB_CMD.SUB_GR_TABLE_INFO, typeof(CMD_GR_TableInfo));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnSystemMessageEvent, (ushort)MAIN_CMD.MDM_CM_SYSTEM, (ushort)SYSTEM_SUB_CMD.SUB_CM_SYSTEM_MESSAGE, typeof(CMD_CM_SystemMessage));
        }
Ejemplo n.º 11
0
        public void Dispose()
        {
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_STATUS, (ushort)STATUS_SUB_CMD.SUB_GR_TABLE_STATUS);
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_STATUS, (ushort)STATUS_SUB_CMD.SUB_GR_TABLE_INFO);
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_CM_SYSTEM, (ushort)SYSTEM_SUB_CMD.SUB_CM_SYSTEM_MESSAGE);

            mSocketHander = null;
            mRoom = null;
            mTableList.Clear();
            mTableList = null;
        }
Ejemplo n.º 12
0
        private void Init()
        {
            mSocketHander = mRoom.SocketHander;

            //登录部分
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_CONNECT, OnConnectEvent);
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE, OnCloseEvent);
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnLogonSuccessEvent, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_SUCCESS, typeof(CMD_GR_LogonSuccess));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnLogonFailEvent, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_FAILURE, typeof(CMD_GR_LogonFailure));
            mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, OnLogonFinishEvent, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_FINISH);
        }
Ejemplo n.º 13
0
 public void Dispose()
 {
     mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_ENTER);
     mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_REQUEST_FAILURE);
     mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_USER_STATUS);
     foreach(var pair in mPlayerDictionary)
     {
         pair.Value.Dispose();
     }
     mPlayerDictionary.Clear();
     mPlayerDictionary = null;
     mSocketHander = null;
     mRoom = null;
 }
Ejemplo n.º 14
0
        private void UnInit()
        {
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_LOGON, (ushort)LOGON_SUB_CMD.SUB_GP_LOGON_SUCCESS);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_LOGON, (ushort)LOGON_SUB_CMD.SUB_GR_LOGON_FAILURE);

            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_TYPE);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_KIND);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_NODE);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_PAGE);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_SERVER);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GP_SERVER_LIST, (ushort)SERVER_LIST_SUB_CMD.SUB_GP_LIST_FINISH);
            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GP_LOGON_FINISH);

            socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_LOGON, (ushort)LOGON_SUB_CMD.SUB_GP_VALIDATE_PASSPORT_ID);
            socketHdr = null;
        }
Ejemplo n.º 15
0
 public HallGetServerTask(ISocketHander socketHdr,ushort[] GameKinds)
 {
     this.socketHdr = socketHdr;
     Description = "正在获取游戏列表.";
     mGameKinds = GameKinds;
 }
Ejemplo n.º 16
0
 private void UnInit()
 {
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_CONNECT);
     socketHdr.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE);
     socketHdr = null;
 }
Ejemplo n.º 17
0
 public QueryInsureTask(ISocketHander socketHdr)
 {
     this.socketHdr = socketHdr;
     Description = "查询保险箱存款任务.";
 }
Ejemplo n.º 18
0
 public QueryTransferRecordTask(ISocketHander socketHdr)
 {
     this.socketHdr = socketHdr;
     Description = "执行查询转帐信息任务.";
 }
Ejemplo n.º 19
0
 public QueryGameInsureTask(ISocketHander socketHdr, ushort kindID)
 {
     this.socketHdr = socketHdr;
     this.kindID = kindID;
     Description = "查询游戏存款任务.";
 }
Ejemplo n.º 20
0
        public void Dispose()
        {
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_USER, (ushort)USER_SUB_CMD.SUB_GR_REQUEST_FAILURE);

            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_CONFIG, (ushort)CONFIG_SUB_CMD.SUB_GR_CONFIG_COLUMN);
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_CONFIG, (ushort)CONFIG_SUB_CMD.SUB_GR_CONFIG_SERVER);
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_CONFIG, (ushort)CONFIG_SUB_CMD.SUB_GR_CONFIG_PROPERTY);
            mSocketHander.RemoveListener(this, ENUM_SOCKET_EVENT.EVENT_MESSAGE, (ushort)MAIN_CMD.MDM_GR_CONFIG, (ushort)CONFIG_SUB_CMD.SUB_GR_CONFIG_FINISH);

            mUserManager.Dispose();
            mTableManager.Dispose();
            if (mSocketHander.IsValid())
                mSocketHander.Shutdown();

            mTableManager = null;
            mSocketHander = null;
            mUserManager = null;
        }
Ejemplo n.º 21
0
 private void Init()
 {
     mSocketHander = mRoom.SocketHander;
     mSocketHander.AddListener(this, ENUM_SOCKET_EVENT.EVENT_CLOSE, OnCloseEvent);
 }
Ejemplo n.º 22
0
 public BankLoginTask(ISocketHander socketHdr, string Pwd)
 {
     this.socketHdr = socketHdr;
     mPwd = Pwd;
     Description = "正在验证保险箱密码.";
 }
Ejemplo n.º 23
0
 public void Dispose()
 {
     if (skHall != null)
         skHall.Shutdown();
     skHall = null;
 }