diff --git a/src/EventListener.cpp b/src/EventListener.cpp index 13eecc7..17c4902 100644 --- a/src/EventListener.cpp +++ b/src/EventListener.cpp @@ -48,7 +48,7 @@ auto EventListener::ProcessEvent( bool bIsHide = keywordForm && keywordForm->HasKeyword(keywordHide); bool bIsIngot = keywordForm && keywordForm->HasKeyword(keywordIngot); - bool bIsAmmo = (baseObj->IsAmmo() || baseObj->Is(RE::FormType::ProjectileArrow)) && baseObj->GetPlayable(); + bool bIsAmmo = (baseObj->IsAmmo() || baseObj->Is(RE::FormType::Projectile)) && baseObj->GetPlayable(); bool bIsFlora = !bIsCoinPouch && baseObj->Is(RE::FormType::Flora) && (produceItem = baseObj->As()->produceItem); bool bIsTree = baseObj->Is(RE::FormType::Tree) && (produceItem = baseObj->As()->produceItem); @@ -81,7 +81,7 @@ auto EventListener::ProcessEvent( return RE::BSContainer::ForEachResult::kContinue; } - if (a_ref->IsDisabled() || (a_ref == baseRef) || IsTaken(a_ref) || a_ref->IsActivationBlocked() || !a_ref->Is3DLoaded()) { + if (a_ref->IsDisabled() || IsTaken(a_ref) || a_ref->IsActivationBlocked() || !a_ref->Is3DLoaded()) { return RE::BSContainer::ForEachResult::kContinue; } @@ -96,7 +96,7 @@ auto EventListener::ProcessEvent( } } else if (bIsAmmo) { - if ((a_refBase->IsAmmo() || a_refBase->Is(RE::FormType::ProjectileArrow)) && a_refBase->GetPlayable()) { + if ((a_refBase->IsAmmo() || a_refBase->Is(RE::FormType::Projectile)) && a_refBase->GetPlayable()) { bAdd = true; } @@ -139,7 +139,7 @@ auto EventListener::ProcessEvent( std::this_thread::sleep_for(std::chrono::milliseconds(100)); SKSE::GetTaskInterface()->AddTask([&item]() { if (item && item->formID) { - item->ActivateRef(RE::PlayerCharacter::GetSingleton(), 0, nullptr, 1, false); + item->ActivateRef(RE::PlayerCharacter::GetSingleton(), 0, nullptr, item->extraList.GetCount(), false); } }); } diff --git a/src/EventListener.h b/src/EventListener.h index d5f3c5b..b5d1a2a 100644 --- a/src/EventListener.h +++ b/src/EventListener.h @@ -27,6 +27,7 @@ public: RE::FormType::Tree, RE::FormType::Ammo, RE::FormType::Ingredient, + RE::FormType::Projectile, }; static RE::BGSKeyword* keywordGem;