dp-s_doc/Object/Item/Item.md

4.4 KiB
Raw Permalink Blame History

Item 类函数文档

类说明 Item类用于表示游戏中的道具对象,包含各种属性和操作方法。


二、Output 函数

函数签名

  • function Output()

说明

将道具的属性数据转换为字符串并输出。遍历Attribute中的每个值,将其转换为十六进制格式并拼接成字符串,最后打印输出。


三、GetType 函数

函数签名

  • function GetType()

返回值

  • 字符串,表示道具的类型。

说明

根据道具属性中的类型值返回对应的道具类型描述,包括“装备”“消耗品”“材料”“任务材料”“副职业材料”等。


四、GetIndex 函数

函数签名

  • function GetIndex()

返回值

  • 整数,表示道具的编号。

说明

从道具属性数据中读取道具的编号。


五、SetIndex 函数

函数签名

  • function SetIndex(Index)

参数

  • Index:整数,表示要设置的道具编号。

说明

在道具属性数据中设置道具的编号。


六、GetUpgrade 函数

函数签名

  • function GetUpgrade()

返回值

  • 整数,表示道具的强化等级。

说明

从道具属性数据中读取道具的强化等级。


七、SetUpgrade 函数

函数签名

  • function SetUpgrade(Level)

参数

  • Level:整数,表示要设置的强化等级。

说明

在道具属性数据中设置道具的强化等级。


八、GetAdd_Info 函数

函数签名

  • function GetAdd_Info()

返回值

  • 整数,表示道具的品级或数量。

说明

如果是装备,则返回品级;如果是其他类型道具,则返回数量。


九、SetAdd_Info 函数

函数签名

  • function SetAdd_Info(Value)

参数

  • Value:整数,表示要设置的品级或数量。

说明

如果是装备,则设置品级;如果是其他类型道具,则设置数量。


十、GetDurable 函数

函数签名

  • function GetDurable()

返回值

  • 整数,表示道具的耐久度。

说明

从道具属性数据中读取道具的耐久度。


十一、SetDurable 函数

函数签名

  • function SetDurable(Value)

参数

  • Value:整数,表示要设置的耐久度。

说明

在道具属性数据中设置道具的耐久度。


十二、GetAmplification 函数

函数签名

  • function GetAmplification()

返回值

  • 整数,表示道具的增幅属性。

说明

从道具属性数据中读取道具的增幅属性。


十三、SetAmplification 函数

函数签名

  • function SetAmplification(Value)

参数

  • Value:整数,表示要设置的增幅属性。

说明

在道具属性数据中设置道具的增幅属性。


十四、GetForging 函数

函数签名

  • function GetForging()

返回值

  • 整数,表示道具的锻造属性。

说明

从道具属性数据中读取道具的锻造属性。


十五、SetForging 函数

函数签名

  • function SetForging(Value)

参数

  • Value:整数,表示要设置的锻造属性。

说明

在道具属性数据中设置道具的锻造属性。


十六、GetEnchanting 函数

函数签名

  • function GetEnchanting()

返回值

  • 整数,表示道具的附魔属性。

说明

从道具属性数据中读取道具的附魔属性。


十七、SetEnchanting 函数

函数签名

  • function SetEnchanting(Value)

参数

  • Value:整数,表示要设置的附魔属性。

说明

在道具属性数据中设置道具的附魔属性。


十八、Flush 函数

函数签名

  • function Flush()

说明

将道具的属性数据Attribute刷写到对应的内存地址中。


十九、Delete 函数

函数签名

  • function Delete()

说明

删除道具,调用相关函数移除道具,并将当前对象设为null

十九、GetRarity 函数

函数签名

  • function GetRarity()

说明

获取品级


十九、GetAttachType 函数

函数签名

  • function GetAttachType()

说明

获取交易类型


十九、IsPackagble 函数

函数签名

  • function IsPackagble()

说明

//是否可打包