sort bank contents before sending to client

This commit is contained in:
Martin Michelsen
2023-12-04 18:43:37 -08:00
parent 33bbb15bf0
commit 2360beb77b
5 changed files with 29 additions and 1 deletions
+11
View File
@@ -43,6 +43,17 @@ bool ItemData::operator!=(const ItemData& other) const {
return !this->operator==(other);
}
bool ItemData::operator<(const ItemData& other) const {
for (size_t z = 0; z < 3; z++) {
if (this->data1db[z] < other.data1db[z]) {
return true;
} else if (this->data1db[z] > other.data1db[z]) {
return false;
}
}
return (this->data2db < other.data2db);
}
void ItemData::clear() {
this->data1d.clear(0);
this->id = 0xFFFFFFFF;