#pragma once
#ifndef __ITEM_H__
#define __ITEM_H__

#pragma pack(push, 0x01)


class CItem
{
public:

	/**
	 * @brief 是否为消耗品
	 * @return
	*/
	bool is_stackable()
	{
		typedef bool (*__func)(CItem* a1);
		return ((__func)base::CItem::is_stackable)(this);
	}

	bool IsRoutingItem()
	{
		typedef bool (*__func)(CItem* a1);
		return ((__func)base::CItem::IsRoutingItem)(this);
	}

	/**
	 * @brief 取附加类型
	 * @return
	*/
	int GetAttachType()
	{
		return CallT<int>(base::CItem::GetAttachType, this);
	}

	int GetCashPrice()
	{
		return CallT<int>(base::CItem::GetCashPrice, this);
	}

	int GetDyeInfo()
	{
		return CallT<int>(base::CItem::GetDyeInfo, this);
	}

	int GetExpertJobAdditionalExp(int a2)
	{
		return CallT<int>(base::CItem::GetExpertJobAdditionalExp, this, a2);
	}

	int GetExpertJobCompoundMaterialVariation()
	{
		return CallT<int>(base::CItem::GetExpertJobCompoundMaterialVariation, this);
	}

	int GetExpertJobCompoundRateVariation()
	{
		return CallT<int>(base::CItem::GetExpertJobCompoundRateVariation, this);
	}

	int GetExpertJobCompoundResultVariation(int a2)
	{
		return CallT<int>(base::CItem::GetExpertJobCompoundResultVariation, this, a2);
	}

	int GetExpertJobSelfDisjointBigWinRate()
	{
		return CallT<int>(base::CItem::GetExpertJobSelfDisjointBigWinRate, this);
	}

	int GetExpertJobSelfDisjointResultVariation()
	{
		return CallT<int>(base::CItem::GetExpertJobSelfDisjointResultVariation, this);
	}

	int GetFinishPointPrice()
	{
		return CallT<int>(base::CItem::GetFinishPointPrice, this);
	}

	int GetIncreaseStatusIntData(int a2, int& a3)
	{
		return CallT<int>(base::CItem::GetIncreaseStatusIntData, this, a2, a3);
	}

	int GetIncreaseStatusType()
	{
		return CallT<int>(base::CItem::GetIncreaseStatusType, this);
	}

	int GetItemIconName()
	{
		return CallT<int>(base::CItem::GetItemIconName, this);
	}

	int GetItemName()
	{
		return CallT<int>(base::CItem::GetItemName, this);
	}

	int GetMedalPrice()
	{
		return CallT<int>(base::CItem::GetMedalPrice, this);
	}

	int GetNeedLevel()
	{
		return CallT<int>(base::CItem::GetNeedLevel, this);
	}

	int GetNeedMaterial()
	{
		return CallT<int>(base::CItem::GetNeedMaterial, this);
	}

	int GetQuestItemDropBouns()
	{
		return CallT<int>(base::CItem::GetQuestItemDropBouns, this);
	}

	int GetRandomOptionGrade()
	{
		return CallT<int>(base::CItem::GetRandomOptionGrade, this);
	}

	int GetSellPrice()
	{
		return CallT<int>(base::CItem::GetSellPrice, this);
	}

	int GetUpSkillType()
	{
		return CallT<int>(base::CItem::GetUpSkillType, this);
	}

	int GetUsablePvPRank()
	{
		return CallT<int>(base::CItem::GetUsablePvPRank, this);
	}

	int getAdvanceAltarNeedGage()
	{
		return CallT<int>(base::CItem::getAdvanceAltarNeedGage, this);
	}

	int getExpirationDate()
	{
		return CallT<int>(base::CItem::getExpirationDate, this);
	}

	int getFootControlRateLimit()
	{
		return CallT<int>(base::CItem::getFootControlRateLimit, this);
	}

	int getItemGroupName()
	{
		return CallT<int>(base::CItem::getItemGroupName, this);
	}

	int getUsableLevel()
	{
		return CallT<int>(base::CItem::getUsableLevel, this);
	}

	int getUsablePeriod()
	{
		return CallT<int>(base::CItem::getUsablePeriod, this);
	}

	int get_gen_rate()
	{
		return CallT<int>(base::CItem::get_gen_rate, this);
	}

	int get_grade()
	{
		return CallT<int>(base::CItem::get_grade, this);
	}

	int get_index()
	{
		return CallT<int>(base::CItem::get_index, this);
	}

	int get_need_skill()
	{
		return CallT<int>(base::CItem::get_need_skill, this);
	}

	int get_price()
	{
		return CallT<int>(base::CItem::get_price, this);
	}

	int get_rarity()
	{
		return CallT<int>(base::CItem::get_rarity, this);
	}




private:
};

class CStackableItem : public CItem
{
public:
	//获取消耗品类型
	int GetItemType()
	{
		typedef int (*__func)(void* a1);
		return ((__func)base::CStackableItem::GetItemType)(this);
	}

	//获取徽章支持的镶嵌槽类型
	int getJewelTargetSocket()
	{
		typedef int (*__func)(CStackableItem* a1);
		return ((__func)base::CStackableItem::getJewelTargetSocket)(this);
	}
};

class CEquipItem : public CItem
{
public:
	int GetItemType()
	{
		return CallT<int>(base::CEquipItem::GetItemType, this);
	}

	int getAvatarSocket(int a2, stAvatarEmblemInfo_t* a3)
	{
		return CallT<int>(base::CEquipItem::getAvatarSocket, this, a2, a3);
	}


};

class Inven_Item
{
public:
	unsigned char                                              package;
	unsigned char                                              UnknownData_NUSL[0x3C];

public:

	//获取道具附加信息
	int get_add_info()
	{
		typedef int (*__func)(Inven_Item* a1);
		return ((__func)base::Inven_Item::get_add_info)(this);
	}

	//检查背包中道具是否为空
	bool isEmpty()
	{
		typedef bool (*__func)(Inven_Item* a1);
		return ((__func)base::Inven_Item::isEmpty)(this);
	}
	//获取背包中道具item_id
	int getKey()
	{
		typedef int (*__func)(Inven_Item* a1);
		return ((__func)base::Inven_Item::getKey)(this);
	}
	//道具是否是装备
	bool isEquipableItemType()
	{
		typedef bool (*__func)(Inven_Item* a1);
		return ((__func)base::Inven_Item::isEquipableItemType)(this);
	}

	bool IsTradeLimitAttachTypeItem()
	{
		return CallT<bool>(base::Inven_Item::IsTradeLimitAttachTypeItem, this);
	}

	int GetItemSpace()
	{
		return CallT<int>(base::Inven_Item::GetItemSpace, this);
	}

	int SetReSealCount(uchar a2)
	{
		return CallT<int>(base::Inven_Item::SetReSealCount, this, a2);
	}

	int GetReSealCount()
	{
		return CallT<int>(base::Inven_Item::GetReSealCount, this);
	}


};

class DB_UpdateAvatarJewelSlot
{
public:
	static int makeRequest(int a1, unsigned int a2, void* src)
	{
		return CallT<int>(base::DB_UpdateAvatarJewelSlot::makeRequest, a1, a2, src);
	}
};

class Dispatcher_ModItemAttr
{
public:
	int _SendResult(CUser* a2, ushort a3, ushort a4, ushort a5)
	{
		return CallT<int>(base::Dispatcher_ModItemAttr::_SendResult, this, a2, a3, a4, a5);
	}


};

class stMoveItemParam
{
public:
	static stMoveItemParam* NewstMoveItemParam()
	{
		void* v62 = malloc(0x20000);
		if (!v62) return NULL;
		CallT<int>(base::stMoveItemParam::stMoveItemParam_make, v62);
		return (stMoveItemParam*)v62;
	}

	static void DelstMoveItemParam(stMoveItemParam* a1)
	{
		CallT<int>(base::stMoveItemParam::stMoveItemParam_destroy, a1);
		free(a1);
	}

	static void DelstMoveItemParam2(stMoveItemParam* a1)
	{
		CallT<int>(base::stMoveItemParam::stMoveItemParam_del, a1);
	}


};
#pragma pack(pop)

#endif // __ITEM_H__

