# Function: upgradeAttribute
▸ upgradeAttribute(params
: UpgradeAttributeParams): Promise‹UpgradeAttributeRes›
升级属性
# 参数:
属性 | 类型 | 描述 |
---|---|---|
params | UpgradeAttributeParams | 调用参数 |
UpgradeAttributeParams
属性 | 类型 | 描述 |
---|---|---|
attributeId | number | 要升级的属性id,对应AttachedAttribute中的id AttachedAttribute |
itemType? | number | 要升级的物品类型(只有等于0时,才是关联背包中的物品,不传则默认取0) |
itemUid | string | 要升级的物品id,对应itemAttributesMap中的key itemAttributesMap |
complete? | Method | 操作完成时(成功或失败),均会调用该回调函数 |
fail? | Method | 操作失败时,调用该回调函数 |
success? | Method | 操作成功时,调用该回调函数 |
# 返回值:
Promise‹UpgradeAttributeRes›