Esempio n. 1
0
        private static void LeafEmoteToUser(Leaf leaf, TCPPacketReader packet)
        {
            if (leaf.LoginPhase != LinkLogin.Ready)
            {
                leaf.SendPacket(HubOutbound.LinkError(LinkError.BadProtocol));
                leaf.Disconnect();
                return;
            }

            uint leaf_ident = packet;
            Leaf l          = LeafPool.Leaves.Find(x => x.Ident == leaf_ident && x.LoginPhase == LinkLogin.Ready);

            if (l != null)
            {
                String target = packet.ReadString(leaf);
                String sender = packet.ReadString(leaf);
                String text   = packet.ReadString(leaf);
                leaf.SendPacket(HubOutbound.HubEmoteToUser(leaf, target, sender, text));
            }
        }