mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 00:40:53 +01:00
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
#include "EffectItem.h"
|
|
|
|
#include <Games/Magic/MagicSystem.h>
|
|
#include <Forms/EffectSetting.h>
|
|
|
|
bool EffectItem::IsHealingEffect() const noexcept
|
|
{
|
|
return pEffectSetting->eArchetype == EffectArchetypes::ArchetypeID::kValueModifier && data.fMagnitude > 0.0f;
|
|
}
|
|
|
|
bool EffectItem::IsSummonEffect() const noexcept
|
|
{
|
|
return pEffectSetting->eArchetype == EffectArchetypes::ArchetypeID::kSummonCreature;
|
|
}
|
|
|
|
bool EffectItem::IsSlowEffect() const noexcept
|
|
{
|
|
return pEffectSetting->eArchetype == EffectArchetypes::ArchetypeID::kSlowTime;
|
|
}
|
|
|
|
bool EffectItem::IsInivisibilityEffect() const noexcept
|
|
{
|
|
return pEffectSetting->eArchetype == EffectArchetypes::ArchetypeID::kInvisibility;
|
|
}
|
|
|
|
bool EffectItem::IsWerewolfEffect() const noexcept
|
|
{
|
|
return pEffectSetting->eArchetype == EffectArchetypes::ArchetypeID::kWerewolf;
|
|
}
|
|
|
|
bool EffectItem::IsVampireLordEffect() const noexcept
|
|
{
|
|
return pEffectSetting->eArchetype == EffectArchetypes::ArchetypeID::kVampireLord;
|
|
}
|
|
|
|
bool EffectItem::IsNightVisionEffect() const noexcept
|
|
{
|
|
BGSKeyword* pMagicNightEye = Cast<BGSKeyword>(TESForm::GetById(0xad7c6));
|
|
if (pEffectSetting->keywordForm.count == 0)
|
|
spdlog::debug(__FUNCTION__ ": correcting BGSKeywordForm::Contains() bug for zero-keyword {:x}, {}", pEffectSetting->formID, pEffectSetting->fullName.value.AsAscii());
|
|
return pEffectSetting->keywordForm.count > 0 && pEffectSetting->keywordForm.Contains(pMagicNightEye);
|
|
}
|
|
|