@Override
    public void deserialize(Buffer buf) {
        teleporterType = buf.readByte();
        if (teleporterType < 0)
            throw new RuntimeException("Forbidden value on teleporterType = " + teleporterType + ", it doesn't respect the following condition : teleporterType < 0");
        int limit = buf.readUShort();
        mapIds = new int[limit];
        for (int i = 0; i < limit; i++) {
            mapIds[i] = buf.readInt();
        }
        limit = buf.readUShort();
        subAreaIds = new short[limit];
        for (int i = 0; i < limit; i++) {
            subAreaIds[i] = buf.readShort();
        }
        limit = buf.readUShort();
        costs = new short[limit];
        for (int i = 0; i < limit; i++) {
            costs[i] = buf.readShort();
        }
    }