Fix essimporter script header and inventory item conversion

pull/2627/head
Capostrophic 5 years ago
parent 43330f1dd1
commit 0bc13b47fa

@ -9,7 +9,7 @@ namespace ESSImport
void convertSCPT(const SCPT &scpt, ESM::GlobalScript &out)
{
out.mId = Misc::StringUtils::lowerCase(scpt.mSCHD.mName);
out.mId = Misc::StringUtils::lowerCase(scpt.mSCHD.mName.toString());
out.mRunning = scpt.mRunning;
convertSCRI(scpt.mSCRI, out.mLocals);
}

@ -13,11 +13,11 @@ namespace ESSImport
{
while (esm.isNextSub("NPCO"))
{
ESM::ContItem contItem;
ContItem contItem;
esm.getHT(contItem);
InventoryItem item;
item.mId = contItem.mItem;
item.mId = contItem.mItem.toString();
item.mCount = contItem.mCount;
item.mRelativeEquipmentSlot = -1;
item.mLockLevel = 0;

@ -5,6 +5,8 @@
#include <string>
#include <components/esm/cellref.hpp>
#include <components/esm/esmcommon.hpp>
#include "importscri.hpp"
namespace ESM
@ -15,6 +17,12 @@ namespace ESM
namespace ESSImport
{
struct ContItem
{
int mCount;
ESM::NAME32 mItem;
};
struct Inventory
{
struct InventoryItem : public ESM::CellRef

@ -13,10 +13,16 @@ namespace ESM
namespace ESSImport
{
struct SCHD
{
ESM::NAME32 mName;
ESM::Script::SCHDstruct mData;
};
// A running global script
struct SCPT
{
ESM::Script::SCHD mSCHD;
SCHD mSCHD;
// values of local variables
SCRI mSCRI;

Loading…
Cancel
Save