Fix no effect playing when picking up item (#1455)

This commit is contained in:
David Markowitz 2024-02-10 22:29:05 -08:00 committed by GitHub
parent ecaaea3175
commit f7e4a32621
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1682,9 +1682,9 @@ void Entity::PickupItem(const LWOOBJID& objectID) {
std::vector<CDObjectSkills> skills = skillsTable->Query([=](CDObjectSkills entry) {return (entry.objectTemplate == p.second.lot); });
for (CDObjectSkills skill : skills) {
CDSkillBehaviorTable* skillBehTable = CDClientManager::GetTable<CDSkillBehaviorTable>();
CDSkillBehavior behaviorData = skillBehTable->GetSkillByID(skill.skillID);
SkillComponent::HandleUnmanaged(behaviorData.behaviorID, GetObjectID());
auto* skillComponent = GetComponent<SkillComponent>();
if (skillComponent) skillComponent->CastSkill(skill.skillID, GetObjectID(), GetObjectID());
auto* missionComponent = GetComponent<MissionComponent>();