Skip to content

H7Inventory

Class in MMH7Game · MMH7Game.H7Inventory · native

Object › H7Inventory

Using it from Lua
h7.find_all("H7Inventory")            -- live instances
h7.find_class("MMH7Game.H7Inventory")   -- the class
h7.hook("MMH7Game.H7Inventory.AddItemToInventory", fn)

Properties

NameTypeNotes
mConsumablesUsedInCombatarray<H7HeroItem>protected
mItemIDsarrayprotected
mItemPositionsarray<IntPoint>protected
mItemsarray<H7HeroItem>protected
mItemsRefsarrayprotected
mOwnerH7EditorHeroprotected

Functions

NameDeclaration
AddItemToInventoryfunction AddItemToInventory(H7HeroItem Item, optional int PosX = -1, optional int PosY = -1, optional bool byTrade = false)
AddItemToInventoryCompletenative function AddItemToInventoryComplete(H7HeroItem Item, optional int PosX = -1, optional int PosY = -1, optional bool byTrade = false)
AddUsedConsumablefunction AddUsedConsumable(H7HeroItem Item)
CleanItemsAfterCombatnative function CleanItemsAfterCombat()
CountItemfunction int CountItem(H7HeroItem Item)
DeleteUsedConsumablesfunction DeleteUsedConsumables()
Deserializefunction Deserialize(JsonObject Data)
DeserializeReferencesfunction DeserializeReferences(JsonObject Data, SaveGameState Savegame)
GetItemfunction H7HeroItem GetItem(H7HeroItem Item)
GetItemByIDnative function H7HeroItem GetItemByID(int Id, optional bool suppressWarning)
GetItemByNamenative function H7HeroItem GetItemByName(string ItemName)
GetItemByPositionnative function H7HeroItem GetItemByPosition(int X, int Y)
GetItemPosByIndexfunction IntPoint GetItemPosByIndex(int Index)
GetItemPosByItemfunction IntPoint GetItemPosByItem(H7HeroItem Item)
GetItemPosesfunction array<IntPoint> GetItemPoses()
GetItemsfunction array<H7HeroItem> GetItems()
getItemsByPositionfunction array<H7HeroItem> getItemsByPosition(int X, int Y)
GetTotalCountOfScrollfunction int GetTotalCountOfScroll(H7HeroItem scroll)
GetTotalCountOfScrollsOnPositionfunction int GetTotalCountOfScrollsOnPosition(H7HeroItem scroll, IntPoint scrollPos)
GetUsedConsumablefunction array<H7HeroItem> GetUsedConsumable()
HasItemfunction bool HasItem(H7HeroItem Item)
Initfunction Init(H7EditorHero NewOwner, optional bool fromSave = false)
PostSerializeevent PostSerialize()
RemoveItemfunction RemoveItem(H7HeroItem Item)
RemoveItemByIDfunction RemoveItemByID(int ItemId)
RemoveItemCompleteevent RemoveItemComplete(H7HeroItem Item)
RemoveItemStackByIDfunction RemoveItemStackByID(int ItemId)
Serializefunction JsonObject Serialize()
SetItemPosfunction SetItemPos(int ItemId, int X, int Y, optional bool ignoreReplication = false)
SetItemPosCompleteevent SetItemPosComplete(int ItemId, int X, int Y)
SetItemPosStackfunction SetItemPosStack(int ItemId, int X, int Y)

Inherited

FromMembers
Object13 properties, 308 functions