I hope this works

This commit is contained in:
David Markowitz
2023-06-06 20:48:30 -07:00
parent 716a5fcf37
commit ea9d0d8592
25 changed files with 1024 additions and 1014 deletions

View File

@@ -4,13 +4,12 @@
#include "BehaviorBranchContext.h"
#include "BuffComponent.h"
void ApplyBuffBehavior::Handle(BehaviorContext* context, RakNet::BitStream* bitStream, BehaviorBranchContext branch) {
auto* entity = EntityManager::Instance()->GetEntity(branch.target == LWOOBJID_EMPTY ? context->originator : branch.target);
if (entity == nullptr) return;
auto* buffComponent = entity->GetComponent<BuffComponent>();
auto buffComponent = entity->GetComponent<BuffComponent>();
if (buffComponent == nullptr) return;
@@ -23,7 +22,7 @@ void ApplyBuffBehavior::UnCast(BehaviorContext* context, BehaviorBranchContext b
if (entity == nullptr) return;
auto* buffComponent = entity->GetComponent<BuffComponent>();
auto buffComponent = entity->GetComponent<BuffComponent>();
if (buffComponent == nullptr) return;