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

@@ -35,7 +35,7 @@ uint32_t BehaviorContext::GetUniqueSkillId() const {
return 0;
}
auto* component = entity->GetComponent<SkillComponent>();
auto component = entity->GetComponent<SkillComponent>();
if (component == nullptr) {
Game::logger->Log("BehaviorContext", "No skill component attached to (%llu)!", this->originator);;
@@ -331,8 +331,8 @@ std::vector<LWOOBJID> BehaviorContext::GetValidTargets(int32_t ignoreFaction, in
}
if (ignoreFaction || includeFaction || (!entity->HasComponent(eReplicaComponentType::PHANTOM_PHYSICS) && targets.empty())) {
DestroyableComponent* destroyableComponent;
if (!entity->TryGetComponent(eReplicaComponentType::DESTROYABLE, destroyableComponent)) {
auto destroyableComponent = entity->GetComponent<DestroyableComponent>();
if (!destroyableComponent) {
return targets;
}