抽奖 - GachaBoxService
抽奖活动是用户在连续登陆或者别的情况下(根据需要设定)所进行的对用户的奖励,根据名称以及奖品品质获得
首先需要获得GachaBox,可以获得当前所有有效的GachaBox,也可以通过名称获得指定的GachaBox。
SgtApi.GachaBoxService.autobalanceDraw(playerId, gachaBoxId, num, callback)
有自动修正的连抽
SgtApi.GachaBoxService.autobalanceDrawQuality(playerId, gachaBoxId, num, quality, callback)
指定初始品质的自动修正连抽
SgtApi.GachaBoxService.autobalanceDrawMaxQuality(playerId, gachaBoxId, num, quality, maxQuality, callback)
指定初始品质和最大品质的自动修正连抽
SgtApi.GachaBoxService.draw(playerId, gachaBoxId, quality, callback)
连续抽奖N次,N为数组qualities的元素个数,一个qualities元素对应一次抽奖
SgtApi.GachaBoxService.getAvailableGachaBox(callback)
获取当前所有有效的GachaBox
SgtApi.GachaBoxService.getGachaBoxByName(gachaBoxName, callback)
获取指定名称的GachaBox
SgtApi.GachaBoxService.getLotteriesByGachaBoxId(gachaBoxId, callback)
获取指定gachaBox的奖品
SgtApi.GachaBoxService.limitDraw(playerId, gachaBoxId, limitQuality, callback)
指定奖品品质总值的连抽