zhanwencai hai 1 ano
pai
achega
9847209d7c
Modificáronse 2 ficheiros con 18 adicións e 7 borrados
  1. 17 7
      script/module/drawCard/DrawCardLogic.lua
  2. 1 0
      script/module/drawCard/Proto.lua

+ 17 - 7
script/module/drawCard/DrawCardLogic.lua

@@ -173,8 +173,7 @@ function addDrawLv(human, id, cnt)
     info.drawLV = info.drawLV or 0
     info.cntHero3 = (info.cntHero3 or 0) + cnt
 
-    local drawLevel = DrawLevelExcel
-    if not info then return end
+    if info.drawLV >= 15 then return end
 
     for lv, val in ipairs(drawLevel) do
         if info.cntHero3 >= val.need then
@@ -183,6 +182,19 @@ function addDrawLv(human, id, cnt)
     end
 end
 
+function getDrawNextLvNeed(human, id)
+    local info = getDrawInfo(human, id)
+
+    if not info then return end
+
+    info.drawLV = info.drawLV or 0
+
+    local drawLevelNeed = DrawLevelExcel[info.drawLV + 1]
+    if not drawLevelNeed then return end
+
+    return drawLevelNeed.need or 0
+end
+
 function setSkip(human, id, skip)
     human.db.drawCard.skip = skip or 0
 end
@@ -285,8 +297,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.drawLv = getDrawLv(human,DRAWCARD_ID2)
+    msgRet.drawCnt = getDraw2Cnt(human, DRAWCARD_ID2)
+    msgRet.drawLv = getDrawLv(human, DRAWCARD_ID2)
+    msgRet.drawNextLvNeed = getDrawNextLvNeed(human, DRAWCARD_ID2)
     Msg.send(msgRet, human.fd)
 end
 
@@ -767,9 +780,6 @@ local function drawV2(human, id, op, actConfig, skip, isAct)
         --更新抽卡等级
         addDrawLv(human, id, 1)
 
-        --更新抽卡等级 需要返回
-        query(human)
-
         LiLianLogic.onCallback(human, LiLianLogic.LILIAN_OUTID27, 1, star)
     end
 

+ 1 - 0
script/module/drawCard/Proto.lua

@@ -20,6 +20,7 @@ GC_DRAWCARD_QUERY = {
     {"leftNoSRRCnt",    1,      "int"},    -- 还需高抽多少次,必出SSR
     {"drawLv",    1,      "int"},    -- 抽卡等级
     {"drawCnt",    1,      "int"},    -- 抽卡次数
+    {"drawNextLvNeed",    1,      "int"},    -- 抽卡等级下一级需要经验
 }
 
 CG_DRAWCARD_OP = {