diff --git a/core/src/com/riiablo/codec/excel/Excel.java b/core/src/com/riiablo/codec/excel/Excel.java index c5cfb2c0..d6c82c2f 100644 --- a/core/src/com/riiablo/codec/excel/Excel.java +++ b/core/src/com/riiablo/codec/excel/Excel.java @@ -67,15 +67,17 @@ public abstract class Excel implements Iterable { @Retention(RetentionPolicy.RUNTIME) public @interface Column { /** Used to index format */ - int startIndex() default 0; + int startIndex() default 0; /** Used to index format */ - int endIndex() default 0; + int endIndex() default 0; /** Format of column name, if not set, then field name is used */ - String format() default ""; + String format() default ""; /** Used to index format not non-numerical indexes */ - String values()[] default {}; + String values()[] default {}; /** Sets index of column of value (used for cases like weapons.txt where one column has no name) */ - int columnIndex() default -1; + int columnIndex() default -1; + /** Whether or not to read/write value in bin codec */ + boolean bin() default true; } @Target(ElementType.FIELD) diff --git a/tools/src/com/riiablo/codec/excel/ExcelGenerationTool.java b/tools/src/com/riiablo/codec/excel/ExcelGenerationTool.java index 6ef1d222..db4da947 100644 --- a/tools/src/com/riiablo/codec/excel/ExcelGenerationTool.java +++ b/tools/src/com/riiablo/codec/excel/ExcelGenerationTool.java @@ -15,6 +15,8 @@ public class ExcelGenerationTool { Field[] fields = clazz.getFields(); for (int i = 0; i < fields.length; i++) { Field field = fields[i]; + Excel.Entry.Column column = field.getAnnotation(Excel.Entry.Column.class); + if (!column.bin()) continue; Class type = field.getType(); if (type.isArray()) { type = type.getComponentType(); @@ -29,6 +31,7 @@ public class ExcelGenerationTool { for (int i = 0; i < fields.length; i++) { Field field = fields[i]; Excel.Entry.Column column = field.getAnnotation(Excel.Entry.Column.class); + if (!column.bin()) continue; Class type = field.getType(); if (type.isArray()) { type = type.getComponentType();