Skip to content

Commit

Permalink
Add Actor::IsDualCasting
Browse files Browse the repository at this point in the history
  • Loading branch information
powerof3 committed Feb 5, 2024
1 parent 00e8238 commit cdc067f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions include/RE/A/Actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ namespace RE
bool IsCasting(MagicItem* a_spell) const;
bool IsCommandedActor() const;
bool IsCurrentShout(SpellItem* a_power);
bool IsDualCasting() const;
bool IsEssential() const;
bool IsFactionInCrimeGroup(const TESFaction* a_faction) const;
bool IsGhost() const;
Expand Down
16 changes: 13 additions & 3 deletions src/RE/A/Actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -741,14 +741,24 @@ namespace RE
return boolFlags.all(BOOL_FLAGS::kIsCommandedActor);
}

bool Actor::IsCurrentShout(SpellItem* a_spell)
bool Actor::IsCurrentShout(SpellItem* a_power)
{
using func_t = decltype(&Actor::IsCurrentShout);
REL::Relocation<func_t> func{ RELOCATION_ID(37858, 38812) };
return func(this, a_spell);
return func(this, a_power);
}

bool Actor::IsDualCasting() const
{
if (!currentProcess) {
return false;
}

const auto highProcess = currentProcess->high;
return highProcess && highProcess->isDualCasting;
}

bool Actor::IsEssential() const
bool Actor::IsEssential() const
{
return boolFlags.all(BOOL_FLAGS::kEssential);
}
Expand Down

0 comments on commit cdc067f

Please sign in to comment.