Skip to content

Commit

Permalink
Distributing perks before spells.
Browse files Browse the repository at this point in the history
This will allow Spells to also filter by distributed perks.
  • Loading branch information
adya committed Apr 21, 2024
1 parent e245649 commit d9a9e87
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions SPID/src/Distribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ namespace Distribute
},
accumulatedForms);

for_each_form<RE::BGSPerk>(
npcData, forms.perks, input, [&](const std::vector<RE::BGSPerk*>& a_perks) {
npc->AddPerks(a_perks, 1);
},
accumulatedForms);

for_each_form<RE::SpellItem>(
npcData, forms.spells, input, [&](const std::vector<RE::SpellItem*>& a_spells) {
npc->GetSpellList()->AddSpells(a_spells);
Expand All @@ -36,12 +42,6 @@ namespace Distribute
},
accumulatedForms);

for_each_form<RE::BGSPerk>(
npcData, forms.perks, input, [&](const std::vector<RE::BGSPerk*>& a_perks) {
npc->AddPerks(a_perks, 1);
},
accumulatedForms);

for_each_form<RE::TESShout>(
npcData, forms.shouts, input, [&](const std::vector<RE::TESShout*>& a_shouts) {
npc->GetSpellList()->AddShouts(a_shouts);
Expand Down

0 comments on commit d9a9e87

Please sign in to comment.