diff options
Diffstat (limited to 'Client/Assets/Scripts/XUtliPoolLib/AuctionDiscountTable.cs')
-rw-r--r-- | Client/Assets/Scripts/XUtliPoolLib/AuctionDiscountTable.cs | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/Client/Assets/Scripts/XUtliPoolLib/AuctionDiscountTable.cs b/Client/Assets/Scripts/XUtliPoolLib/AuctionDiscountTable.cs new file mode 100644 index 00000000..3fe597e8 --- /dev/null +++ b/Client/Assets/Scripts/XUtliPoolLib/AuctionDiscountTable.cs @@ -0,0 +1,44 @@ +using System;
+
+namespace XUtliPoolLib
+{
+ public class AuctionDiscountTable : CVSReader
+ {
+ public AuctionDiscountTable.RowData[] Table = null;
+
+ public class RowData
+ {
+ public uint Type;
+
+ public uint Group;
+
+ public float Discount;
+ }
+
+ protected override void ReadLine(XBinaryReader reader)
+ {
+ AuctionDiscountTable.RowData rowData = new AuctionDiscountTable.RowData();
+ base.Read<uint>(reader, ref rowData.Type, CVSReader.uintParse);
+ this.columnno = 0;
+ base.Read<uint>(reader, ref rowData.Group, CVSReader.uintParse);
+ this.columnno = 1;
+ base.Read<float>(reader, ref rowData.Discount, CVSReader.floatParse);
+ this.columnno = 2;
+ this.Table[this.lineno] = rowData;
+ this.columnno = -1;
+ }
+
+ protected override void OnClear(int lineCount)
+ {
+ bool flag = lineCount > 0;
+ if (flag)
+ {
+ this.Table = new AuctionDiscountTable.RowData[lineCount];
+ }
+ else
+ {
+ this.Table = null;
+ }
+ }
+ }
+}
|