#pragma once
#ifndef __INVENTORY_H__
#define __INVENTORY_H__
#pragma pack(push, 0x01)


class CInventory
{
public:

	enum INVEN_TYPE : int
	{
		INVENTORY_TYPE_BODY = 0,    //身上穿的装备
		INVENTORY_TYPE_ITEM = 1,    //物品栏
		INVENTORY_TYPE_AVARTAR = 2, //时装栏
	};

public:
	//获取时装管理器
	int GetAvatarItemMgrR()
	{
		typedef int (*__func)(void* a1);
		return ((__func)base::CInventory::GetAvatarItemMgrR)(this);
	}

	int GetAvatarItemMgrW()
	{
		return CallT<int>(base::CInventory::GetAvatarItemMgrW, this);
	}


	int delete_item(INVEN_TYPE a2, int pos, int num, int a5, int a6 = 1)
	{
		typedef int (*__func)(CInventory* a1, INVEN_TYPE a2, int a3, int a4, int a5, int a6);
		return ((__func)base::CInventory::delete_item)(this, a2, pos, num, a5, a6);
	}

	//使用金币
	int use_money(int a2, int a3, char a4)
	{
		typedef int (*__func)(CInventory* a1, int a2, int a3, char a4);
		return ((__func)base::CInventory::use_money)(this, a2, a3, a4);
	}

	//获得金币
	int gain_money(unsigned int a2, int a3, char a4, int a5)
	{
		typedef int (*__func)(CInventory* a1, unsigned int a2, int a3, char a4, int a5);
		return ((__func)base::CInventory::gain_money)(this, a2, a3, a4, a5);
	}

	//获取背包槽中的道具
	Inven_Item* GetInvenRef(INVEN_TYPE a2, int a3)
	{
		typedef Inven_Item* (*__func)(CInventory* a1, INVEN_TYPE a2, int a3);
		return ((__func)base::CInventory::GetInvenRef)(this, a2, a3);
	}

	Inven_Item* GetInvenSlot(Inven_Item* a2, INVEN_TYPE a3, int a4)
	{
		typedef Inven_Item* (__attribute__((__stdcall__))* fnCInventory_GetInvenSlot)(Inven_Item* dest, CInventory* pThis, int space, int location);
		static fnCInventory_GetInvenSlot CInventory_GetInvenSlot = (fnCInventory_GetInvenSlot)(base::CInventory::GetInvenSlot);
		return CInventory_GetInvenSlot(a2, this, a3, a4);
	}

	int update_item(INVEN_TYPE a2, int a3, Inven_Item a4)
	{
		return CallT<int>(base::CInventory::update_item, this, a2, a3, a4);
	}

	int insertItemIntoInventory(Inven_Item a2, int a3, bool a4, bool a5)
	{
		return CallT<int>(base::CInventory::insertItemIntoInventory, this, a2, a3, a4, a5);
	}


};


#pragma pack(pop)

#endif // __INVENTORY_H__

