two tables done

This commit is contained in:
David Markowitz
2023-07-25 21:29:06 -07:00
parent ff173dffce
commit 771eb65b92
16 changed files with 60 additions and 74 deletions

View File

@@ -17,10 +17,11 @@ void FireFirstSkillonStartup::OnStartup(Entity* self) {
// For each skill, cast it with the associated behavior ID.
for (auto skill : skills) {
CDSkillBehaviorTable* skillBehaviorTable = CDClientManager::Instance().GetTable<CDSkillBehaviorTable>();
CDSkillBehavior behaviorData = skillBehaviorTable->GetSkillByID(skill.skillID);
auto behaviorData = skillBehaviorTable->GetSkillByID(skill.skillID);
if (!behaviorData) continue;
// Should parent entity be null, make the originator self.
const auto target = self->GetParentEntity() ? self->GetParentEntity()->GetObjectID() : self->GetObjectID();
skillComponent->CalculateBehavior(skill.skillID, behaviorData.behaviorID, LWOOBJID_EMPTY, false, false, target);
skillComponent->CalculateBehavior(skill.skillID, behaviorData->behaviorID, LWOOBJID_EMPTY, false, false, target);
}
}