OpenEnroth 73e68f7
|
#include <cstdint>
#include "Engine/Objects/CombinedSkillValue.h"
#include "Engine/Pid.h"
#include "Utility/Flags.h"
#include "SpellEnums.h"
Classes | |
struct | CastSpellInfo |
Namespaces | |
namespace | CastSpellInfoHelpers |
Enumerations | |
enum class | SpellCastFlag : uint16_t { ON_CAST_CastViaScroll = 0x0001 , ON_CAST_TargetedCharacter = 0x0002 , ON_CAST_TargetedActor = 0x0008 , ON_CAST_TargetIsParty = 0x0010 , ON_CAST_NoRecoverySpell = 0x0020 , ON_CAST_TargetedTelekinesis = 0x0040 , ON_CAST_TargetedEnchantment = 0x0080 , ON_CAST_TargetedActorOrCharacter = 0x0100 , ON_CAST_TargetedHireling = 0x0200 , ON_CAST_CastingInProgress } |
Functions | |
void | CastSpellInfoHelpers::castSpell () |
void | CastSpellInfoHelpers::cancelSpellCastInProgress () |
static const CombinedSkillValue | SCROLL_OR_NPC_SPELL_SKILL_VALUE (5, CHARACTER_SKILL_MASTERY_MASTER) |
static const CombinedSkillValue | WANDS_SKILL_VALUE (8, CHARACTER_SKILL_MASTERY_NOVICE) |
void | pushSpellOrRangedAttack (SpellId spell, int casterIndex, CombinedSkillValue skill_value, SpellCastFlags flags, int overrideSoundId) |
void | pushTempleSpell (SpellId spell) |
void | pushNPCSpell (SpellId spell) |
void | pushScrollSpell (SpellId spell, int casterIndex) |
void | spellTargetPicked (Pid targetPid, int targetCharacterIndex) |
|
strong |
void pushNPCSpell | ( | SpellId | spell | ) |
Register spell cast by NPC companions.
spell | Spell id. |
void pushScrollSpell | ( | SpellId | spell, |
int | casterIndex | ||
) |
Register spell cast through scroll.
spell | Spell id. |
casterIndex | 0-based index of the character casting the spell. |
void pushSpellOrRangedAttack | ( | SpellId | spell, |
int | casterIndex, | ||
CombinedSkillValue | skill_value, | ||
SpellCastFlags | flags, | ||
int | overrideSoundId | ||
) |
General function that registers spell or skill implemented through spell casting mechanism to be cast/performed later.
Actual casting will be performed with event queue processing.
If spell is targeted then corresponding target mode is entered and actual casting will be performed after target is picked. Registered targeted spells will have one of the flags listed in ON_CAST_CastingInProgress and this flag will be removed in event queue if correct target is picked.
spell | Spell id. |
casterIndex | Zero-based index of a character casting the spell. |
skill_value | Skill value that the spell is cast with. |
flags | Spell flags. Can be empty or have several flags. |
overrideSoundId | ??? |
void pushTempleSpell | ( | SpellId | spell | ) |
Register spell cast on party with temple donation. Temple spells are cast with MASTER mastery of skill level equal to the day of week.
spell | Spell id. |
|
static |
void spellTargetPicked | ( | Pid | targetPid, |
int | targetCharacterIndex | ||
) |
Process successful picking target for spell.
targetPid | Pid of the target. |
targetCharacterIndex | 0-based index of the character being targeted by the spell. |
|
static |