diff --git a/apps/opencs/model/world/nestedcoladapterimp.hpp b/apps/opencs/model/world/nestedcoladapterimp.hpp index ea2037eb82..776a908bad 100644 --- a/apps/opencs/model/world/nestedcoladapterimp.hpp +++ b/apps/opencs/model/world/nestedcoladapterimp.hpp @@ -311,7 +311,7 @@ namespace CSMWorld case 0: { if (effect.mEffectID >=0 && effect.mEffectID < ESM::MagicEffect::Length) - return effect.mRange; + return effect.mEffectID; else throw std::runtime_error("Magic effects ID unexpected value"); } diff --git a/components/esm/loadnpc.cpp b/components/esm/loadnpc.cpp index 751c7f252b..44d2987853 100644 --- a/components/esm/loadnpc.cpp +++ b/components/esm/loadnpc.cpp @@ -143,7 +143,7 @@ namespace ESM void NPC::blank() { - mNpdtType = 0; + mNpdtType = NPC_DEFAULT; mNpdt52.mLevel = 0; mNpdt52.mStrength = mNpdt52.mIntelligence = mNpdt52.mWillpower = mNpdt52.mAgility = mNpdt52.mSpeed = mNpdt52.mEndurance = mNpdt52.mPersonality = mNpdt52.mLuck = 0;