NWNX:EE  8193.36.12
nwnx_itemprop.nss
Go to the documentation of this file.
1 #include "nwnx"
6 
7 const string NWNX_ItemProperty = "NWNX_ItemProperty";
8 
11 {
12  string sID;
13  int nProperty;
14  int nSubType;
15  int nCostTable;
17  int nParam1;
21  int bUsable;
22  int nSpellId;
23  object oCreator;
24  string sTag;
25 };
26 
30 struct NWNX_IPUnpacked NWNX_ItemProperty_UnpackIP(itemproperty ip);
31 
35 itemproperty NWNX_ItemProperty_PackIP(struct NWNX_IPUnpacked ip);
36 
41 struct NWNX_IPUnpacked NWNX_ItemProperty_GetActiveProperty(object oItem, int nIndex);
42 
44 
46 {
47  string sFunc = "UnpackIP";
48 
50  NWNX_CallFunction(NWNX_ItemProperty, sFunc);
51 
52  struct NWNX_IPUnpacked n;
53 
67 
68  return n;
69 }
70 
72 {
73  string sFunc = "PackIP";
74 
87 
88  NWNX_CallFunction(NWNX_ItemProperty, sFunc);
90 }
91 
92 struct NWNX_IPUnpacked NWNX_ItemProperty_GetActiveProperty(object oItem, int nIndex)
93 {
94  string sFunc = "GetActiveProperty";
95  NWNX_PushArgumentInt(nIndex);
97  NWNX_CallFunction(NWNX_ItemProperty, sFunc);
98 
99  struct NWNX_IPUnpacked n;
100 
111 
112  return n;
113 }
NWNX_GetReturnValueInt
int NWNX_GetReturnValueInt()
Returns the specified type from the c++ side.
Definition: nwnx.nss:94
NWNX_IPUnpacked::sID
string sID
Definition: nwnx_itemprop.nss:12
NWNX_IPUnpacked
An unpacked itemproperty.
Definition: nwnx_itemprop.nss:10
NWNX_IPUnpacked::oCreator
object oCreator
Definition: nwnx_itemprop.nss:23
NWNX_IPUnpacked::nProperty
int nProperty
Definition: nwnx_itemprop.nss:13
NWNX_IPUnpacked::nCostTable
int nCostTable
Definition: nwnx_itemprop.nss:15
NWNX_GetReturnValueItemProperty
itemproperty NWNX_GetReturnValueItemProperty()
Returns the specified type from the c++ side.
Definition: nwnx.nss:120
NWNX_CallFunction
void NWNX_CallFunction(string pluginName, string functionName)
Scripting interface to NWNX.
Definition: nwnx.nss:54
NWNX_ItemProperty_GetActiveProperty
struct NWNX_IPUnpacked NWNX_ItemProperty_GetActiveProperty(object oItem, int nIndex)
Gets the active item property at the index.
Definition: nwnx_itemprop.nss:92
NWNX_IPUnpacked::nSubType
int nSubType
Definition: nwnx_itemprop.nss:14
NWNX_GetReturnValueString
string NWNX_GetReturnValueString()
Returns the specified type from the c++ side.
Definition: nwnx.nss:109
NWNX_PushArgumentString
void NWNX_PushArgumentString(string value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:74
NWNX_PushArgumentObject
void NWNX_PushArgumentObject(object value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:69
NWNX_IPUnpacked::bUsable
int bUsable
Definition: nwnx_itemprop.nss:21
NWNX_IPUnpacked::sTag
string sTag
Definition: nwnx_itemprop.nss:24
NWNX_IPUnpacked::nSpellId
int nSpellId
Definition: nwnx_itemprop.nss:22
NWNX_PushArgumentInt
void NWNX_PushArgumentInt(int value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:59
NWNX_IPUnpacked::nCostTableValue
int nCostTableValue
Definition: nwnx_itemprop.nss:16
NWNX_ItemProperty_PackIP
itemproperty NWNX_ItemProperty_PackIP(struct NWNX_IPUnpacked ip)
Convert unpacked itemproperty structure to native type.
Definition: nwnx_itemprop.nss:71
NWNX_IPUnpacked::nParam1Value
int nParam1Value
Definition: nwnx_itemprop.nss:18
NWNX_GetReturnValueObject
object NWNX_GetReturnValueObject()
Returns the specified type from the c++ side.
Definition: nwnx.nss:104
NWNX_IPUnpacked::nParam1
int nParam1
Definition: nwnx_itemprop.nss:17
NWNX_ItemProperty_UnpackIP
struct NWNX_IPUnpacked NWNX_ItemProperty_UnpackIP(itemproperty ip)
Convert native itemproperty type to unpacked structure.
Definition: nwnx_itemprop.nss:45
NWNX_PushArgumentItemProperty
void NWNX_PushArgumentItemProperty(itemproperty value)
Pushes the specified type to the c++ side.
Definition: nwnx.nss:84
NWNX_IPUnpacked::nChanceToAppear
int nChanceToAppear
Definition: nwnx_itemprop.nss:20
NWNX_IPUnpacked::nUsesPerDay
int nUsesPerDay
Definition: nwnx_itemprop.nss:19