mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-07 06:15:33 +00:00
Merge pull request #2627 from Capostrophic/essimporter
Fix essimporter script header and inventory item conversion
This commit is contained in:
commit
675ba806bf
4 changed files with 18 additions and 4 deletions
|
@ -9,7 +9,7 @@ namespace ESSImport
|
||||||
|
|
||||||
void convertSCPT(const SCPT &scpt, ESM::GlobalScript &out)
|
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;
|
out.mRunning = scpt.mRunning;
|
||||||
convertSCRI(scpt.mSCRI, out.mLocals);
|
convertSCRI(scpt.mSCRI, out.mLocals);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,11 +13,11 @@ namespace ESSImport
|
||||||
{
|
{
|
||||||
while (esm.isNextSub("NPCO"))
|
while (esm.isNextSub("NPCO"))
|
||||||
{
|
{
|
||||||
ESM::ContItem contItem;
|
ContItem contItem;
|
||||||
esm.getHT(contItem);
|
esm.getHT(contItem);
|
||||||
|
|
||||||
InventoryItem item;
|
InventoryItem item;
|
||||||
item.mId = contItem.mItem;
|
item.mId = contItem.mItem.toString();
|
||||||
item.mCount = contItem.mCount;
|
item.mCount = contItem.mCount;
|
||||||
item.mRelativeEquipmentSlot = -1;
|
item.mRelativeEquipmentSlot = -1;
|
||||||
item.mLockLevel = 0;
|
item.mLockLevel = 0;
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <components/esm/cellref.hpp>
|
#include <components/esm/cellref.hpp>
|
||||||
|
#include <components/esm/esmcommon.hpp>
|
||||||
|
|
||||||
#include "importscri.hpp"
|
#include "importscri.hpp"
|
||||||
|
|
||||||
namespace ESM
|
namespace ESM
|
||||||
|
@ -15,6 +17,12 @@ namespace ESM
|
||||||
namespace ESSImport
|
namespace ESSImport
|
||||||
{
|
{
|
||||||
|
|
||||||
|
struct ContItem
|
||||||
|
{
|
||||||
|
int mCount;
|
||||||
|
ESM::NAME32 mItem;
|
||||||
|
};
|
||||||
|
|
||||||
struct Inventory
|
struct Inventory
|
||||||
{
|
{
|
||||||
struct InventoryItem : public ESM::CellRef
|
struct InventoryItem : public ESM::CellRef
|
||||||
|
|
|
@ -13,10 +13,16 @@ namespace ESM
|
||||||
namespace ESSImport
|
namespace ESSImport
|
||||||
{
|
{
|
||||||
|
|
||||||
|
struct SCHD
|
||||||
|
{
|
||||||
|
ESM::NAME32 mName;
|
||||||
|
ESM::Script::SCHDstruct mData;
|
||||||
|
};
|
||||||
|
|
||||||
// A running global script
|
// A running global script
|
||||||
struct SCPT
|
struct SCPT
|
||||||
{
|
{
|
||||||
ESM::Script::SCHD mSCHD;
|
SCHD mSCHD;
|
||||||
|
|
||||||
// values of local variables
|
// values of local variables
|
||||||
SCRI mSCRI;
|
SCRI mSCRI;
|
||||||
|
|
Loading…
Reference in a new issue