Skip to content

Commit

Permalink
maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 authored and github-actions[bot] committed Mar 4, 2024
1 parent 42dba26 commit 9dfa1b4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion SPID/include/DistributeManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace Distribute
namespace detail
{
bool should_process_NPC(RE::TESNPC* a_npc, RE::BGSKeyword* a_keyword = processed);

void equip_worn_outfit(RE::Actor* actor, const RE::BGSOutfit* a_outfit);
void force_equip_outfit(RE::Actor* a_actor, const RE::TESNPC* a_npc);
}
Expand Down
6 changes: 3 additions & 3 deletions SPID/src/Distribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,17 @@ namespace Distribute
if (!actor->IsDead()) {
actor->ResetInventory(false);
}

for_each_form<RE::BGSOutfit>(a_npcData, Forms::outfits, a_input, [&](auto* a_outfit) {
if (detail::can_equip_outfit(npc, a_outfit)) {
if (detail::can_equip_outfit(npc, a_outfit)) {
actor->RemoveOutfitItems(npc->defaultOutfit);
npc->defaultOutfit = a_outfit;
npc->AddKeyword(processedOutfit);
return true;
}
return false;
});

for_each_form<RE::TESBoundObject>(a_npcData, Forms::items, a_input, [&](std::map<RE::TESBoundObject*, IdxOrCount>& a_objects, const bool a_hasLvlItem) {
if (npc->AddObjectsToContainer(a_objects, npc)) {
if (a_hasLvlItem) {
Expand Down
4 changes: 2 additions & 2 deletions SPID/src/DistributeManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ namespace Distribute

if (const auto processLists = RE::ProcessLists::GetSingleton()) {
timer.start();

for (auto& actorHandle : processLists->lowActorHandles) {
if (const auto& actor = actorHandle.get()) {
if (const auto npc = actor->GetActorBase(); npc && detail::should_process_NPC(npc)) {
Expand All @@ -182,7 +182,7 @@ namespace Distribute
}
}
}
timer.end();
timer.end();
}

LogResults(actorCount);
Expand Down

0 comments on commit 9dfa1b4

Please sign in to comment.