Ejemplo n.º 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);;
     }
 }
Ejemplo n.º 2
0
 public ChatArgs(Packets.Server.SendChat.MESSAGE_TYPE mType, string text)
 {
     this.mType = mType;
     this.text  = text;
 }
Ejemplo n.º 3
0
 public ChatArgs(Packets.Server.SendChat.MESSAGE_TYPE mType, string text)
 {
     this.mType = mType;
     this.text = text;
 }