|
|
@@ -259,6 +259,20 @@ function clearDrawNewSSRCnt(human, id)
|
|
|
info.leftNewSRRCnt = nil
|
|
|
end
|
|
|
|
|
|
+-- 精英召唤活动切换时重置40抽/100抽计数
|
|
|
+local function checkNewHeroDrawActSwitch(human)
|
|
|
+ local actId = NewHeroLogic.getActiveActId(human)
|
|
|
+ if not actId then
|
|
|
+ return
|
|
|
+ end
|
|
|
+ local info = getDrawInfo(human, DRAWCARD_ID8)
|
|
|
+ if info.newHeroActId and info.newHeroActId ~= actId then
|
|
|
+ clearDrawNoSSRCnt(human, DRAWCARD_ID8)
|
|
|
+ clearDrawNewSSRCnt(human, DRAWCARD_ID8)
|
|
|
+ end
|
|
|
+ info.newHeroActId = actId
|
|
|
+end
|
|
|
+
|
|
|
function clearDrawNoGoodCnt(human, id)
|
|
|
local info = getDrawInfo(human, id)
|
|
|
if not info then return end
|
|
|
@@ -272,7 +286,12 @@ function getFriendHeart(human)
|
|
|
end
|
|
|
|
|
|
function fontDrawCardNet(net, id, human)
|
|
|
- local config = DrawCardExcel[id]
|
|
|
+ local configId = id
|
|
|
+ if id == DRAWCARD_ID8 then
|
|
|
+ configId = NewHeroLogic.getNewHeroDrawConfigIds(NewHeroLogic.getActiveActId(human))
|
|
|
+ end
|
|
|
+ local config = DrawCardExcel[configId]
|
|
|
+ if not config then return end
|
|
|
local leftCnt, leftTime = getFreeInfo(human, id)
|
|
|
net.id = id
|
|
|
net.leftFreeTime = leftTime
|
|
|
@@ -345,6 +364,7 @@ end
|
|
|
|
|
|
-- 抽奖列表
|
|
|
function query(human)
|
|
|
+ checkNewHeroDrawActSwitch(human)
|
|
|
local msgRet = Msg.gc.GC_DRAWCARD_QUERY
|
|
|
msgRet.jifen = getJifen(human)
|
|
|
msgRet.left = getDrawNoSSRCnt(human, DRAWCARD_ID2)
|
|
|
@@ -731,6 +751,16 @@ local function draw(human, id, op, actConfig, skip,isAct)
|
|
|
return Broadcast.sendErr(human, Lang.ABS_JYZH_NOT_OPEN)
|
|
|
end
|
|
|
|
|
|
+ if id == DRAWCARD_ID8 then
|
|
|
+ checkNewHeroDrawActSwitch(human)
|
|
|
+ end
|
|
|
+
|
|
|
+ local newHeroMainId, newHeroId100, newHeroId10, newHeroId40
|
|
|
+ if id == DRAWCARD_ID8 and actId then
|
|
|
+ newHeroMainId, newHeroId100, newHeroId10, newHeroId40 = NewHeroLogic.getNewHeroDrawConfigIds(actId)
|
|
|
+ config = DrawCardExcel[newHeroMainId]
|
|
|
+ if not config then return end
|
|
|
+ end
|
|
|
|
|
|
if HeroLogic.getEmptyCnt(human) < heroCnt then
|
|
|
return Broadcast.sendErr(human, Lang.HERO_BAG_FULL)
|
|
|
@@ -761,7 +791,7 @@ local function draw(human, id, op, actConfig, skip,isAct)
|
|
|
|
|
|
-- local randomMin = math.random(1, heroCnt)
|
|
|
local randomMinSet = {}
|
|
|
- if id == DRAWCARD_ID2 then
|
|
|
+ if id == DRAWCARD_ID2 or id == DRAWCARD_ID8 then
|
|
|
if op == DRAWCARD_OP_2 then
|
|
|
-- 十连:1个保底位置
|
|
|
randomMinSet[math.random(1, 10)] = true
|
|
|
@@ -777,7 +807,11 @@ local function draw(human, id, op, actConfig, skip,isAct)
|
|
|
local tag = 0
|
|
|
|
|
|
for i = 1, heroCnt do
|
|
|
- config = DrawCardExcel[id]
|
|
|
+ if id == DRAWCARD_ID8 then
|
|
|
+ config = DrawCardExcel[newHeroMainId]
|
|
|
+ else
|
|
|
+ config = DrawCardExcel[id]
|
|
|
+ end
|
|
|
-- if id == DRAWCARD_ID2 and op == DRAWCARD_OP_2 and i == randomMin and getDraw2Cnt(human, id) > 3 then
|
|
|
-- if id == DRAWCARD_ID2 and (op == DRAWCARD_OP_2 or op == DRAWCARD_OP_3) and i == randomMin then
|
|
|
if id == DRAWCARD_ID2 and (op == DRAWCARD_OP_2 or op == DRAWCARD_OP_3) and randomMinSet[i] then
|
|
|
@@ -789,7 +823,7 @@ local function draw(human, id, op, actConfig, skip,isAct)
|
|
|
|
|
|
-- if id == DRAWCARD_ID8 and (op == DRAWCARD_OP_2 or op == DRAWCARD_OP_3) and i == randomMin then
|
|
|
if id == DRAWCARD_ID8 and (op == DRAWCARD_OP_2 or op == DRAWCARD_OP_3) and randomMinSet[i] then
|
|
|
- config = DrawCardExcel[DRAWCARD_ID10]
|
|
|
+ config = DrawCardExcel[newHeroId10]
|
|
|
end
|
|
|
|
|
|
-- 第40抽必出SSR
|
|
|
@@ -806,11 +840,11 @@ local function draw(human, id, op, actConfig, skip,isAct)
|
|
|
|
|
|
|
|
|
if id == DRAWCARD_ID8 and getDrawNoSSRCnt(human, id) >= DRAWCARD_40 - 1 then
|
|
|
- config = DrawCardExcel[DRAWCARD_ID11]
|
|
|
+ config = DrawCardExcel[newHeroId40]
|
|
|
end
|
|
|
|
|
|
if id == DRAWCARD_ID8 and getDrawNewSSRCnt(human, id) >= DRAWCARD_100 - 1 then
|
|
|
- config = DrawCardExcel[DRAWCARD_ID9]
|
|
|
+ config = DrawCardExcel[newHeroId100]
|
|
|
end
|
|
|
|
|
|
-- local heroID = randHeroID(human, id, op, config, actConfig, i == randomMin, isAct)
|