示例#1
0
void Race::save(ESMWriter &esm)
{
    esm.writeHNCString("FNAM", mName);
    esm.writeHNT("RADT", mData, 140);
    mPowers.save(esm);
    esm.writeHNOString("DESC", mDescription);
}
示例#2
0
void Script::save(ESMWriter &esm) const
{
    std::string varNameString;
    if (!mVarNames.empty())
        for (std::vector<std::string>::const_iterator it = mVarNames.begin(); it != mVarNames.end(); ++it)
            varNameString.append(*it);

    SCHD data;
    memset(&data, 0, sizeof(data));

    data.mData = mData;
    memcpy(data.mName.name, mId.c_str(), mId.size());

    esm.writeHNT("SCHD", data, 52);

    if (!mVarNames.empty())
    {
        esm.startSubRecord("SCVR");
        for (std::vector<std::string>::const_iterator it = mVarNames.begin(); it != mVarNames.end(); ++it)
        {
            esm.writeHCString(*it);
        }
        esm.endRecord("SCVR");
    }

    esm.startSubRecord("SCDT");
    esm.write(reinterpret_cast<const char * >(&mScriptData[0]), mData.mScriptDataSize);
    esm.endRecord("SCDT");

    esm.writeHNOString("SCTX", mScriptText);
}
示例#3
0
void Probe::save(ESMWriter &esm) const
{
    esm.writeHNCString("MODL", mModel);
    esm.writeHNOCString("FNAM", mName);

    esm.writeHNT("PBDT", mData, 16);
    esm.writeHNOString("SCRI", mScript);
    esm.writeHNOCString("ITEX", mIcon);
}
示例#4
0
void Lockpick::save(ESMWriter &esm)
{
    esm.writeHNCString("MODL", mModel);
    esm.writeHNCString("FNAM", mName);

    esm.writeHNT("LKDT", mData, 16);
    esm.writeHNOString("SCRI", mScript);
    esm.writeHNOCString("ITEX", mIcon);
}
示例#5
0
void Book::save(ESMWriter &esm) const
{
    esm.writeHNCString("MODL", mModel);
    esm.writeHNOCString("FNAM", mName);
    esm.writeHNT("BKDT", mData, 20);
    esm.writeHNOCString("SCRI", mScript);
    esm.writeHNOCString("ITEX", mIcon);
    esm.writeHNOString("TEXT", mText);
    esm.writeHNOCString("ENAM", mEnchant);
}
示例#6
0
void ESM::GlobalScript::save (ESMWriter &esm) const
{
    esm.writeHNString ("NAME", mId);

    mLocals.save (esm);

    if (mRunning)
        esm.writeHNT ("RUN_", mRunning);

    esm.writeHNOString ("TARG", mTargetId);
}
示例#7
0
    void Class::save(ESMWriter &esm, bool isDeleted) const
    {
        esm.writeHNCString("NAME", mId);

        if (isDeleted)
        {
            esm.writeHNCString("DELE", "");
            return;
        }

        esm.writeHNOCString("FNAM", mName);
        esm.writeHNT("CLDT", mData, 60);
        esm.writeHNOString("DESC", mDescription);
    }
示例#8
0
void DialInfo::save(ESMWriter &esm)
{
    esm.writeHNCString("INAM", mId);
    esm.writeHNCString("PNAM", mPrev);
    esm.writeHNCString("NNAM", mNext);
    esm.writeHNT("DATA", mData, 12);
    esm.writeHNOCString("ONAM", mActor);
    esm.writeHNOCString("RNAM", mRace);
    esm.writeHNOCString("CNAM", mClass);
    esm.writeHNOCString("FNAM", mNpcFaction);
    esm.writeHNOCString("ANAM", mCell);
    esm.writeHNOCString("DNAM", mPcFaction);
    esm.writeHNOCString("SNAM", mSound);
    esm.writeHNOString("NAME", mResponse);

    for (std::vector<SelectStruct>::iterator it = mSelects.begin(); it != mSelects.end(); ++it)
    {
        esm.writeHNString("SCVR", it->mSelectRule);
        switch(it->mType)
        {
        case VT_Int: esm.writeHNT("INTV", it->mI); break;
        case VT_Float: esm.writeHNT("FLTV", it->mF); break;
        default: break;
        }
    }

    esm.writeHNOString("BNAM", mResultScript);
    
    switch(mQuestStatus)
    {
    case QS_Name: esm.writeHNT("QSTN",'\1'); break;
    case QS_Finished: esm.writeHNT("QSTF", '\1'); break;
    case QS_Restart: esm.writeHNT("QSTR", '\1'); break;
    case QS_Deleted: esm.writeHNT("DELE", '\1'); break;
    default: break;
    }
}
示例#9
0
    void Race::save(ESMWriter &esm, bool isDeleted) const
    {
        esm.writeHNCString("NAME", mId);

        if (isDeleted)
        {
            esm.writeHNCString("DELE", "");
            return;
        }

        esm.writeHNOCString("FNAM", mName);
        esm.writeHNT("RADT", mData, 140);
        mPowers.save(esm);
        esm.writeHNOString("DESC", mDescription);
    }
示例#10
0
    void Repair::save(ESMWriter &esm, bool isDeleted) const
    {
        esm.writeHNCString("NAME", mId);

        if (isDeleted)
        {
            esm.writeHNCString("DELE", "");
            return;
        }

        esm.writeHNCString("MODL", mModel);
        esm.writeHNOCString("FNAM", mName);

        esm.writeHNT("RIDT", mData, 16);
        esm.writeHNOString("SCRI", mScript);
        esm.writeHNOCString("ITEX", mIcon);
    }
示例#11
0
    void Book::save(ESMWriter &esm, bool isDeleted) const
    {
        esm.writeHNCString("NAME", mId);

        if (isDeleted)
        {
            esm.writeHNCString("DELE", "");
            return;
        }

        esm.writeHNCString("MODL", mModel);
        esm.writeHNOCString("FNAM", mName);
        esm.writeHNT("BKDT", mData, 20);
        esm.writeHNOCString("SCRI", mScript);
        esm.writeHNOCString("ITEX", mIcon);
        esm.writeHNOString("TEXT", mText);
        esm.writeHNOCString("ENAM", mEnchant);
    }
示例#12
0
void MagicEffect::save(ESMWriter &esm) const
{
    esm.writeHNT("INDX", mIndex);

    esm.writeHNT("MEDT", mData, 36);

    esm.writeHNOCString("ITEX", mIcon);
    esm.writeHNOCString("PTEX", mParticle);
    esm.writeHNOCString("BSND", mBoltSound);
    esm.writeHNOCString("CSND", mCastSound);
    esm.writeHNOCString("HSND", mHitSound);
    esm.writeHNOCString("ASND", mAreaSound);

    esm.writeHNOCString("CVFX", mCasting);
    esm.writeHNOCString("BVFX", mBolt);
    esm.writeHNOCString("HVFX", mHit);
    esm.writeHNOCString("AVFX", mArea);

    esm.writeHNOString("DESC", mDescription);
}
示例#13
0
void MagicEffect::save(ESMWriter &esm)
{
    esm.writeHNT("INDX", mIndex);

    mData.mFlags &= 0xe00;
    esm.writeHNT("MEDT", mData, 36);
    if (mIndex>=0 && mIndex<NumberOfHardcodedFlags) {
        mData.mFlags |= HardcodedFlags[mIndex];
    }

    esm.writeHNOCString("ITEX", mIcon);
    esm.writeHNOCString("PTEX", mParticle);
    esm.writeHNOCString("BSND", mBoltSound);
    esm.writeHNOCString("CSND", mCastSound);
    esm.writeHNOCString("HSND", mHitSound);
    esm.writeHNOCString("ASND", mAreaSound);
    
    esm.writeHNOCString("CVFX", mCasting);
    esm.writeHNOCString("BVFX", mBolt);
    esm.writeHNOCString("HVFX", mHit);
    esm.writeHNOCString("AVFX", mArea);
    
    esm.writeHNOString("DESC", mDescription);
}
示例#14
0
void Class::save(ESMWriter &esm) const
{
    esm.writeHNOCString("FNAM", mName);
    esm.writeHNT("CLDT", mData, 60);
    esm.writeHNOString("DESC", mDescription);
}
示例#15
0
void Skill::save(ESMWriter &esm)
{
    esm.writeHNT("INDX", mIndex);
    esm.writeHNT("SKDT", mData, 24);
    esm.writeHNOString("DESC", mDescription);
}