상속: SagaLib.Packet
예제 #1
0
 /// <summary>
 /// Send a message to the client
 /// </summary>
 /// <param name="from">Who to display the message from</param>
 /// <param name="text">The text to send to the client</param>
 /// <param name="type">Type: NORMAL, PARTY, YELL, SYSTEM_MESSAGE, CHANEL, SYSTEM_MESSAGE_RED</param>
 public void SendMessage(string from, string text, Packets.Server.SendChat.MESSAGE_TYPE type)
 {
     while (text != "")
     {
         string tmp;
         if (text.Length < 62)
         {
             tmp  = text;
             text = "";
         }
         else
         {
             tmp  = text.Substring(0, 62);
             text = text.Substring(62, text.Length - 62);
         }
         Packets.Server.SendChat sendPacket = new Packets.Server.SendChat(tmp.Length);
         sendPacket.SetName(from);
         sendPacket.SetMessage(tmp);
         sendPacket.SetMessageType(type);
         this.netIO.SendPacket(sendPacket, this.SessionID);;
     }
 }
예제 #2
0
 /// <summary>
 /// Send a message to the client
 /// </summary>
 /// <param name="from">Who to display the message from</param>
 /// <param name="text">The text to send to the client</param>
 /// <param name="type">Type: NORMAL, PARTY, YELL, SYSTEM_MESSAGE, CHANEL, SYSTEM_MESSAGE_RED</param>
 public void SendMessage( string from, string text, Packets.Server.SendChat.MESSAGE_TYPE type )
 {
     while (text != "")
     {
         string tmp;
         if (text.Length < 62)
         {
             tmp = text;
             text = "";
         }
         else
         {
             tmp = text.Substring(0, 62);
             text = text.Substring(62, text.Length - 62);
         }
         Packets.Server.SendChat sendPacket = new Packets.Server.SendChat(tmp.Length);
         sendPacket.SetName(from);
         sendPacket.SetMessage(tmp);
         sendPacket.SetMessageType(type);
         this.netIO.SendPacket(sendPacket, this.SessionID);;
     }
 }