implement some BB quest commands

This commit is contained in:
Martin Michelsen
2023-10-19 15:34:06 -07:00
parent 4bc5f1b90f
commit 5a30272869
14 changed files with 307 additions and 97 deletions
+21
View File
@@ -125,6 +125,27 @@ bool ItemData::is_wrapped() const {
}
}
void ItemData::wrap() {
switch (this->data1[0]) {
case 0:
case 1:
this->data1[4] |= 0x40;
break;
case 2:
this->data2[2] |= 0x40;
break;
case 3:
if (!this->is_stackable()) {
this->data1[3] |= 0x40;
}
break;
case 4:
break;
default:
throw runtime_error("invalid item data");
}
}
void ItemData::unwrap() {
switch (this->data1[0]) {
case 0: