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();