示例#1
0
 private void OnUpdateSign(UpdateSignPacket p)
 {
     if (UpdateSign != null) UpdateSign.Invoke(this, new PacketEventArgs<UpdateSignPacket>(p));
 }
示例#2
0
 public static void ReadUpdateSign(TestClient client, PacketReader reader)
 {
     UpdateSignPacket us = new UpdateSignPacket();
     us.Read(reader);
 }
示例#3
0
        public static void ReadUpdateSign(Client client, PacketReader reader)
        {
            UpdateSignPacket us = new UpdateSignPacket();
            us.Read(reader);

            if (!reader.Failed)
                Client.HandlePacketUpdateSign(client, us);
        }
示例#4
0
        public static void HandlePacketUpdateSign(Client client, UpdateSignPacket packet)
        {
            BlockData.Blocks blockId = (BlockData.Blocks)client.Owner.World.GetBlockId(packet.X, packet.Y, packet.Z);

            UniversalCoords coords = UniversalCoords.FromWorld(packet.X, packet.Y, packet.Z);
            if (blockId == BlockData.Blocks.Sign_Post)
            {
                BlockSignPost sign = (BlockSignPost)BlockHelper.Instance((byte)blockId);
                sign.SaveText(coords, client.Owner, packet.Lines);
            }
        }