mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 01:34:07 +00:00
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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user