|
|
|
@ -40,5 +40,32 @@ namespace ESM
|
|
|
|
|
|
|
|
|
|
void AIPackageList::save(ESMWriter &esm)
|
|
|
|
|
{
|
|
|
|
|
typedef std::vector<AIPackage>::iterator PackageIter;
|
|
|
|
|
for (PackageIter it = mList.begin(); it != mList.end(); ++it) {
|
|
|
|
|
switch (it->mType) {
|
|
|
|
|
case AI_Wander:
|
|
|
|
|
esm.writeHNT("AI_W", it->mWander, sizeof(it->mWander));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case AI_Travel:
|
|
|
|
|
esm.writeHNT("AI_T", it->mTravel, sizeof(it->mTravel));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case AI_Activate:
|
|
|
|
|
esm.writeHNT("AI_A", it->mActivate, sizeof(it->mActivate));
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case AI_Escort:
|
|
|
|
|
case AI_Follow: {
|
|
|
|
|
const char *name = (it->mType == AI_Escort) ? "AI_E" : "AI_F";
|
|
|
|
|
esm.writeHNT(name, it->mTarget, sizeof(it->mTarget));
|
|
|
|
|
esm.writeHNOCString("CNDT", it->mCellName);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|