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

@@ -6,6 +6,7 @@
#include "dLogger.h"
#include "SkillComponent.h"
#include "../dWorldServer/ObjectIDManager.h"
#include "eObjectBits.h"
void ProjectileAttackBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
LWOOBJID target{};
@@ -107,7 +108,7 @@ void ProjectileAttackBehavior::Calculate(BehaviorContext* context, RakNet::BitSt
for (auto i = 0u; i < this->m_projectileCount; ++i) {
auto id = static_cast<LWOOBJID>(ObjectIDManager::Instance()->GenerateObjectID());
id = GeneralUtils::SetBit(id, OBJECT_BIT_SPAWNED);
GeneralUtils::SetBit(id, eObjectBits::SPAWNED);
bitStream->Write(id);