madden-franchise 2.3.10 → 2.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FranchiseFileTable.js +22 -0
- package/package.json +1 -1
package/FranchiseFileTable.js
CHANGED
|
@@ -157,6 +157,28 @@ class FranchiseFileTable extends EventEmitter {
|
|
|
157
157
|
|
|
158
158
|
this._setNextRecordToUseBuffer(nextRecordToUse);
|
|
159
159
|
this.emptyRecords = this._parseEmptyRecords();
|
|
160
|
+
this.emit('change');
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
async replaceRawData(buf, shouldReadRecords) {
|
|
165
|
+
this.data = buf;
|
|
166
|
+
|
|
167
|
+
// Reset fields
|
|
168
|
+
this.recordsRead = false;
|
|
169
|
+
this.header = this.strategy.parseHeader(this.data);
|
|
170
|
+
this.name = this.header.name;
|
|
171
|
+
this.isArray = this.header.isArray;
|
|
172
|
+
this.loadedOffsets = [];
|
|
173
|
+
this.isChanged = false;
|
|
174
|
+
this.records = [];
|
|
175
|
+
this.table2Records = [];
|
|
176
|
+
this.arraySizes = [];
|
|
177
|
+
this.emptyRecords = new Map();
|
|
178
|
+
|
|
179
|
+
// Re-read records if desired
|
|
180
|
+
if (shouldReadRecords) {
|
|
181
|
+
return this.readRecords();
|
|
160
182
|
}
|
|
161
183
|
};
|
|
162
184
|
|