|
|
@@ -159,10 +159,19 @@ function getDrawLv(human, id)
|
|
|
return info.drawLV or 0
|
|
|
end
|
|
|
|
|
|
-function getDrawV2Cnt(human, id)
|
|
|
+function getDrawCurCnt(human, id)
|
|
|
local info = getDrawInfo(human, id)
|
|
|
if not info then return 0 end
|
|
|
- return info.cntHero3 or 0
|
|
|
+
|
|
|
+ info.drawLV = info.drawLV or 0
|
|
|
+ local drawCurCnt = info.cntHero3 or 0
|
|
|
+
|
|
|
+ if drawCurCnt == 0 then return drawCurCnt end
|
|
|
+
|
|
|
+ local drawNextLvCnt = DrawLevelExcel[info.drawLV]
|
|
|
+ if not drawNextLvCnt then return 0 end
|
|
|
+
|
|
|
+ return drawCurCnt - drawNextLvCnt.need
|
|
|
end
|
|
|
|
|
|
function addDrawLv(human, id, cnt)
|
|
|
@@ -175,14 +184,14 @@ function addDrawLv(human, id, cnt)
|
|
|
|
|
|
if info.drawLV >= 15 then return end
|
|
|
|
|
|
- for lv, val in ipairs(drawLevel) do
|
|
|
+ for lv, val in ipairs(DrawLevelExcel) do
|
|
|
if info.cntHero3 >= val.need then
|
|
|
info.drawLV = lv
|
|
|
end
|
|
|
end
|
|
|
end
|
|
|
|
|
|
-function getDrawNextLvNeed(human, id)
|
|
|
+function getDrawNextLvCnt(human, id)
|
|
|
local info = getDrawInfo(human, id)
|
|
|
|
|
|
if not info then return end
|
|
|
@@ -297,9 +306,9 @@ function query(human)
|
|
|
Grid.makeItem(msgRet.qiyuan, needItemID, 1)
|
|
|
msgRet.skip = human.db.drawCard.skip or 0
|
|
|
-- 高级召唤v2需要返回
|
|
|
- msgRet.drawCnt = getDraw2Cnt(human, DRAWCARD_ID2)
|
|
|
+ msgRet.drawCurCnt = getDrawCurCnt(human, DRAWCARD_ID2)
|
|
|
msgRet.drawLv = getDrawLv(human, DRAWCARD_ID2)
|
|
|
- msgRet.drawNextLvNeed = getDrawNextLvNeed(human, DRAWCARD_ID2)
|
|
|
+ msgRet.drawNextLvCnt = getDrawNextLvCnt(human, DRAWCARD_ID2)
|
|
|
Msg.send(msgRet, human.fd)
|
|
|
end
|
|
|
|
|
|
@@ -327,6 +336,11 @@ function sendDrawOp(human, id, op, heroList, items, heroNewList, heroIndexList,
|
|
|
end
|
|
|
end
|
|
|
fontDrawCardNet(msgRet.drawData, id, human)
|
|
|
+
|
|
|
+ -- 高级召唤v2需要返回
|
|
|
+ msgRet.drawCurCnt = getDrawCurCnt(human, DRAWCARD_ID2)
|
|
|
+ msgRet.drawLv = getDrawLv(human, DRAWCARD_ID2)
|
|
|
+ msgRet.drawNextLvCnt = getDrawNextLvCnt(human, DRAWCARD_ID2)
|
|
|
Msg.send(msgRet, human.fd)
|
|
|
end
|
|
|
|