|
|
|
@ -103,19 +103,7 @@ void Skill::load(ESMReader &esm)
|
|
|
|
|
|
|
|
|
|
// create an ID from the index and the name (only used in the editor and likely to change in the
|
|
|
|
|
// future)
|
|
|
|
|
std::ostringstream stream;
|
|
|
|
|
|
|
|
|
|
stream << "#";
|
|
|
|
|
|
|
|
|
|
if (mIndex<10)
|
|
|
|
|
stream << "0";
|
|
|
|
|
|
|
|
|
|
stream << mIndex;
|
|
|
|
|
|
|
|
|
|
if (mIndex>=0 && mIndex<Length)
|
|
|
|
|
stream << sSkillNameIds[mIndex].substr (6);
|
|
|
|
|
|
|
|
|
|
mId = stream.str();
|
|
|
|
|
mId = getIndexToId (mIndex);
|
|
|
|
|
}
|
|
|
|
|
void Skill::save(ESMWriter &esm)
|
|
|
|
|
{
|
|
|
|
@ -129,5 +117,23 @@ void Skill::save(ESMWriter &esm)
|
|
|
|
|
mData.mAttribute = 0;
|
|
|
|
|
mData.mSpecialization = 0;
|
|
|
|
|
mData.mUseValue[0] = mData.mUseValue[1] = mData.mUseValue[2] = mData.mUseValue[3] = 1.0;
|
|
|
|
|
mDescription.clear();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
std::string Skill::getIndexToId (int index)
|
|
|
|
|
{
|
|
|
|
|
std::ostringstream stream;
|
|
|
|
|
|
|
|
|
|
stream << "#";
|
|
|
|
|
|
|
|
|
|
if (index<10)
|
|
|
|
|
stream << "0";
|
|
|
|
|
|
|
|
|
|
stream << index;
|
|
|
|
|
|
|
|
|
|
if (index>=0 && index<Length)
|
|
|
|
|
stream << sSkillNameIds[index].substr (6);
|
|
|
|
|
|
|
|
|
|
return stream.str();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|