1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 17:15:33 +00:00

Merge pull request #2627 from Capostrophic/essimporter

Fix essimporter script header and inventory item conversion
This commit is contained in:
Andrei Kortunov 2019-12-06 10:01:51 +04:00 committed by GitHub
commit 675ba806bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 4 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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

View file

@ -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;