|
|
|
@ -10,6 +10,157 @@
|
|
|
|
|
|
|
|
|
|
namespace
|
|
|
|
|
{
|
|
|
|
|
static const char *sIds[ESM::MagicEffect::Length] =
|
|
|
|
|
{
|
|
|
|
|
"WaterBreathing",
|
|
|
|
|
"SwiftSwim",
|
|
|
|
|
"WaterWalking",
|
|
|
|
|
"Shield",
|
|
|
|
|
"FireShield",
|
|
|
|
|
"LightningShield",
|
|
|
|
|
"FrostShield",
|
|
|
|
|
"Burden",
|
|
|
|
|
"Feather",
|
|
|
|
|
"Jump",
|
|
|
|
|
"Levitate",
|
|
|
|
|
"SlowFall",
|
|
|
|
|
"Lock",
|
|
|
|
|
"Open",
|
|
|
|
|
"FireDamage",
|
|
|
|
|
"ShockDamage",
|
|
|
|
|
"FrostDamage",
|
|
|
|
|
"DrainAttribute",
|
|
|
|
|
"DrainHealth",
|
|
|
|
|
"DrainMagicka",
|
|
|
|
|
"DrainFatigue",
|
|
|
|
|
"DrainSkill",
|
|
|
|
|
"DamageAttribute",
|
|
|
|
|
"DamageHealth",
|
|
|
|
|
"DamageMagicka",
|
|
|
|
|
"DamageFatigue",
|
|
|
|
|
"DamageSkill",
|
|
|
|
|
"Poison",
|
|
|
|
|
"WeaknessToFire",
|
|
|
|
|
"WeaknessToFrost",
|
|
|
|
|
"WeaknessToShock",
|
|
|
|
|
"WeaknessToMagicka",
|
|
|
|
|
"WeaknessToCommonDisease",
|
|
|
|
|
"WeaknessToBlightDisease",
|
|
|
|
|
"WeaknessToCorprusDisease",
|
|
|
|
|
"WeaknessToPoison",
|
|
|
|
|
"WeaknessToNormalWeapons",
|
|
|
|
|
"DisintegrateWeapon",
|
|
|
|
|
"DisintegrateArmor",
|
|
|
|
|
"Invisibility",
|
|
|
|
|
"Chameleon",
|
|
|
|
|
"Light",
|
|
|
|
|
"Sanctuary",
|
|
|
|
|
"NightEye",
|
|
|
|
|
"Charm",
|
|
|
|
|
"Paralyze",
|
|
|
|
|
"Silence",
|
|
|
|
|
"Blind",
|
|
|
|
|
"Sound",
|
|
|
|
|
"CalmHumanoid",
|
|
|
|
|
"CalmCreature",
|
|
|
|
|
"FrenzyHumanoid",
|
|
|
|
|
"FrenzyCreature",
|
|
|
|
|
"DemoralizeHumanoid",
|
|
|
|
|
"DemoralizeCreature",
|
|
|
|
|
"RallyHumanoid",
|
|
|
|
|
"RallyCreature",
|
|
|
|
|
"Dispel",
|
|
|
|
|
"Soultrap",
|
|
|
|
|
"Telekinesis",
|
|
|
|
|
"Mark",
|
|
|
|
|
"Recall",
|
|
|
|
|
"DivineIntervention",
|
|
|
|
|
"AlmsiviIntervention",
|
|
|
|
|
"DetectAnimal",
|
|
|
|
|
"DetectEnchantment",
|
|
|
|
|
"DetectKey",
|
|
|
|
|
"SpellAbsorption",
|
|
|
|
|
"Reflect",
|
|
|
|
|
"CureCommonDisease",
|
|
|
|
|
"CureBlightDisease",
|
|
|
|
|
"CureCorprusDisease",
|
|
|
|
|
"CurePoison",
|
|
|
|
|
"CureParalyzation",
|
|
|
|
|
"RestoreAttribute",
|
|
|
|
|
"RestoreHealth",
|
|
|
|
|
"RestoreMagicka",
|
|
|
|
|
"RestoreFatigue",
|
|
|
|
|
"RestoreSkill",
|
|
|
|
|
"FortifyAttribute",
|
|
|
|
|
"FortifyHealth",
|
|
|
|
|
"FortifyMagicka",
|
|
|
|
|
"FortifyFatigue",
|
|
|
|
|
"FortifySkill",
|
|
|
|
|
"FortifyMaximumMagicka",
|
|
|
|
|
"AbsorbAttribute",
|
|
|
|
|
"AbsorbHealth",
|
|
|
|
|
"AbsorbMagicka",
|
|
|
|
|
"AbsorbFatigue",
|
|
|
|
|
"AbsorbSkill",
|
|
|
|
|
"ResistFire",
|
|
|
|
|
"ResistFrost",
|
|
|
|
|
"ResistShock",
|
|
|
|
|
"ResistMagicka",
|
|
|
|
|
"ResistCommonDisease",
|
|
|
|
|
"ResistBlightDisease",
|
|
|
|
|
"ResistCorprusDisease",
|
|
|
|
|
"ResistPoison",
|
|
|
|
|
"ResistNormalWeapons",
|
|
|
|
|
"ResistParalysis",
|
|
|
|
|
"RemoveCurse",
|
|
|
|
|
"TurnUndead",
|
|
|
|
|
"SummonScamp",
|
|
|
|
|
"SummonClannfear",
|
|
|
|
|
"SummonDaedroth",
|
|
|
|
|
"SummonDremora",
|
|
|
|
|
"SummonAncestralGhost",
|
|
|
|
|
"SummonSkeletalMinion",
|
|
|
|
|
"SummonBonewalker",
|
|
|
|
|
"SummonGreaterBonewalker",
|
|
|
|
|
"SummonBonelord",
|
|
|
|
|
"SummonWingedTwilight",
|
|
|
|
|
"SummonHunger",
|
|
|
|
|
"SummonGoldenSaint",
|
|
|
|
|
"SummonFlameAtronach",
|
|
|
|
|
"SummonFrostAtronach",
|
|
|
|
|
"SummonStormAtronach",
|
|
|
|
|
"FortifyAttack",
|
|
|
|
|
"CommandCreature",
|
|
|
|
|
"CommandHumanoid",
|
|
|
|
|
"BoundDagger",
|
|
|
|
|
"BoundLongsword",
|
|
|
|
|
"BoundMace",
|
|
|
|
|
"BoundBattleAxe",
|
|
|
|
|
"BoundSpear",
|
|
|
|
|
"BoundLongbow",
|
|
|
|
|
"ExtraSpell",
|
|
|
|
|
"BoundCuirass",
|
|
|
|
|
"BoundHelm",
|
|
|
|
|
"BoundBoots",
|
|
|
|
|
"BoundShield",
|
|
|
|
|
"BoundGloves",
|
|
|
|
|
"Corprus",
|
|
|
|
|
"Vampirism",
|
|
|
|
|
"SummonCenturionSphere",
|
|
|
|
|
"SunDamage",
|
|
|
|
|
"StuntedMagicka",
|
|
|
|
|
|
|
|
|
|
// Tribunal only
|
|
|
|
|
"SummonFabricant",
|
|
|
|
|
|
|
|
|
|
// Bloodmoon only
|
|
|
|
|
"SummonWolf",
|
|
|
|
|
"SummonBear",
|
|
|
|
|
"SummonBonewolf",
|
|
|
|
|
"SummonCreature04",
|
|
|
|
|
"SummonCreature05"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const int NumberOfHardcodedFlags = 143;
|
|
|
|
|
const int HardcodedFlags[NumberOfHardcodedFlags] = {
|
|
|
|
|
0x11c8, 0x11c0, 0x11c8, 0x11e0, 0x11e0, 0x11e0, 0x11e0, 0x11d0,
|
|
|
|
@ -41,6 +192,9 @@ void MagicEffect::load(ESMReader &esm)
|
|
|
|
|
{
|
|
|
|
|
esm.getHNT(mIndex, "INDX");
|
|
|
|
|
|
|
|
|
|
if (mIndex>=0 && mIndex<Length)
|
|
|
|
|
mId = sIds[mIndex];
|
|
|
|
|
|
|
|
|
|
esm.getHNT(mData, "MEDT", 36);
|
|
|
|
|
if (esm.getFormat() == 0)
|
|
|
|
|
{
|
|
|
|
@ -388,4 +542,26 @@ MagicEffect::MagnitudeDisplayType MagicEffect::getMagnitudeDisplayType() const {
|
|
|
|
|
return MDT_Points;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MagicEffect::blank()
|
|
|
|
|
{
|
|
|
|
|
mData.mSchool = 0;
|
|
|
|
|
mData.mBaseCost = 0;
|
|
|
|
|
mData.mFlags = 0;
|
|
|
|
|
mData.mRed = 0;
|
|
|
|
|
mData.mGreen = 0;
|
|
|
|
|
mData.mBlue = 0;
|
|
|
|
|
mData.mSpeed = 0;
|
|
|
|
|
|
|
|
|
|
mIcon.clear();
|
|
|
|
|
mParticle.clear();
|
|
|
|
|
mCasting.clear();
|
|
|
|
|
mHit.clear();
|
|
|
|
|
mArea.clear();
|
|
|
|
|
mBolt.clear();
|
|
|
|
|
mCastSound.clear();
|
|
|
|
|
mBoltSound.clear();
|
|
|
|
|
mHitSound.clear();
|
|
|
|
|
mAreaSound.clear();
|
|
|
|
|
mDescription.clear();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|