breakout object bits into scoped enum (#997)

* breakout object bits into enum class
tested that things still work as expected
use the inplace set bits where appropiate

* add inline
This commit is contained in:
Aaron Kimbrell
2023-04-25 13:17:40 -05:00
committed by GitHub
parent de1ddd3125
commit 4976701f37
17 changed files with 80 additions and 62 deletions

View File

@@ -16,6 +16,7 @@
#include "AssetManager.h"
#include "InventoryComponent.h"
#include "Loot.h"
#include "eObjectBits.h"
#include "eReplicaComponentType.h"
#include "CDBrickIDTableTable.h"
@@ -77,13 +78,13 @@ Item::Item(
LWOOBJID id = ObjectIDManager::GenerateRandomObjectID();
id = GeneralUtils::SetBit(id, OBJECT_BIT_CHARACTER);
id = GeneralUtils::SetBit(id, OBJECT_BIT_PERSISTENT);
GeneralUtils::SetBit(id, eObjectBits::CHARACTER);
GeneralUtils::SetBit(id, eObjectBits::PERSISTENT);
const auto type = static_cast<eItemType>(info->itemType);
if (type == eItemType::MOUNT) {
id = GeneralUtils::SetBit(id, OBJECT_BIT_CLIENT);
GeneralUtils::SetBit(id, eObjectBits::CLIENT);
}
this->id = id;