From 8fc1c0c5c8cf0ad24dc540248169cfed956dd4f2 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Sat, 10 Feb 2024 22:15:37 -0800 Subject: [PATCH] Fix no effect playing when picking up item --- dGame/Entity.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 16169887..269b4cc4 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -1682,9 +1682,9 @@ void Entity::PickupItem(const LWOOBJID& objectID) { std::vector skills = skillsTable->Query([=](CDObjectSkills entry) {return (entry.objectTemplate == p.second.lot); }); for (CDObjectSkills skill : skills) { CDSkillBehaviorTable* skillBehTable = CDClientManager::GetTable(); - CDSkillBehavior behaviorData = skillBehTable->GetSkillByID(skill.skillID); - SkillComponent::HandleUnmanaged(behaviorData.behaviorID, GetObjectID()); + auto* skillComponent = GetComponent(); + if (skillComponent) skillComponent->CastSkill(skill.skillID, GetObjectID(), GetObjectID()); auto* missionComponent = GetComponent();