Example #1
0
        private void HandleUserPrivateMsg(GSPacketIn pkg, int playerid)
        {
            ServerClient client = LoginMgr.GetServerClient(playerid);

            if (client != null)
            {
                client.SendTCP(pkg);
            }
        }
Example #2
0
        private void HandleUserPrivateMsg(GSPacketIn pkg, int playerid)
        {
            ServerClient serverClient = LoginMgr.GetServerClient(playerid);

            if (serverClient == null)
            {
                return;
            }
            serverClient.SendTCP(pkg);
        }
        public bool ChargeMoney(int userID, string chargeID)
        {
            ServerClient client = LoginMgr.GetServerClient(userID);

            if (client != null)
            {
                client.SendChargeMoney(userID, chargeID);
                return(true);
            }
            return(false);
        }
Example #4
0
        public void HandleQuestUserState(GSPacketIn pkg)
        {
            int num = pkg.ReadInt();

            if (LoginMgr.GetServerClient(num) == null)
            {
                this.SendUserState(num, false);
            }
            else
            {
                this.SendUserState(num, true);
            }
        }
Example #5
0
        public void HandleQuestUserState(GSPacketIn pkg)
        {
            int          playerid = pkg.ReadInt();
            ServerClient client   = LoginMgr.GetServerClient(playerid);

            if (client == null)
            {
                this.SendUserState(playerid, false);
            }
            else
            {
                this.SendUserState(playerid, true);
            }
        }
 public bool KitoffUser(int playerID, string msg)
 {
     try
     {
         ServerClient client = LoginMgr.GetServerClient(playerID);
         if (client != null)
         {
             msg = string.IsNullOrEmpty(msg) ? "You are kicking out by GM!" : msg;
             client.SendKitoffUser(playerID, msg);
             LoginMgr.RemovePlayer(playerID);
             return(true);
         }
     }
     catch {}
     return(false);
 }
 public bool MailNotice(int playerID)
 {
     try
     {
         ServerClient client = LoginMgr.GetServerClient(playerID);
         if (client != null)
         {
             GSPacketIn pkgMsg = new GSPacketIn((byte)ePackageType.MAIL_RESPONSE);
             pkgMsg.WriteInt(playerID);
             pkgMsg.WriteInt((int)eMailRespose.Receiver);
             client.SendTCP(pkgMsg);
             return(true);
         }
     }
     catch {}
     return(false);
 }
Example #8
0
        /// <summary>
        /// 用户的私有消息
        /// </summary>
        /// <param name="pkg"></param>
        private void HandleUserPrivateMsg(GSPacketIn pkg, int playerid)
        {
            ServerClient client = LoginMgr.GetServerClient(playerid);

            if (client != null)
            {
                client.SendTCP(pkg);
            }
            //else
            //{
            //    int id = pkg.ClientID;
            //    string nickName = pkg.ReadString();
            //    GSPacketIn packet = new GSPacketIn((byte)ePackageType.SYS_MESS);
            //    packet.WriteInt(1);
            //    packet.WriteInt(id);
            //    packet.WriteString(nickName);
            //}
        }
Example #9
0
        public void HandleChatPersonal(GSPacketIn pkg)
        {
            ServerClient serverClient = LoginMgr.GetServerClient(pkg.ReadInt());

            if (serverClient != null)
            {
                serverClient.SendTCP(pkg);
            }
            else
            {
                int        clientId = pkg.ClientID;
                string     str      = pkg.ReadString();
                GSPacketIn pkg1     = new GSPacketIn((short)38);
                pkg1.WriteInt(1);
                pkg1.WriteInt(clientId);
                pkg1.WriteString(str);
                this.SendTCP(pkg1);
            }
        }
Example #10
0
 public bool MailNotice(int playerID)
 {
     try
     {
         ServerClient serverClient = LoginMgr.GetServerClient(playerID);
         if (serverClient != null)
         {
             GSPacketIn gSPacketIn = new GSPacketIn(117);
             gSPacketIn.WriteInt(playerID);
             gSPacketIn.WriteInt(1);
             serverClient.SendTCP(gSPacketIn);
             return(true);
         }
     }
     catch
     {
     }
     return(false);
 }
Example #11
0
        /// <summary>
        /// 私聊
        /// </summary>
        /// <param name="pkg"></param>
        public void HandleChatPersonal(GSPacketIn pkg)
        {
            int          playerid = pkg.ReadInt();
            ServerClient client   = LoginMgr.GetServerClient(playerid);

            if (client != null)
            {
                client.SendTCP(pkg);
            }
            else
            {
                int        id       = pkg.ClientID;
                string     nickName = pkg.ReadString();
                GSPacketIn packet   = new GSPacketIn((byte)ePackageType.SYS_MESS);
                packet.WriteInt(1);
                packet.WriteInt(id);
                packet.WriteString(nickName);
                SendTCP(packet);
            }
        }
Example #12
0
        public static bool KitoffUser(int playerID, string msg)
        {
            bool result;

            try
            {
                ServerClient client = LoginMgr.GetServerClient(playerID);
                if (client != null)
                {
                    msg = (string.IsNullOrEmpty(msg) ? "You are kicking out by GM!" : msg);
                    client.SendKitoffUser(playerID, msg);
                    LoginMgr.RemovePlayer(playerID);
                    result = true;
                    return(result);
                }
            }
            catch
            {
            }
            result = false;
            return(result);
        }
Example #13
0
        public static bool MailNotice(int playerID)
        {
            bool result;

            try
            {
                ServerClient client = LoginMgr.GetServerClient(playerID);
                if (client != null)
                {
                    GSPacketIn pkgMsg = new GSPacketIn(117);
                    pkgMsg.WriteInt(playerID);
                    pkgMsg.WriteInt(1);
                    client.SendTCP(pkgMsg);
                    result = true;
                    return(result);
                }
            }
            catch
            {
            }
            result = false;
            return(result);
        }