Skip to content

Commit

Permalink
Add MagicItem::IsHostile
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Jan 18, 2024
1 parent 78f140e commit 248c2d2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion include/RE/I/IngredientItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ namespace RE
// override (BGSKeywordForm)
[[nodiscard]] BGSKeyword* GetDefaultKeyword() const override; // 05

[[nodiscard]] bool IsHostile() const;
bool LearnEffect(std::uint32_t a_index);
bool LearnEffect(EffectSetting* a_effect);
std::optional<std::uint32_t> LearnNextEffect();
Expand Down
1 change: 1 addition & 0 deletions include/RE/M/MagicItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ namespace RE
[[nodiscard]] std::int32_t GetLargestArea() const;
[[nodiscard]] std::uint32_t GetLongestDuration() const;
[[nodiscard]] bool HasEffect(EffectArchetype a_archetype);
[[nodiscard]] bool IsHostile() const;
[[nodiscard]] bool IsPermanent() const;
void Traverse(MagicItemTraversalFunctor& a_visitor) const;

Expand Down
5 changes: 0 additions & 5 deletions src/RE/I/IngredientItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@

namespace RE
{
bool IngredientItem::IsHostile() const
{
return hostileCount > 0;
}

bool IngredientItem::LearnEffect(std::uint32_t a_index)
{
if (a_index < 4) {
Expand Down
5 changes: 5 additions & 0 deletions src/RE/M/MagicItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ namespace RE
return func(this, a_archetype);
}

bool MagicItem::IsHostile() const
{
return hostileCount > 0;
}

bool MagicItem::IsPermanent() const
{
using func_t = decltype(&MagicItem::IsPermanent);
Expand Down

0 comments on commit 248c2d2

Please sign in to comment.