mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
assertion -> exception; added the old effect flags again
This commit is contained in:
parent
f154031e54
commit
8ccb0907e6
@ -1,5 +1,7 @@
|
||||
#include "loadmgef.hpp"
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
|
||||
@ -231,7 +233,8 @@ std::string MagicEffect::effectIdToString(short effectID)
|
||||
// tribunal
|
||||
names[137] ="sEffectSummonFabricant";
|
||||
|
||||
assert(names.find(effectID) != names.end() && "Unimplemented effect type");
|
||||
if (names.find(effectID) == names.end())
|
||||
throw std::runtime_error( std::string("Unimplemented effect ID ") + boost::lexical_cast<std::string>(effectID));
|
||||
|
||||
return names[effectID];
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ struct MagicEffect
|
||||
TargetAttribute = 0x2, // Affects a specific attribute, which is specified elsewhere in the effect structure.
|
||||
NoDuration = 0x4, // Has no duration. Only runs effect once on cast.
|
||||
NoMagnitude = 0x8, // Has no magnitude.
|
||||
Negative = 0x10, // Counts as a negative effect. Interpreted as useful for attack, and is treated as a bad effect in alchemy.
|
||||
Harmful = 0x10, // Counts as a negative effect. Interpreted as useful for attack, and is treated as a bad effect in alchemy.
|
||||
ContinuousVfx = 0x20, // The effect's hit particle VFX repeats for the full duration of the spell, rather than occuring once on hit.
|
||||
CastSelf = 0x40, // Allows range - cast on self.
|
||||
CastTouch = 0x80, // Allows range - cast on touch.
|
||||
@ -25,7 +25,12 @@ struct MagicEffect
|
||||
UncappedDamage = 0x1000, // Negates multiple cap behaviours. Allows an effect to reduce an attribute below zero; removes the normal minimum effect duration of 1 second.
|
||||
NonRecastable = 0x4000, // Does not land if parent spell is already affecting target. Shows "you cannot re-cast" message for self target.
|
||||
Unreflectable = 0x10000, // Cannot be reflected, the effect always lands normally.
|
||||
CasterLinked = 0x20000 // Must quench if caster is dead, or not an NPC/creature. Not allowed in containter/door trap spells.
|
||||
CasterLinked = 0x20000, // Must quench if caster is dead, or not an NPC/creature. Not allowed in containter/door trap spells.
|
||||
|
||||
SpellMaking = 0x0200,
|
||||
Enchanting = 0x0400,
|
||||
Negative = 0x0800 // A harmful effect. Will determine whether
|
||||
// eg. NPCs regard this spell as an attack. (same as 0x10?)
|
||||
};
|
||||
|
||||
struct MEDTstruct
|
||||
|
Loading…
x
Reference in New Issue
Block a user