Class EntityEffectManager
Peered with a DaggerfallEntityBehaviour for magic and effect handling related to that entity.
Manages list of active effects currently operating on peered entity.
Used by player and enemies to send and receive magic effects from various sources.
NOTE: Under active development and subject to frequent change.
Inheritance
EntityEffectManager
Assembly: Assembly-CSharp.dll
Syntax
public class EntityEffectManager : MonoBehaviour
Fields
|
Improve this Doc
View Source
ColdMissilePrefab
Declaration
public DaggerfallMissile ColdMissilePrefab
Field Value
|
Improve this Doc
View Source
FireMissilePrefab
Declaration
public DaggerfallMissile FireMissilePrefab
Field Value
|
Improve this Doc
View Source
MagicMissilePrefab
Declaration
public DaggerfallMissile MagicMissilePrefab
Field Value
|
Improve this Doc
View Source
PoisonMissilePrefab
Declaration
public DaggerfallMissile PoisonMissilePrefab
Field Value
|
Improve this Doc
View Source
ShockMissilePrefab
Declaration
public DaggerfallMissile ShockMissilePrefab
Field Value
Properties
|
Improve this Doc
View Source
DiseaseBundles
Declaration
public LiveEffectBundle[] DiseaseBundles { get; }
Property Value
|
Improve this Doc
View Source
DiseaseCount
Declaration
public int DiseaseCount { get; }
Property Value
|
Improve this Doc
View Source
EffectBundles
Declaration
public LiveEffectBundle[] EffectBundles { get; }
Property Value
|
Improve this Doc
View Source
EffectCount
Declaration
public int EffectCount { get; }
Property Value
|
Improve this Doc
View Source
EntityBehaviour
Declaration
public DaggerfallEntityBehaviour EntityBehaviour { get; }
Property Value
|
Improve this Doc
View Source
HasReadySpell
Declaration
public bool HasReadySpell { get; }
Property Value
|
Improve this Doc
View Source
IsPlayerEntity
Declaration
public bool IsPlayerEntity { get; }
Property Value
|
Improve this Doc
View Source
LastSpell
Declaration
public EntityEffectBundle LastSpell { get; }
Property Value
|
Improve this Doc
View Source
PoisonBundles
Declaration
public LiveEffectBundle[] PoisonBundles { get; }
Property Value
|
Improve this Doc
View Source
PoisonCount
Declaration
public int PoisonCount { get; }
Property Value
|
Improve this Doc
View Source
ReadySpell
Declaration
public EntityEffectBundle ReadySpell { get; set; }
Property Value
Methods
|
Improve this Doc
View Source
AbortReadySpell()
Declaration
public void AbortReadySpell()
|
Improve this Doc
View Source
AssignBundle(EntityEffectBundle, AssignBundleFlags)
Declaration
public void AssignBundle(EntityEffectBundle sourceBundle, AssignBundleFlags flags = AssignBundleFlags.None)
Parameters
|
Improve this Doc
View Source
BreakNormalPowerConcealmentEffects(DaggerfallEntityBehaviour)
Declaration
public static void BreakNormalPowerConcealmentEffects(DaggerfallEntityBehaviour entityBehaviour)
Parameters
|
Improve this Doc
View Source
CastNoAnimSpell()
Declaration
public void CastNoAnimSpell()
|
Improve this Doc
View Source
CastReadySpell()
Declaration
public void CastReadySpell()
|
Improve this Doc
View Source
ClearSpellBundles()
Clears all bundles of BundleTypes.Spell.
Declaration
public void ClearSpellBundles()
|
Improve this Doc
View Source
CreateDisease(Diseases)
Helper to create a classic disease effect bundle.
Declaration
public EntityEffectBundle CreateDisease(Diseases diseaseType)
Parameters
Type |
Name |
Description |
Diseases |
diseaseType |
Classic disease type.
|
Returns
|
Improve this Doc
View Source
CreateDisease(String)
Helper to create a disease effect bundle from any effect key.
This is just here for testing right now as no custom diseases exist.
Declaration
public EntityEffectBundle CreateDisease(string key)
Parameters
Type |
Name |
Description |
String |
key |
Effect key to use as infection.
|
Returns
|
Improve this Doc
View Source
CreateLycanthropyCurse()
Helper to create stage two curse of lycanthropy.
Declaration
public EntityEffectBundle CreateLycanthropyCurse()
Returns
|
Improve this Doc
View Source
CreateLycanthropyDisease(LycanthropyTypes)
Declaration
public EntityEffectBundle CreateLycanthropyDisease(LycanthropyTypes infectionType)
Parameters
Returns
|
Improve this Doc
View Source
CreatePoison(Poisons)
Helper to create a classic poison effect bundle.
Declaration
public EntityEffectBundle CreatePoison(Poisons poisonType)
Parameters
Type |
Name |
Description |
Poisons |
poisonType |
Classic poison type.
|
Returns
|
Improve this Doc
View Source
CreateSpellBundle(String, ElementTypes, Nullable<EffectSettings>)
Creates a simple single-effect spell bundle from the specified effect key.
Declaration
public EntityEffectBundle CreateSpellBundle(string effectKey, ElementTypes element = ElementTypes.Magic, EffectSettings? effectSettings = null)
Parameters
Type |
Name |
Description |
String |
effectKey |
Effect key to create bundle from.
|
ElementTypes |
element |
Element type for bundle. Defaults to Magic.
|
Nullable<EffectSettings> |
effectSettings |
Effect settings. Uses full defaults if null.
|
Returns
|
Improve this Doc
View Source
CreateVampirismCurse()
Helper to create stage two curse of vampirism.
Declaration
public EntityEffectBundle CreateVampirismCurse()
Returns
|
Improve this Doc
View Source
CreateVampirismDisease()
Helper to create stage one infection disease for vampirism.
Declaration
public EntityEffectBundle CreateVampirismDisease()
Returns
|
Improve this Doc
View Source
CureAll()
Declaration
|
Improve this Doc
View Source
CureAllAttributes()
Declaration
public void CureAllAttributes()
|
Improve this Doc
View Source
CureAllDiseases()
Declaration
public void CureAllDiseases()
|
Improve this Doc
View Source
CureAllPoisons()
Declaration
public void CureAllPoisons()
|
Improve this Doc
View Source
CureAllSkills()
Declaration
public void CureAllSkills()
|
Improve this Doc
View Source
CureDisease(Diseases)
Declaration
public void CureDisease(Diseases disease)
Parameters
|
Improve this Doc
View Source
DoItemEnchantmentPayloads(EnchantmentPayloadFlags, DaggerfallUnityItem, ItemCollection, DaggerfallEntityBehaviour, Int32)
Executes payloads on enchanted items.
Declaration
public int DoItemEnchantmentPayloads(EnchantmentPayloadFlags flags, DaggerfallUnityItem sourceItem, ItemCollection sourceCollection = null, DaggerfallEntityBehaviour targetEntity = null, int damageIn = 0)
Parameters
Type |
Name |
Description |
EnchantmentPayloadFlags |
flags |
Payloads to execute. Required by all payloads.
|
DaggerfallUnityItem |
sourceItem |
Item to execute payloads from. Required by all payloads. Item must be enchanted.
|
ItemCollection |
sourceCollection |
ItemCollection the enchanted item belongs to. Required by Used payload.
|
DaggerfallEntityBehaviour |
targetEntity |
Target entity of attack by this entity. Required by Strikes payload.
|
Int32 |
damageIn |
Input damage before effects. Required by Strikes payload.
|
Returns
Type |
Description |
Int32 |
Output damage after effect. Only changes for Strikes payload.
|
|
Improve this Doc
View Source
DrinkPotion(DaggerfallUnityItem)
Declaration
public void DrinkPotion(DaggerfallUnityItem item)
Parameters
|
Improve this Doc
View Source
EndIncumbentEffect<T>()
Cancels all remaining rounds of any active incumbent effect of type T and calls End() on that effect.
If incumbent effect T is only live effect in bundle then whole bundle will be removed.
If other effects remain in bundle then incumbent effect will stop operation and bundle will expire when other effects allow it.
Does nothing if no incumbent effect of type T found.
Declaration
public void EndIncumbentEffect<T>()
Type Parameters
Name |
Description |
T |
IncumbentEffect type T to end.
|
|
Improve this Doc
View Source
EndLycanthropy()
Declaration
public void EndLycanthropy()
|
Improve this Doc
View Source
EndVampirism()
Declaration
public void EndVampirism()
|
Improve this Doc
View Source
FindIncumbentEffect<T>()
Searches all effects in all bundles to find incumbent of type T.
Declaration
public IEntityEffect FindIncumbentEffect<T>()
Returns
Type |
Description |
IEntityEffect |
Found incumbent effect of type T or null.
|
Type Parameters
Name |
Description |
T |
Effect class to search for.
|
|
Improve this Doc
View Source
FindIncumbentEffects<T>()
Searches all effects in all bundles to find all incumbents of type T.
Useful for finding all effects inheriting from a specific parent effect.
Declaration
public IEntityEffect[] FindIncumbentEffects<T>()
Returns
Type |
Description |
IEntityEffect[] |
All found incumbent effect of type T. Can be null or empty.
|
Type Parameters
Name |
Description |
T |
Effect class to search for.
|
|
Improve this Doc
View Source
GetCastSoundID(ElementTypes)
Declaration
public int GetCastSoundID(ElementTypes elementType)
Parameters
Returns
|
Improve this Doc
View Source
GetEffectSaveData(IEntityEffect)
Get full effect save data including effect specific data.
Declaration
public EntityEffectManager.EffectSaveData_v1 GetEffectSaveData(IEntityEffect effect)
Parameters
Returns
|
Improve this Doc
View Source
GetInstancedBundlesSaveData()
Get instanced bundles save data.
Declaration
public EntityEffectManager.EffectBundleSaveData_v1[] GetInstancedBundlesSaveData()
Returns
|
Improve this Doc
View Source
GetRacialOverrideEffect()
Gets current racial override effect if one is present.
Racial override is a special case effect that is cached when started/resumed on entity.
While is possible to use FindIncumbentEffect<T>(), this method is more efficient.
Declaration
public RacialOverrideEffect GetRacialOverrideEffect()
Returns
|
Improve this Doc
View Source
HasDamagedAttributes()
Declaration
public bool HasDamagedAttributes()
Returns
|
Improve this Doc
View Source
HasDamagedSkills()
Declaration
public bool HasDamagedSkills()
Returns
|
Improve this Doc
View Source
HasLycanthropy()
Declaration
public bool HasLycanthropy()
Returns
|
Improve this Doc
View Source
HasVampirism()
Declaration
public bool HasVampirism()
Returns
|
Improve this Doc
View Source
HealAttribute(DFCareer.Stats, Int32)
Searches all effects in all bundles to heal an amount of attribute loss.
Will spread healing amount across multiple effects if required.
Declaration
public void HealAttribute(DFCareer.Stats stat, int amount)
Parameters
Type |
Name |
Description |
DFCareer.Stats |
stat |
Attribute to heal.
|
Int32 |
amount |
Amount to heal. Must be a positive value.
|
|
Improve this Doc
View Source
InstantiateSpellMissile(ElementTypes)
Instantiates a spell missile based on prefabs set to player.
Mainly used by player casting and action records that throw spells at player.
Declaration
public DaggerfallMissile InstantiateSpellMissile(ElementTypes elementType)
Parameters
Type |
Name |
Description |
ElementTypes |
elementType |
Element of missile.
|
Returns
|
Improve this Doc
View Source
IsEntityImmuneToDisease()
Checks if peered entity is globally immune to disease from career, race, and effect system.
Declaration
public bool IsEntityImmuneToDisease()
Returns
Type |
Description |
Boolean |
True if entity immune to disease.
|
|
Improve this Doc
View Source
IsEntityImmuneToParalysis()
Checks if peered entity is globally immune to paralysis from career, race, and effect system.
Declaration
public bool IsEntityImmuneToParalysis()
Returns
Type |
Description |
Boolean |
True if entity immune to paralysis.
|
|
Improve this Doc
View Source
Declaration
public bool IsTransformedLycanthrope()
Returns
|
Improve this Doc
View Source
LycanthropyType()
Declaration
public LycanthropyTypes LycanthropyType()
Returns
|
Improve this Doc
View Source
MergeDirectSkillMods(Int32[])
Merge custom skill mods directly into this entity.
Changes reset at the start of each magic round.
Declaration
public void MergeDirectSkillMods(int[] skillMods)
Parameters
Type |
Name |
Description |
Int32[] |
skillMods |
Skill mods array, must be DaggerfallSkills.Count length.
|
|
Improve this Doc
View Source
MergeDirectStatMods(Int32[])
Merge custom stat mods directly into this entity.
Changes reset at the start of each magic round.
Declaration
public void MergeDirectStatMods(int[] statMods)
Parameters
Type |
Name |
Description |
Int32[] |
statMods |
Stat mods array, must be DaggerfallStats.Count length.
|
|
Improve this Doc
View Source
PlayCastSound(DaggerfallEntityBehaviour, Int32, Boolean)
Declaration
public void PlayCastSound(DaggerfallEntityBehaviour casterEntityBehaviour, int castSoundID, bool throttle = false)
Parameters
|
Improve this Doc
View Source
RaiseOnAddIncumbentState()
Declaration
protected virtual void RaiseOnAddIncumbentState()
|
Improve this Doc
View Source
RaiseOnAssignBundle(LiveEffectBundle)
Declaration
protected virtual void RaiseOnAssignBundle(LiveEffectBundle bundleAdded)
Parameters
|
Improve this Doc
View Source
RaiseOnCastReadySpell(EntityEffectBundle)
Declaration
protected virtual void RaiseOnCastReadySpell(EntityEffectBundle spell)
Parameters
|
Improve this Doc
View Source
RaiseOnNewReadySpell(EntityEffectBundle)
Declaration
protected virtual void RaiseOnNewReadySpell(EntityEffectBundle spell)
Parameters
|
Improve this Doc
View Source
RaiseOnRemoveBundle(LiveEffectBundle)
Declaration
protected virtual void RaiseOnRemoveBundle(LiveEffectBundle bundleRemoved)
Parameters
|
Improve this Doc
View Source
RemoveBundle(LiveEffectBundle)
Declaration
public void RemoveBundle(LiveEffectBundle bundle)
Parameters
|
Improve this Doc
View Source
RestoreInstancedBundleSaveData(EntityEffectManager.EffectBundleSaveData_v1[])
Restore instanced bundles save data.
Declaration
public void RestoreInstancedBundleSaveData(EntityEffectManager.EffectBundleSaveData_v1[] data)
Parameters
|
Improve this Doc
View Source
SetReadySpell(EntityEffectBundle, Boolean)
Assigns a new spell to be cast.
For player entity, this will display "press button to fire spell" message.
Declaration
public bool SetReadySpell(EntityEffectBundle spell, bool noSpellPointCost = false)
Parameters
Returns
|
Improve this Doc
View Source
SetReadySpell(Int32, Boolean)
Sets ready spell directly from a classic spell index.
Declaration
public bool SetReadySpell(int classicSpellIndex, bool noSpellPointCost = false)
Parameters
Type |
Name |
Description |
Int32 |
classicSpellIndex |
|
Boolean |
noSpellPointCost |
|
Returns
|
Improve this Doc
View Source
UpdateHUDSpellIcons()
Allows any effect to update HUD icons when an immediate refresh is required.
Example is when an effect ends prematurely due to some condition (e.g. Shield spell busted).
Declaration
public void UpdateHUDSpellIcons()
Events
|
Improve this Doc
View Source
OnAddIncumbentState
Declaration
public event EntityEffectManager.OnAddIncumbentStateEventHandler OnAddIncumbentState
Event Type
|
Improve this Doc
View Source
OnAssignBundle
Declaration
public event EntityEffectManager.OnAssignBundleEventHandler OnAssignBundle
Event Type
|
Improve this Doc
View Source
OnCastReadySpell
Declaration
public event EntityEffectManager.OnCastReadySpellEventHandler OnCastReadySpell
Event Type
|
Improve this Doc
View Source
OnNewReadySpell
Declaration
public event EntityEffectManager.OnNewReadySpellEventHandler OnNewReadySpell
Event Type
|
Improve this Doc
View Source
OnRemoveBundle
Declaration
public event EntityEffectManager.OnRemoveBundleEventHandler OnRemoveBundle
Event Type
Extension Methods
MBExtensions.Invoke<T1, T2, T3, T4>(MonoBehaviour, Action<T1, T2, T3, T4>, T1, T2, T3, T4, Single)