예제 #1
0
 public void prepare(ChatReceiveContext context, string world, uint entityID, string name, string message)
 {
     tmpArray.Add("context", context);
     tmpArray.Add("world", world);
     tmpArray.Add("entityID", entityID);
     tmpArray.Add("name", name);
     tmpArray.Add("message", message);
 }
예제 #2
0
 public void prepare(ChatReceiveContext context, string message)
 {
     tmpArray.Add("context", context);
     tmpArray.Add("world", "");
     tmpArray.Add("entityID", 0);
     tmpArray.Add("name", "");
     tmpArray.Add("message", message);
 }
예제 #3
0
        public void sendChatMessage(ChatReceiveContext context, string world, uint clientID, string name, string message)
        {
            if (state != ClientState.Connected)
            {
                return;
            }
            Packet11ChatSend packet = new Packet11ChatSend(this, Util.Direction.Client);

            packet.prepare(context, world, clientID, name, message);

            this.packetQueue.Add(packet);
        }
예제 #4
0
        public override void onSend()
        {
            if (tmpArray.Count < 5)
            {
                return;
            }

            MemoryStream packet      = new MemoryStream();
            BinaryWriter packetWrite = new BinaryWriter(packet);

            ChatReceiveContext sContext = (ChatReceiveContext)tmpArray["context"];
            string             sWorld   = (string)tmpArray["world"];
            uint   sClientID            = (uint)tmpArray["entityID"]; // Player entity ID
            string sName    = (string)tmpArray["name"];               // Name
            string sMessage = (string)tmpArray["message"];            // Message

            packetWrite.Write((byte)sContext);
            packetWrite.WriteStarString(sWorld);
            packetWrite.WriteBE(sClientID);
            packetWrite.WriteStarString(sName);
            packetWrite.WriteStarString(sMessage);
            this.client.sendClientPacket(Packet.ChatReceive, packet.ToArray());
        }
 public void prepare(ChatReceiveContext context, string world, uint entityID, string name, string message)
 {
     tmpArray.Add("context", context);
     tmpArray.Add("world", world);
     tmpArray.Add("entityID", entityID);
     tmpArray.Add("name", name);
     tmpArray.Add("message", message);
 }
 public void prepare(ChatReceiveContext context, string message)
 {
     tmpArray.Add("context", context);
     tmpArray.Add("world", "");
     tmpArray.Add("entityID", 0);
     tmpArray.Add("name", "");
     tmpArray.Add("message", message);
 }
예제 #7
0
 public void sendChatMessage(ChatReceiveContext context, string world, uint clientID, string name, string message)
 {
     if (clientState != ClientState.Connected) return;
     Packet11ChatSend packet = new Packet11ChatSend(this, false, Util.Direction.Client);
     packet.prepare(context, world, clientID, name, message);
     packet.onSend();
 }
예제 #8
0
 public void sendChatMessage(ChatReceiveContext context, string name, string message)
 {
     sendChatMessage(context, "", 0, name, message);
 }
예제 #9
0
 public void sendChatMessage(ChatReceiveContext context, string name, string message)
 {
     if (state != ClientState.Connected) return;
     Packet11ChatSend packet = new Packet11ChatSend(this, Util.Direction.Client);
     packet.prepare(context, "", 0, name, message);
     packet.onSend();
 }
예제 #10
0
 public void sendChatMessage(ChatReceiveContext context, string name, string message)
 {
     sendChatMessage(context, "", 0, name, message);
 }