14 return a_spell->GetDelivery() == RE::MagicSystem::Delivery::kSelf;
22 using st = RE::MagicSystem::SpellType;
23 using av = RE::ActorValue;
25 const auto type = spell->GetSpellType();
26 const auto skill = spell->GetAssociatedSkill();
30 case st::kStaffEnchantment:
33 case st::kLeveledSpell:
35 case st::kLesserPower:
45 case av::kDestruction:
46 case av::kConjuration:
48 case av::kRestoration:
63 switch (item->GetSpellType())
65 case RE::MagicSystem::SpellType::kDisease:
66 case RE::MagicSystem::SpellType::kAbility:
67 case RE::MagicSystem::SpellType::kAddiction:
79 static void ApplySpell(RE::Actor* caster, RE::Actor* target, RE::SpellItem* spell)
83 target->AddSpell(spell);
87 caster->GetMagicCaster(RE::MagicSystem::CastingSource::kInstant)
88 ->CastSpellImmediate(spell,
false, target, 1.0F,
false, 0.0F,
nullptr);
static bool IsPermanent(RE::MagicItem *item)
Check if a magic item is permanent.
Definition st-magic.h:61
static bool IsSpellPlayable(const RE::MagicItem *spell)
Check if a spell is playable, as in, able to be cast.
Definition st-magic.h:20
static bool IsSelfTargetSpell(RE::MagicItem *a_spell)
Check if spell is self targeting.
Definition st-magic.h:10
static void ApplySpell(RE::Actor *caster, RE::Actor *target, RE::SpellItem *spell)
Casts Spell from caster to actor. If the spell is permanent (MagicUtil::IsPermanent) it adds the spel...
Definition st-magic.h:79