Explorar el Código

同步精灵召唤功能

mafei hace 1 año
padre
commit
49b61e39c9

+ 1 - 0
script/module/absAct/AbsActDefine.lua

@@ -30,6 +30,7 @@ ABS_ACT_TYPE_30 = 30 -- 元宵双倍
 ABS_ACT_TYPE_31 = 31 -- 元宵新年卡
 ABS_ACT_TYPE_33 = 33 -- 元宵喜庆来年
 ABS_ACT_TYPE_34 = 34 -- 魔兽双倍洗练
+ABS_ACT_TYPE_35 = 35 -- 新英雄抽卡
 
 
 ABS_ACT_TYPE_46 = 46 -- 新服-七天战力达标

+ 1 - 0
script/module/absAct/AbsActLogic.lua

@@ -44,6 +44,7 @@ local AbsReachRankDB = require("absAct.AbsReachRankDB")
 local FestivalSevenDayCardLogic = require("absAct.FestivalSevenDayCardLogic")
 local DailyFixedTaskLogic = require("absAct.DailyFixedTaskLogic")
 local AbsSignGiftLogic = require("absAct.AbsSignGiftLogic")
+local NewHeroLogic = require("absAct.NewHeroLogic")
 
 ABS_ACT_TYPE_LIST = nil
 function initAfterHot()

+ 5 - 0
script/module/absAct/Handler.lua

@@ -27,6 +27,7 @@ local AbsReachRankLogic = require("absAct.AbsReachRankLogic")
 local DailyFixedTaskLogic = require("absAct.DailyFixedTaskLogic")
 local FestivalSevenDayCardLogic = require("absAct.FestivalSevenDayCardLogic")
 local AbsSignGiftLogic = require("absAct.AbsSignGiftLogic")
+local NewHeroLogic = require("absAct.NewHeroLogic")
 
 function CG_ABS_ACT_DETAIL_QUERY(human, msg)
     AbsActLogic.actDetailQuery(human,msg.id)
@@ -231,4 +232,8 @@ end
 
 function CG_ABS_SIGNGIFT_REWARD(human, msg)
     AbsSignGiftLogic.getItem(human, msg.id, msg.funcID, msg.type)
+end
+
+function CG_ABS_NEWHERO_BUYGIFT(human, msg)
+    NewHeroLogic.giftBuy(human, msg.id)
 end

+ 223 - 0
script/module/absAct/NewHeroLogic.lua

@@ -0,0 +1,223 @@
+local AbsActExcel = require("excel.absAct")
+local Lang = require("common.Lang")
+local ObjHuman = require("core.ObjHuman")
+local Msg = require("core.Msg")
+local Broadcast = require("broadcast.Broadcast")
+local Grid = require("bag.Grid")
+local BagLogic = require("bag.BagLogic")
+local ItemDefine = require("bag.ItemDefine")
+local BuyLogic = require("topup.BuyLogic")
+local AbsActDefine = require("absAct.AbsActDefine")
+local AbsActLogic = require("absAct.AbsActLogic")
+local Log = require("common.Log")
+local YunYingLogic = require("yunying.YunYingLogic")
+
+ABS_ACT_ID = 9001
+--
+function initAfterHot()
+    
+end
+
+--
+function isActive(human, YYInfo, funcConfig)
+    return not isOpen(human, YYInfo, funcConfig)
+end
+
+--
+function isOpen(human, YYInfo, funcConfig)
+    return AbsActLogic.isStarted(human, funcConfig.funcID)
+end
+
+--
+function isRed(human, YYInfo, funcConfig)
+    return false
+end
+
+--
+function getLeftTime(human, YInfo, funcConfig)
+    local ret, endTime, startTime = AbsActLogic.isStarted(human, ABS_ACT_ID)
+    if ret == true then
+        return endTime - os.time()
+    else
+        return 0
+    end
+end
+
+function getNewHeroID(human)
+    local startedFlag, endTime, startTime = AbsActLogic.isStarted(human, ABS_ACT_ID)
+    if not startedFlag then return 0 end
+    local absActConfig = AbsActExcel.absActivity[ABS_ACT_ID]
+    if not absActConfig then return 0 end
+
+    return absActConfig.icon
+end
+
+function getAndSendMsg(human, id, actId)
+    local now = os.time()
+    local startedFlag, endTime, startTime = AbsActLogic.isStarted(human, id)
+    if not startedFlag then return end
+    local absActConfig = AbsActExcel.absActivity[id]
+    if not absActConfig then return end
+
+    local absAct = human.db.absAct[id]
+    if not absAct then return end
+
+    local msgRet = Msg.gc.GC_ABS_NEWHERO
+    msgRet.id = absActConfig.icon
+    msgRet.startTime = startTime
+    msgRet.endTime = endTime
+
+    local index = 0
+    for giftId, v in ipairs(AbsActExcel.absEva) do
+        index = index + 1
+        for j = 1, #v.reward do
+            Grid.makeItem(msgRet.giftlist[index].item[j], v.reward[j][1], v.reward[j][2])
+        end
+        msgRet.giftlist[index].item[0] = #v.reward
+        msgRet.giftlist[index].cnt = absAct.newheroCnt and absAct.newheroCnt[giftId] or 0
+        msgRet.giftlist[index].id = giftId
+        msgRet.giftlist[index].maxCnt = v.limit
+
+        local buyID = v.buyID
+        msgRet.giftlist[index].buyMsg[0] = 1
+        if v.buyID == 0 then
+            msgRet.giftlist[index].buyMsg[1] = {
+                buyID = buyID,
+                region = "zuanshi",
+                cost = v.price,
+                icon = 0,
+                name = "",
+                isFirst = 0,
+                desc = "",
+                doubleCnt = 0,
+                actDoubleCnt = 0,
+                useDoubleCnt = 0,
+                buyCnt = 0,
+                vipExp = 0,
+                yuanjia = 0,
+                zhekou = 0,
+            }
+        else
+            BuyLogic.fontBuyItem(human, msgRet.giftlist[index].buyMsg[1], buyID)
+        end
+    end
+    msgRet.giftlist[0] = index
+
+    Msg.send(msgRet, human.fd)
+end
+
+function getgiftbybuyid(buyid)
+    for giftId, v in ipairs(AbsActExcel.absEva) do
+        if v.buyID == buyid then
+            return giftId
+        end
+    end
+end
+
+function newheroGift(human, id, buyConf, isFirst, cnt)
+    local state = AbsActLogic.isStarted(human, id)
+    local absConfig = AbsActExcel.absActivity[id]
+    if absConfig == nil or not state then return end
+
+    -- 存在多个特惠礼包 同时   开放
+    local giftid = getgiftbybuyid(buyConf.id)
+    if not giftid then return end
+
+    local config = AbsActExcel.absEva[giftid]
+    if not config then return end
+
+    AbsActLogic.checkAbsActClean(human, id)
+
+    human.db.absAct[id].newheroCnt = human.db.absAct[id].newheroCnt or { }
+    local nowBuyCnt = human.db.absAct[id].newheroCnt[giftid] or 0
+
+    -- 判断是否达到购买上限
+    if nowBuyCnt >= config.limit then
+        Broadcast.sendErr(human, Lang.HERO_BAG_BUY_CAP_NO_CNT)
+        return
+    end
+
+    -- 当金币购买之后超过最大金币时,不允许购买
+    for j = 1, #config.reward do
+        local itemID = config.reward[j][1]
+        local itemCnt = config.reward[j][2]
+        if itemID == ItemDefine.ITEM_JINBI_ID then
+            if not ObjHuman.canAddJinbi(human, itemCnt) then
+                return
+            end
+        end
+    end
+
+    -- 增加已购买次数
+    human.db.absAct[id].newheroCnt[giftid] = nowBuyCnt + 1
+    -- 发放物品
+    -- local items = { }
+    BagLogic.addItemList(human, config.reward, "newhero_reward")
+
+    Broadcast.sendErr(human, Lang.ITEM_BUY_SUCCESS)
+    AbsActLogic.actDetailQuery(human, id)
+end
+
+
+function giftBuy(human, giftid)
+    local state = AbsActLogic.isStarted(human, ABS_ACT_ID)
+    if state ~= true then return end
+    local absConfig = AbsActExcel.absActivity[ABS_ACT_ID]
+    if not absConfig then return end
+
+    AbsActLogic.checkAbsActClean(human, ABS_ACT_ID)
+
+    -- 存在多个特惠礼包 同时   开放
+    local config = AbsActExcel.absEva[giftid]
+    if config.buyID ~= 0 then return end
+
+    -- 初始化已购买次数
+    human.db.absAct[ABS_ACT_ID].newheroCnt = human.db.absAct[ABS_ACT_ID].newheroCnt or { }
+    local nowBuyCnt = human.db.absAct[ABS_ACT_ID].newheroCnt[giftid] or 0
+    -- 判断是否达到购买上限
+    if nowBuyCnt >= config.limit then
+        Broadcast.sendErr(human, Lang.HERO_BAG_BUY_CAP_NO_CNT)
+        return
+    end
+
+    local itemID = ItemDefine.ITEM_ZUANSHI_ID
+    local itemCnt = config.price
+    if not BagLogic.checkItemCnt(human, itemID, itemCnt) then
+        Broadcast.sendErr(human, Lang.COMMON_NO_ZUANSHI)
+        return
+    end
+
+    -- 当金币购买之后超过最大金币时,不允许购买
+    for j = 1, #config.reward do
+        local itemID = config.reward[j][1]
+        local itemCnt = config.reward[j][2]
+        if itemID == ItemDefine.ITEM_JINBI_ID then
+            if not ObjHuman.canAddJinbi(human, itemCnt) then
+                return
+            end
+        end
+    end
+
+    BagLogic.delItem(human, itemID, itemCnt, "newhero_reward")
+
+    -- 增加已购买次数
+    human.db.absAct[ABS_ACT_ID].newheroCnt[giftid] = nowBuyCnt + 1
+    -- 发放物品
+    -- local items = { }
+    BagLogic.addItemList(human, AbsActExcel.absEva[giftid].reward, "newhero_reward")
+
+    Broadcast.sendErr(human, Lang.ITEM_BUY_SUCCESS)
+
+    AbsActLogic.actDetailQuery(human, ABS_ACT_ID)
+end
+
+function updateDaily(human, id)
+    if human.db.absAct[ABS_ACT_ID] then
+        human.db.absAct[ABS_ACT_ID] = {}
+    end
+    local state = AbsActLogic.isStarted(human, ABS_ACT_ID)
+    if state ~= true then
+        human.db.drawCard.list[8] = {}
+    end
+    AbsActLogic.actDetailQuery(human, ABS_ACT_ID)
+ end

+ 21 - 1
script/module/absAct/Proto.lua

@@ -914,4 +914,24 @@ CG_ABS_SIGNGIFT_REWARD = {
     {"type",    1, "byte"},     --礼包类型 1签到礼包 2专属礼包
 }
 
------------元宵节活动End------------
+-----------元宵节活动End------------
+
+-----------新英雄抽卡------------
+NewHeroGift = {
+    {"id",		    1, "int" },       -- 礼包ID
+    {"item",	    5, ItemData},    -- 礼包包含物品
+    {"cnt",		    1, "byte"},      -- 已购买次数
+    {"maxCnt",      1, "byte"},       -- 最大购买次数
+    {"buyMsg",	    2, BuyItem},      -- buyID
+}
+
+GC_ABS_NEWHERO = {
+    {"id",              1,  "int"},         -- 英雄id
+    {"startTime",       1,  "int"},         -- 开启时间
+    {"endTime",         1,  "int"},         -- 结束时间
+    {"giftlist",        4,  NewHeroGift},   -- 礼包列表
+}
+
+CG_ABS_NEWHERO_BUYGIFT = {
+    {"id",			1,"int"},                -- 礼包ID
+}

+ 1 - 0
script/module/broadcast/PanelDefine.lua

@@ -330,3 +330,4 @@ PANEL_ID_7051 = 7051 --限时狂欢
 PANEL_ID_7052 = 7052 --限时周卡
 PANEL_ID_7053 = 7053 --限时好礼
 
+PANEL_ID_8001 = 8001 --购买EVA英雄

+ 172 - 350
script/module/drawCard/DrawCardLogic.lua

@@ -20,9 +20,6 @@ local HeroLogic = require("hero.HeroLogic")
 local BagLogic = require("bag.BagLogic")
 local HeroGrid = require("hero.HeroGrid")
 local DrawCardExcel = require("excel.drawCard").drawCard
-local DrawCardV2Excel = require("excel.drawCard").drawCardV2
-local DrawLevelExcel = require("excel.drawCard").drawLevel
-local CampWeightExcel = require("excel.drawCard").campWeight
 local DrawCardActivityExcel = require("excel.drawCard").activity
 local DailyTaskLogic = require("dailyTask.DailyTaskLogic")
 local ChengjiuLogic = require("chengjiu.ChengjiuLogic")
@@ -31,7 +28,7 @@ local HeroExcel = require("excel.hero").hero
 local MailExcel = require("excel.mail")
 local MailManager = require("mail.MailManager")
 local ChatPaoMaLogic = require("chat.ChatPaoMaLogic")
-local MonthSummon = require("monthAct.MonthSummon")
+local MonthSummon = require("monthAct.MonthSummon")  
 local HeroBook = require("hero.HeroBook")
 local RoleDefine = require("role.RoleDefine")
 local RoleSystemLogic = require("roleSystem.RoleSystemLogic")
@@ -53,38 +50,45 @@ local VipLogic = require("vip.VipLogic")
 local MengxinLogic = require("present.MengxinLogic")
 local LimitPerpleHeroLogic = require("present.LimitPerpleHeroLogic")
 local HeroComeLogic = require("absAct.HeroComeLogic")
-local Log = require("common.Log")
+local NewHeroLogic = require("absAct.NewHeroLogic")
 Json = Json or require("common.Json")
 
-DRAWCARD_ID0 = 0  -- 积分召唤
-DRAWCARD_ID1 = 1  -- 基础召唤
-DRAWCARD_ID2 = 2  -- 高级召唤
-DRAWCARD_ID3 = 3  -- 友情召唤
-DRAWCARD_ID4 = 4  -- 积分召唤权重
-DRAWCARD_ID5 = 5  -- 高级召唤十连抽必出
-DRAWCARD_ID6 = 6  -- 高级召唤单抽
-DRAWCARD_ID7 = 7  -- 40高抽必出SSR
-
-DRAWCARD_OP_1 = 1 -- 召唤1次
-DRAWCARD_OP_2 = 2 -- 召唤10次
+DRAWCARD_ID0 = 0	-- 积分召唤
+DRAWCARD_ID1 = 1	-- 基础召唤
+DRAWCARD_ID2 = 2	-- 高级召唤
+DRAWCARD_ID3 = 3	-- 友情召唤
+DRAWCARD_ID4 = 4	-- 积分召唤权重
+DRAWCARD_ID5 = 5	-- 高级召唤十连抽必出
+DRAWCARD_ID6 = 6	-- 高级召唤单抽
+DRAWCARD_ID7 = 7    -- 40高抽必出SSR
+DRAWCARD_ID8 = 8    -- 新英雄活动抽卡
+DRAWCARD_ID9 = 9    -- 100高抽必出新英雄
+DRAWCARD_ID10 = 10    -- 新英雄活动十抽
+DRAWCARD_ID11 = 11    -- 新英雄活动40抽必出
+
+DRAWCARD_OP_1 = 1	-- 召唤1次
+DRAWCARD_OP_2 = 2	-- 召唤10次
 
 DRAWCARD_JIFEN_NEED_VIPLV = 3
 DRAWCARD_JIFEN_SHOW_ITEM = 801005
 
 MAX_JIFEN = 3000
 
-DRAWCARD_40 = 40 -- 40连抽,必得SSR
-
-AD_RESET_FREECNT = 4
+DRAWCARD_40 = 40    -- 40连抽,必得SSR
+DRAWCARD_100 = 100  -- 新英雄抽卡活动期间100抽必得
 
 -- 积分
 function getJifen(human)
-    return human.db.drawCard.jifen
+    return human.db.drawCard.jifen 
 end
 
 function updateJifen(human, d)
-    human.db.drawCard.jifen = human.db.drawCard.jifen or 0
-    human.db.drawCard.jifen = human.db.drawCard.jifen + d
+   human.db.drawCard.jifen = human.db.drawCard.jifen or 0
+   human.db.drawCard.jifen = human.db.drawCard.jifen + d
+end
+
+function addJifen(human,val)
+    human.db.drawCard.jifen = human.db.drawCard.jifen + val
 end
 
 -- 根据抽奖id获取相关信息
@@ -95,19 +99,19 @@ end
 -- 免费CD
 function getFreeInfo(human, id)
     if id ~= DRAWCARD_ID1 and id ~= DRAWCARD_ID2 then
-        return 0, 0 --只有普通和高抽可以免费
+        return 0, 0 --只有普通和高抽可以免费 
     end
 
     local info = getDrawInfo(human, id)
     local config = DrawCardExcel[id]
     local leftCnt = 1
     local leftTime = 0
-    if not info.time then
+    if not info.time then 
         return leftCnt, leftTime
     end
     leftTime = math.max(info.time - os.time(), 0)
     if leftTime > 1 then
-        leftCnt = 0
+       leftCnt = 0
     end
     return leftCnt, leftTime
 end
@@ -115,7 +119,7 @@ end
 -- 设置免费冷却CD
 function setUseFree(human, id)
     local info = getDrawInfo(human, id)
-    if not info then return end
+    if not info then return end  
     local config = DrawCardExcel[id]
     info.time = Util.getDayStartTime(os.time()) + 86400
 end
@@ -138,7 +142,7 @@ end
 
 function addDraw2Cnt(human, id, cnt)
     local info = getDrawInfo(human, id)
-    if not info then return end
+    if not info then return end   
     info.cntHero2 = (info.cntHero2 or 0) + cnt
 end
 
@@ -151,65 +155,10 @@ end
 
 function addDrawCnt(human, id, cnt)
     local info = getDrawInfo(human, id)
-    if not info then return end
+    if not info then return end   
     info.cntHero = (info.cntHero or 0) + cnt
 end
 
-function getDrawLv(human, id)
-    local info = getDrawInfo(human, id)
-    if not info then return 0 end
-    return info.drawLV or 0
-end
-
-function getDrawCurCnt(human, id)
-    local info = getDrawInfo(human, id)
-    if not info then return 0 end
-
-    info.drawLV = info.drawLV or 0
-    info.cntHero3 = info.cntHero3 or 0
-
-    if info.cntHero3 == 0 then return 0 end
-
-    local drawCurCnt = 0
-    local drawNextLvCnt = DrawLevelExcel[info.drawLV]
-    if not drawNextLvCnt then
-        drawCurCnt = (info.cntHero3 - 0)
-    else
-        drawCurCnt = (info.cntHero3 - drawNextLvCnt.need)
-    end
-    return drawCurCnt
-end
-
-function addDrawLv(human, id, cnt)
-    local info = getDrawInfo(human, id)
-
-    if not info then return end
-
-    info.drawLV = info.drawLV or 0
-    info.cntHero3 = (info.cntHero3 or 0) + cnt
-
-    if info.drawLV >= 15 then return end
-
-    for lv, val in ipairs(DrawLevelExcel) do
-        if info.cntHero3 >= val.need then
-            info.drawLV = lv
-        end
-    end
-end
-
-function getDrawNextLvCnt(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
@@ -223,7 +172,7 @@ end
 
 function addDrawNoGoodCnt(human, id, cnt)
     local info = getDrawInfo(human, id)
-    if not info then return end
+    if not info then return end 
 
     info.chengjiuCnt = (info.chengjiuCnt or 0) + cnt
 end
@@ -249,10 +198,31 @@ function clearDrawNoSSRCnt(human, id)
     info.leftSSRCnt = nil
 end
 
-function clearDrawNoGoodCnt(human, id)
+function getDrawNewSSRCnt(human, id)
     local info = getDrawInfo(human, id)
+    if not info then return 0 end
+
+    return info.leftNewSRRCnt or 0
+end
+
+function addDrawNewSSRCnt(human, id, cnt)
+    local info = getDrawInfo(human, id, cnt)
     if not info then return end
 
+    info.leftNewSRRCnt = (info.leftNewSRRCnt or 0) + cnt
+end
+
+function clearDrawNewSSRCnt(human, id)
+    local info = getDrawInfo(human, id)
+    if not info then return end
+
+    info.leftNewSRRCnt = nil
+end
+
+function clearDrawNoGoodCnt(human, id)
+    local info = getDrawInfo(human, id)
+    if not info then return end 
+
     info.chengjiuCnt = nil
 end
 
@@ -272,15 +242,15 @@ function fontDrawCardNet(net, id, human)
         net.items[0] = net.items[0] + 1
         Grid.makeItem(net.items[net.items[0]], config.item1[1], config.item1[2])
     end
-
+    
     local vipArg = 100
     if id == DRAWCARD_ID2 then
         vipArg = VipLogic.getPowerArgs(human, VipLogic.VIP_POWER21)
     end
 
     if config.item2[1] and config.item2[2] then
-        net.items[0] = net.items[0] + 1
-        Grid.makeItem(net.items[net.items[0]], config.item2[1], math.floor(config.item2[2] * vipArg / 100))
+       net.items[0] = net.items[0] + 1
+       Grid.makeItem(net.items[net.items[0]], config.item2[1], math.floor(config.item2[2] * vipArg / 100 ) )
     end
 
     vipArg = 0
@@ -295,44 +265,36 @@ function fontDrawCardNet(net, id, human)
     net.canBuy = ItemExcel.buy[config.item1[1]] and 1 or 0
 end
 
--- 三个抽奖列表
+-- 抽奖列表
 function query(human)
     local msgRet = Msg.gc.GC_DRAWCARD_QUERY
     msgRet.jifen = getJifen(human)
     msgRet.left = getDrawNoSSRCnt(human, DRAWCARD_ID2)
     msgRet.leftNoSRRCnt = DRAWCARD_40 - getDrawNoSSRCnt(human, DRAWCARD_ID2)
+    msgRet.leftNewSRRCnt = getDrawNewSSRCnt(human, DRAWCARD_ID8)
+    msgRet.leftNewSRR40Cnt = DRAWCARD_40 - getDrawNoSSRCnt(human, DRAWCARD_ID8)
     msgRet.list[0] = 0
-    for id = DRAWCARD_ID1, DRAWCARD_ID3 do
+
+    local ids = {DRAWCARD_ID1, DRAWCARD_ID2, DRAWCARD_ID3, DRAWCARD_ID8}
+    for i = 1, #ids do
         msgRet.list[0] = msgRet.list[0] + 1
         local net = msgRet.list[msgRet.list[0]]
-        fontDrawCardNet(net, id, human)
+        fontDrawCardNet(net, ids[i], human)
     end
 
     local needItemID = ItemDefine.ITEM_XIANZHI_BAOZHU_ID
     Grid.makeItem(msgRet.qiyuan, needItemID, 1)
     msgRet.skip = human.db.drawCard.skip or 0
-    -- 高级召唤v2需要返回
-    msgRet.drawCurCnt = getDrawCurCnt(human, DRAWCARD_ID2)
-    msgRet.drawLv = getDrawLv(human, DRAWCARD_ID2)
-    msgRet.drawNextLvCnt = getDrawNextLvCnt(human, DRAWCARD_ID2)
-    msgRet.drawAdCnt = getResetAdCnt(human)
     Msg.send(msgRet, human.fd)
 end
 
--- 获取剩余广告观看次数
-function getResetAdCnt(human)
-    local adRewardCnt = human.db.adRewardCnt or 0
-    -- if adRewardCnt > 3 then
-    --     human.db.adRewardCnt = 0
-    -- end
-    return math.max(AD_RESET_FREECNT - adRewardCnt, 0)
-end
-
 -- 抽奖结果
-function sendDrawOp(human, id, op, heroList, items, heroNewList, heroIndexList, isAct)
+function sendDrawOp(human, id, op, heroList, items, heroNewList, heroIndexList,isAct)
     local msgRet = Msg.gc.GC_DRAWCARD_OP
     msgRet.isAct = isAct or 0
     msgRet.leftNoSRRCnt = DRAWCARD_40 - getDrawNoSSRCnt(human, DRAWCARD_ID2)
+    msgRet.leftNewSRRCnt = getDrawNewSSRCnt(human, DRAWCARD_ID8)
+    msgRet.leftNewSRR40Cnt = DRAWCARD_40 - getDrawNoSSRCnt(human, DRAWCARD_ID8)
     local dataNet = msgRet.data
     dataNet.jifen = getJifen(human)
     dataNet.id = id
@@ -342,7 +304,7 @@ function sendDrawOp(human, id, op, heroList, items, heroNewList, heroIndexList,
         local heroID = heroList[i]
         local isNew = heroNewList and heroNewList[i]
         local index = heroIndexList and heroIndexList[i]
-        HeroGrid.makeHeroNice(dataNet.heros[i], heroID, nil, isNew, index,human)
+        HeroGrid.makeHeroNice(dataNet.heros[i], heroID, nil, isNew, index, human)      
     end
     dataNet.items[0] = 0
     if items and type(items) == "table" then
@@ -352,12 +314,6 @@ 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)
-    msgRet.drawAdCnt = getResetAdCnt(human)
     Msg.send(msgRet, human.fd)
 end
 
@@ -375,22 +331,21 @@ local function jifenDraw(human, isAct)
     if HeroLogic.getEmptyCnt(human) < 1 then
         return Broadcast.sendErr(human, Lang.HERO_BAG_FULL)
     end
-
+    
     local heroID = randHeroID(human, DRAWCARD_ID4, DRAWCARD_OP_1, config)
 
-    updateJifen(human, -MAX_JIFEN)
-
+    updateJifen(human, -MAX_JIFEN)    
+    
     local heroConfig = HeroExcel[heroID]
-    ChatPaoMaLogic.broadcast(human, ChatPaoMaLogic.PAOMA_TYPE_BROAD_TYPE4, heroConfig.grade, heroID)
+	ChatPaoMaLogic.broadcast(human, ChatPaoMaLogic.PAOMA_TYPE_BROAD_TYPE4, heroConfig.grade, heroID)
     local isNew = not HeroBook.isGet(human, heroConfig.id, heroConfig.star)
-    local heroIndex, fenjielist = HeroLogic.addHero(human, heroID, nil, 1, "draw_card")
-    Log.write(Log.LOGID_OSS_DRAWCARD, human.db._id, human.db.account, human.db.name, human.db.lv, DRAWCARD_ID4, heroID, 0,
-        0, 0, db.jifen)
-    sendDrawOp(human, DRAWCARD_ID4, 0, { heroID }, fenjielist, { isNew }, { heroIndex }, isAct)
+    local heroIndex, fenjielist = HeroLogic.addHero(human, heroID,nil, 1, "draw_card")
+    Log.write(Log.LOGID_OSS_DRAWCARD, human.db._id, human.db.account, human.db.name, human.db.lv, DRAWCARD_ID4, heroID, 0, 0, 0, db.jifen)
+    sendDrawOp(human, DRAWCARD_ID4, 0, {heroID}, fenjielist, {isNew}, {heroIndex}, isAct)
 end
 
 -- 检查道具+扣道具
-function checkUseItem(human, id, op, config, isAct)
+function checkUseItem(human, id, op, config,isAct)
     local item = config["item" .. op]
     local zuanshi = config["zuanshi" .. op]
     if not item or not zuanshi then return end
@@ -401,17 +356,16 @@ function checkUseItem(human, id, op, config, isAct)
     if id == DRAWCARD_ID2 and op == DRAWCARD_OP_2 then
         local vipArg = 100
         vipArg = VipLogic.getPowerArgs(human, VipLogic.VIP_POWER21)
-        print(" checkUseItem  vipArg   ", vipArg, "  ,   old  :  ", itemCnt, "  ,  new : ",
-            math.floor(itemCnt * vipArg / 100))
-        itemCnt = math.floor(itemCnt * vipArg / 100)
-    end
+        print(" checkUseItem  vipArg   ", vipArg, "  ,   old  :  " ,itemCnt , "  ,  new : ", math.floor(itemCnt * vipArg / 100 ) )
+        itemCnt = math.floor(itemCnt * vipArg / 100 )
+    end 
     print("  checkUseItem   itemID  itemCnt ", itemID, itemCnt)
     -- 活动只扣道具
     if isAct == AbsActDefine.ABS_ACT_TYPE_4 then
-        local state, id = AbsActLogic.isStartedByType(human, AbsActDefine.ABS_ACT_TYPE_4)
+        local state,id = AbsActLogic.isStartedByType(human, AbsActDefine.ABS_ACT_TYPE_4)
         if not state then
             return
-        end
+        end 
         local config = PerpleHeroLogic.getConfigByActID(id)
         itemID = config["item" .. op][1]
         itemCnt = config["item" .. op][2]
@@ -422,10 +376,10 @@ function checkUseItem(human, id, op, config, isAct)
             return
         end
     elseif isAct == AbsActDefine.ABS_ACT_TYPE_19 then
-        local state, id = AbsActLogic.isStartedByType(human, AbsActDefine.ABS_ACT_TYPE_19)
+        local state,id = AbsActLogic.isStartedByType(human, AbsActDefine.ABS_ACT_TYPE_19)
         if not state then
             return
-        end
+        end 
         local config = HeroComeLogic.getConfigByActID(id)
         itemID = config["item" .. op][1]
         itemCnt = config["item" .. op][2]
@@ -438,7 +392,7 @@ function checkUseItem(human, id, op, config, isAct)
     elseif isAct == AbsActDefine.OA_ACT_TYPE_501 then
         local limitState = LimitPerpleHeroLogic.checkOpen()
         if not limitState then
-            return
+            return 
         end
         local config = LimitPerpleHeroLogic.getConfigByActID()
         itemID = config["item" .. op][1]
@@ -455,7 +409,7 @@ function checkUseItem(human, id, op, config, isAct)
         setUseFree(human, id)
         return true
     elseif BagLogic.getItemCnt(human, itemID) >= itemCnt then -- 扣道具
-        BagLogic.delItem(human, itemID, itemCnt, "draw_card")
+        BagLogic.delItem(human, itemID,  itemCnt, "draw_card")
         return true
     elseif zuanshi > 0 then -- 扣钻石
         -- 抵扣道具
@@ -466,28 +420,27 @@ function checkUseItem(human, id, op, config, isAct)
             vipArg = VipLogic.getPowerArgs(human, VipLogic.VIP_POWER22)
         end
         zuanshi = zuanshi + vipArg
-        if haveCnt > 0 then
-            zuanshi = zuanshi - math.floor(zuanshi * haveCnt / itemCnt)
+        if haveCnt > 0 then          
+            zuanshi = zuanshi - math.floor(zuanshi * haveCnt / itemCnt) 
             zuanshi = zuanshi > 0 and zuanshi or 0
-        end
+        end       
 
         if not ObjHuman.checkRMB(human, zuanshi) then
-            return
+           return 
         end
-
         if haveCnt > 0 then
-            BagLogic.delItem(human, itemID, haveCnt, "draw_card")
+           BagLogic.delItem(human, itemID, haveCnt, "draw_card")
         end
         ObjHuman.decZuanshi(human, -zuanshi, "draw_card")
         return true
     end
 
     if zuanshi <= 0 then
-        Broadcast.sendErr(human, Util.format(Lang.DRAWCARD_ERR_NOITEM, ItemDefine.getValue(itemID, "name")))
+        Broadcast.sendErr(human, Util.format(Lang.DRAWCARD_ERR_NOITEM, ItemDefine.getValue(itemID, "name")))   
     end
 end
 
---
+-- 
 function randHeroID(human, id, op, config, actConfig, randomIndex, isAct)
     if isAct == 0 then
         if id == DRAWCARD_ID1 and op == DRAWCARD_OP_1 and getDrawCnt(human, id) == 0 then
@@ -497,34 +450,34 @@ function randHeroID(human, id, op, config, actConfig, randomIndex, isAct)
             return SysParameter.getSysParameter(SysParameter.PARAMETER_7)
         end
     end
-
+    
     if randomIndex and isAct == 0 then
         if id == DRAWCARD_ID2 and op == DRAWCARD_OP_2 then
-            local sysHeroList = nil
-            local draw2Cnt = getDraw2Cnt(human, id)
-            draw2Cnt = math.floor(draw2Cnt / 10)
-            if draw2Cnt == 0 then
-                sysHeroList = SysParameter.getSysParameterTb(SysParameter.PARAMETER_11)
-            elseif draw2Cnt == 1 then
-                sysHeroList = SysParameter.getSysParameterTb(SysParameter.PARAMETER_12)
-            elseif draw2Cnt == 2 then
-                sysHeroList = SysParameter.getSysParameterTb(SysParameter.PARAMETER_13)
-            end
-
-            if sysHeroList then
-                local totoalWeight = 0
-                for i = 1, #sysHeroList do
-                    totoalWeight = totoalWeight + sysHeroList[i][2]
-                end
-
-                local r = math.random(1, totoalWeight)
-                for i = 1, #sysHeroList do
-                    if r <= sysHeroList[i][2] then
-                        return sysHeroList[i][1]
-                    end
-                    r = r - sysHeroList[i][2]
-                end
-            end
+           local sysHeroList = nil
+           local draw2Cnt = getDraw2Cnt(human, id)
+           draw2Cnt = math.floor(draw2Cnt/10)
+           if draw2Cnt == 0 then
+              sysHeroList = SysParameter.getSysParameterTb(SysParameter.PARAMETER_11)
+           elseif draw2Cnt == 1 then
+              sysHeroList = SysParameter.getSysParameterTb(SysParameter.PARAMETER_12)
+           elseif draw2Cnt == 2 then
+              sysHeroList = SysParameter.getSysParameterTb(SysParameter.PARAMETER_13)
+           end
+
+           if sysHeroList then
+              local totoalWeight = 0
+              for i=1, #sysHeroList do
+                 totoalWeight = totoalWeight + sysHeroList[i][2]
+              end
+             
+              local r = math.random(1, totoalWeight)
+              for i=1, #sysHeroList do 
+                 if r <= sysHeroList[i][2] then
+                    return sysHeroList[i][1]
+                 end
+                 r = r - sysHeroList[i][2]
+              end
+           end
         end
     end
 
@@ -541,54 +494,23 @@ function randHeroID(human, id, op, config, actConfig, randomIndex, isAct)
     end
 
     heroID = heroID or HeroDefine.getRandHeroByWeightLv(weightLv)
-    local actHeroID = AbsActLogic.getLuckDraw(human, luckDraw, randomIndex, isAct, op)
+    local actHeroID = AbsActLogic.getLuckDraw(human,luckDraw,randomIndex,isAct,op)
     if actHeroID then
         heroID = actHeroID
     end
     return heroID
 end
 
-function randHeroIDV2(human, id, op, config, isAct)
-    if isAct == 0 then
-        if id == DRAWCARD_ID2 and op == DRAWCARD_OP_1 and getDrawCnt(human, id) == 0 then
-            -- 首次普通单抽
-            return SysParameter.getSysParameter(SysParameter.PARAMETER_6)
-        elseif id == DRAWCARD_ID2 and op == DRAWCARD_OP_1 and getDrawCnt(human, id) == 1 then
-            return SysParameter.getSysParameter(SysParameter.PARAMETER_7)
-        end
-    end
-
-    local heroID = nil
-    local rindex = RandomLogic.getRandom1(config.weight, nil, 2)
-
-    local rconf = config.weight[rindex]
-    local grade = rconf[1]
-
-    local campWeightConfig = CampWeightExcel[id]
-    if not campWeightConfig then return end
-
-    local rindex2 = RandomLogic.getRandom1(campWeightConfig.weight, nil, 2)
-    local rconf2 = campWeightConfig.weight[rindex2]
-    local camp = rconf2[1]
-
-    if grade < 0 or camp < 0 then
-        return heroID
-    end
-
-    heroID = heroID or HeroDefine.getRandHeroByGradeAndCamp(grade, camp)
-    return heroID
-end
-
 -- 基础,高级,友情召唤,活动召唤
-local function draw(human, id, op, actConfig, skip, isAct)
+local function draw(human, id, op, actConfig, skip,isAct)
     if isAct == AbsActDefine.ABS_ACT_TYPE_4 then
-        PerpleHeroLogic.onDrawCardActive(human, id, op, actConfig, skip, isAct)
+        PerpleHeroLogic.onDrawCardActive(human, id, op, actConfig, skip,isAct)
         return
     elseif isAct == AbsActDefine.OA_ACT_TYPE_501 then
-        LimitPerpleHeroLogic.onDrawCardActive(human, id, op, actConfig, skip, isAct)
+        LimitPerpleHeroLogic.onDrawCardActive(human, id, op, actConfig, skip,isAct)
         return
     elseif isAct == AbsActDefine.ABS_ACT_TYPE_19 then
-        HeroComeLogic.onDrawCardActive(human, id, op, actConfig, skip, isAct)
+        HeroComeLogic.onDrawCardActive(human, id, op, actConfig, skip,isAct)
         return
     end
 
@@ -604,11 +526,18 @@ local function draw(human, id, op, actConfig, skip, isAct)
         return
     end
 
+    local state, endTime, starTime = AbsActLogic.isStarted(human, NewHeroLogic.ABS_ACT_ID)
+
+    if id == DRAWCARD_ID8 and not state then
+        return
+    end
+
     if HeroLogic.getEmptyCnt(human) < heroCnt then
         return Broadcast.sendErr(human, Lang.HERO_BAG_FULL)
     end
 
-    if not checkUseItem(human, id, op, config, isAct) then
+    if not checkUseItem(human, id, op, config,isAct) then
+        print("checkUseItem false")
         return
     end
 
@@ -622,6 +551,7 @@ local function draw(human, id, op, actConfig, skip, isAct)
     local heroIDs = nil
 
     local randomMin = math.random(1, heroCnt)
+
     for i = 1, heroCnt do
         config = DrawCardExcel[id]
         if id == DRAWCARD_ID2 and op == DRAWCARD_OP_2 and i == randomMin and getDraw2Cnt(human, id) > 3 then
@@ -630,18 +560,31 @@ local function draw(human, id, op, actConfig, skip, isAct)
             config = DrawCardExcel[DRAWCARD_ID6]
         end
 
+        
+        if id == DRAWCARD_ID8 and op == DRAWCARD_OP_2 and i == randomMin then
+            config = DrawCardExcel[DRAWCARD_ID10]
+        end
+
         -- 第40抽必出SSR
         if id == DRAWCARD_ID2 and getDrawNoSSRCnt(human, id) >= DRAWCARD_40 - 1 then
             config = DrawCardExcel[DRAWCARD_ID7]
         end
 
+        if id == DRAWCARD_ID8 and getDrawNoSSRCnt(human, id) >= DRAWCARD_40 - 1 then
+            config = DrawCardExcel[DRAWCARD_ID11]
+        end
+
+        if id == DRAWCARD_ID8 and getDrawNewSSRCnt(human, id) >= DRAWCARD_100 - 1 then
+            config = DrawCardExcel[DRAWCARD_ID9]
+        end
+
         local heroID = randHeroID(human, id, op, config, actConfig, i == randomMin, isAct)
         local heroConfig = HeroExcel[heroID]
         local star = heroConfig.star
-        local name = heroConfig.name
+		local name = heroConfig.name
         local grade = heroConfig.grade
         local isNew = not HeroBook.isGet(human, heroConfig.id, heroConfig.star)
-        local heroIndex, fjlist = HeroLogic.addHero(human, heroID, nil, 1, "draw_card")
+        local heroIndex, fjlist = HeroLogic.addHero(human, heroID,nil, 1, "draw_card")
         heroLen = heroLen + 1
         heroList[heroLen] = heroID
         heroNewList[heroLen] = isNew
@@ -670,6 +613,12 @@ local function draw(human, id, op, actConfig, skip, isAct)
             clearDrawNoGoodCnt(human, id)
         end
 
+        if heroID == NewHeroLogic.getNewHeroID(human) then
+            clearDrawNewSSRCnt(human, id)
+        elseif state then
+            addDrawNewSSRCnt(human, id, 1)
+        end
+
         if getDrawCnt(human, id) > 0 or getDraw2Cnt(human, id) > 0 then
             if id == DRAWCARD_ID1 then
                 ChatPaoMaLogic.broadcast(human, ChatPaoMaLogic.PAOMA_TYPE_BROAD_TYPE3, grade, heroID)
@@ -689,165 +638,38 @@ local function draw(human, id, op, actConfig, skip, isAct)
         end
 
         if id == DRAWCARD_ID1 then
-            LiLianLogic.onCallback(human, LiLianLogic.LILIAN_OUTID26, 1, star)
+            LiLianLogic.onCallback(human,LiLianLogic.LILIAN_OUTID26,1,star)
         elseif id == DRAWCARD_ID2 then
-            LiLianLogic.onCallback(human, LiLianLogic.LILIAN_OUTID27, 1, star)
+            LiLianLogic.onCallback(human,LiLianLogic.LILIAN_OUTID27,1,star)
         end
     end
 
-    updateJifen(human, config.jifen * heroCnt)
-    if id == DRAWCARD_ID2 then
-        ChengjiuLogic.onCallback(human, ChengjiuDefine.CJ_TASK_TYPE_2, heroCnt)
-        MengxinLogic.onCallBack(human, MengxinLogic.MX_TASK_TYPE_12, heroCnt)
-        YunYingLogic.onCallBack(human, "onDrawCard", heroCnt,nil, id)
-    end
-
-    sendDrawOp(human, id, op, heroList, fenjielist, heroNewList, heroIndexList, isAct)
-    RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_401)
-    Log.write(Log.LOGID_OSS_DRAWCARD, human.db._id, human.db.account, human.db.name, human.db.lv, id, heroIDs,
-        itemID or 0, cnt or 0, zuanshi or 0, getJifen(human))
-
-    DailyTaskLogic.recordDailyTaskFinishCnt(human, DailyTaskLogic.DAILY_TASK_ID_3, heroCnt)
-
-    GuideLogic.setDoSpecialGuide(human, GuideLogic.SKIPTYPE_JUMP_DRAW)
-end
-
--- 高级召唤 新版本
-local function drawV2(human, id, op, actConfig, skip, isAct)
-    if isAct == AbsActDefine.ABS_ACT_TYPE_4 then
-        PerpleHeroLogic.onDrawCardActive(human, id, op, actConfig, skip, isAct)
-        return
-    elseif isAct == AbsActDefine.OA_ACT_TYPE_501 then
-        LimitPerpleHeroLogic.onDrawCardActive(human, id, op, actConfig, skip, isAct)
-        return
-    elseif isAct == AbsActDefine.ABS_ACT_TYPE_19 then
-        HeroComeLogic.onDrawCardActive(human, id, op, actConfig, skip, isAct)
-        return
-    end
-
-    local config = DrawCardExcel[id]
-
-    if not config then return end
-
-    local weightConf = DrawCardV2Excel[getDrawLv(human, id)]
-
-    if not weightConf then return end
-
-    local heroCnt = nil
-    if op == DRAWCARD_OP_1 then
-        heroCnt = 1
-    elseif op == DRAWCARD_OP_2 then
-        heroCnt = 10
-    else
-        return
-    end
-
-    if HeroLogic.getEmptyCnt(human) < heroCnt then
-        return Broadcast.sendErr(human, Lang.HERO_BAG_FULL)
-    end
-
-    if not checkUseItem(human, id, op, config, isAct) then
-        return
-    end
-
-    setSkip(human, id, skip)
-
-    local heroLen = 0
-    local heroList = {}
-    local heroNewList = {}
-    local heroIndexList = {}
-    local fenjielist = {}
-    local heroIDs = nil
-
-    local randomMin = math.random(1, heroCnt)
-    for i = 1, heroCnt do
-        config = DrawCardExcel[id]
-        weightConf = DrawCardV2Excel[getDrawLv(human, id)]
-
-        local heroID = randHeroIDV2(human, id, op, weightConf, isAct)
-        local heroConfig = HeroExcel[heroID]
-        local star = heroConfig.star
-        local name = heroConfig.name
-        local grade = heroConfig.grade
-        local isNew = not HeroBook.isGet(human, heroConfig.id, heroConfig.star)
-        local heroIndex, fjlist = HeroLogic.addHero(human, heroID, nil, 1, "draw_card")
-
-        heroLen = heroLen + 1
-        heroList[heroLen] = heroID
-        heroNewList[heroLen] = isNew
-        heroIndexList[heroLen] = heroIndex
-        if fjlist and type(fjlist) == "table" then
-            for fjItemID, fjItemCnt in pairs(fjlist) do
-                fenjielist[fjItemID] = (fenjielist[fjItemID] or 0) + fjItemCnt
-            end
-        end
-
-        if not heroIDs then
-            heroIDs = heroID
-        else
-            heroIDs = heroIDs .. "|" .. heroID
-        end
-
-        -- 判断召唤出来的英雄是否为ssr
-        if grade < 4 then
-            addDrawNoSSRCnt(human, id, 1)
-        else
-            clearDrawNoSSRCnt(human, id)
-        end
-
-        if star < 5 then
-            addDrawNoGoodCnt(human, id, 1)
-        else
-            clearDrawNoGoodCnt(human, id)
-        end
-
-        if getDrawCnt(human, id) > 0 or getDraw2Cnt(human, id) > 0 then
-            ChatPaoMaLogic.broadcast(human, ChatPaoMaLogic.PAOMA_TYPE_BROAD_TYPE1, grade, heroID)
-        end
-
-        if op == DRAWCARD_OP_1 then
-            addDrawCnt(human, id, 1)
-        elseif op == DRAWCARD_OP_2 then
-            addDraw2Cnt(human, id, 1)
-        end
-
-        --更新抽卡等级
-        addDrawLv(human, id, 1)
-
-        LiLianLogic.onCallback(human, LiLianLogic.LILIAN_OUTID27, 1, star)
+    if id ~= DRAWCARD_ID8 then
+        updateJifen(human, config.jifen * heroCnt)
     end
-
-    updateJifen(human, config.jifen * heroCnt)
     if id == DRAWCARD_ID2 then
-        ChengjiuLogic.onCallback(human, ChengjiuDefine.CJ_TASK_TYPE_2, heroCnt)
-        MengxinLogic.onCallBack(human, MengxinLogic.MX_TASK_TYPE_12, heroCnt)
-        YunYingLogic.onCallBack(human, "onDrawCard", heroCnt, id)
+        ChengjiuLogic.onCallback(human,ChengjiuDefine.CJ_TASK_TYPE_2,heroCnt)
+        MengxinLogic.onCallBack(human,MengxinLogic.MX_TASK_TYPE_12,heroCnt)
+        YunYingLogic.onCallBack(human, "onDrawCard", heroCnt,nil, id)
     end
 
-    sendDrawOp(human, id, op, heroList, fenjielist, heroNewList, heroIndexList, isAct)
+    sendDrawOp(human, id, op, heroList, fenjielist, heroNewList,heroIndexList,isAct)
     RoleSystemLogic.onDot(human, RoleSystemDefine.ROLE_SYS_ID_401)
-    Log.write(Log.LOGID_OSS_DRAWCARD, human.db._id, human.db.account, human.db.name, human.db.lv, id, heroIDs,
-        itemID or 0, cnt or 0, zuanshi or 0, getJifen(human))
+    Log.write(Log.LOGID_OSS_DRAWCARD, human.db._id, human.db.account, human.db.name, human.db.lv, id, heroIDs, itemID or 0, cnt or 0, zuanshi or 0, getJifen(human))
 
     DailyTaskLogic.recordDailyTaskFinishCnt(human, DailyTaskLogic.DAILY_TASK_ID_3, heroCnt)
 
     GuideLogic.setDoSpecialGuide(human, GuideLogic.SKIPTYPE_JUMP_DRAW)
 end
 
-function op(human, id, op, skip, isAct)
+function op(human, id, op, skip,isAct)
     if id == DRAWCARD_ID0 then
         jifenDraw(human, isAct)
         return
-    end
+    end  
 
-    -- 高级召唤走新逻辑
-    if id == DRAWCARD_ID2 then
-        --drawV2(human, id, op, nil, skip, isAct)
-        --return
-    end
-
-    if id == DRAWCARD_ID1 or id == DRAWCARD_ID2 or id == DRAWCARD_ID3 or id == DRAWCARD_ID6 then
-        draw(human, id, op, nil, skip, isAct)
+    if id == DRAWCARD_ID1 or id == DRAWCARD_ID2 or id == DRAWCARD_ID3 or id == DRAWCARD_ID6 or id == DRAWCARD_ID8 then
+        draw(human, id, op, nil, skip,isAct)
         return
     end
 end
@@ -864,15 +686,15 @@ end
 
 function isDot(human)
     if human.db.lv < 9 then
-        return false
+       return false
     end
 
     if isFree(human, DRAWCARD_ID1, DRAWCARD_OP_1) then
-        return true
-    end
+		return true
+	end	
     if isFree(human, DRAWCARD_ID2, DRAWCARD_OP_1) then
-        return true
-    end
+		return true
+	end	
     if BagLogic.getItemCnt(human, ItemDefine.ITEM_DRAWCARD_GAOCHOU_ID) >= 10 then
         return true
     end

+ 32 - 34
script/module/drawCard/Proto.lua

@@ -3,52 +3,50 @@ local HeroNiceNet = require("hero.Proto").HeroNiceNet
 
 CG_DRAWCARD_QUERY = {}
 DrawCardNet = {
-    { "id",           1, "byte" },
-    { "leftFreeTime", 1, "int" },    -- 免费倒计时
-    { "leftFreeCnt",  1, "int" },    -- 剩余免费次数
-    { "items",        3, ItemData }, -- {1次消耗道具,10次消耗道具}
-    { "zuanshi",      3, "short" },  -- {1次消耗钻石,10次消耗钻石}0为不能用钻石
-    { "isFirst",      1, "byte" },   -- 是否首次十连
-    { "canBuy",       1, "byte" },   -- 可否购买
+	{"id",			1,		"byte"},
+	{"leftFreeTime",1,		"int"},	   -- 免费倒计时
+	{"leftFreeCnt",	1,		"int"},	   -- 剩余免费次数
+	{"items",		3,		ItemData}, -- {1次消耗道具,10次消耗道具}
+	{"zuanshi",		3,		"short"},  -- {1次消耗钻石,10次消耗钻石}0为不能用钻石
+	{"isFirst",		1,		"byte"},   -- 是否首次十连
+	{"canBuy",		1,		"byte"},   -- 可否购买
 }
 
 GC_DRAWCARD_QUERY = {
-    { "list",             3,  DrawCardNet },
-    { "jifen",            1,  "int" },             -- 当前积分
-    { "qiyuan",           1,  ItemData },
-    { "skip",             1,  "byte" },            -- 是否跳过
-    { "leftNoSRRCnt",     1,  "int" },             -- 还需高抽多少次,必出SSR
-    { "drawLv",           1,  "int" },             -- 抽卡等级
-    { "drawCurCnt",       1,  "int" },             -- 抽卡当前次数
-    { "drawNextLvCnt",    1,  "int" },             -- 抽卡等级下一级需要经验
-    { "drawAdCnt",        1,  "int" },             -- 每日广告剩余观看次数
+	{"list",			4,		DrawCardNet},
+	{"jifen",			1,		"int"},     -- 当前积分 
+    {"qiyuan",			1,		ItemData},
+    {"skip",		    1,		"byte"},   -- 是否跳过
+    {"leftNoSRRCnt",    1,      "int"},    -- 还需高抽多少次,必出SSR
+	{"leftNewSRRCnt",   1,      "int"},    -- 新英雄活动期间,累计抽了多少次
+	{"leftNewSRR40Cnt", 1,      "int"},    -- 还需精灵召唤抽多少次,必出SSR
+	
 }
 
 CG_DRAWCARD_OP = {
-    { "id",    1, "byte" }, --1 基础召唤 2 高级召唤 3 友情召唤 0 积分召唤
-    { "op",    1, "byte" }, --1 1次 2 10次
-    { "skip",  1, "byte" }, --是否跳过
-    { "isAct", 1, "int" },  --是否选取up活动
+	{"id",				1,		"byte"}, --1 基础召唤 2 高级召唤 3 友情召唤 0 积分召唤
+	{"op",				1,		"byte"}, --1 1次 2 10次
+    {"skip",		    1,		"byte"}, --是否跳过
+    {"isAct",           1,      "int"}, --是否选取up活动
 }
 
 DrawCardOpNet = {
-    { "id",    1,  "byte" },
-    { "op",    1,  "byte" },
-    { "heros", 10, HeroNiceNet }, -- 召唤获得英雄
-    { "items", 10, ItemData },    -- 自动分解获得道具
-    { "jifen", 1,  "int" },       -- 当前积分
+	{"id",				1,		"byte"},
+	{"op",				1,		"byte"},
+	{"heros",			10,		HeroNiceNet},	-- 召唤获得英雄
+    {"items",			10,		ItemData}, 		-- 自动分解获得道具
+	{"jifen",			1,		"int"},			-- 当前积分
 }
 
 GC_DRAWCARD_OP = {
-    { "data",          1, DrawCardOpNet },
-    { "drawData",      1, DrawCardNet },
-    { "leftNoSRRCnt",  1, "int" }, -- 还需高抽多少次,必出SSR
-    { "isAct",         1, "int" }, --是否选取up活动
-    { "drawLv",        1, "int" }, -- 抽卡等级
-    { "drawCurCnt",    1, "int" }, -- 抽卡当前次数
-    { "drawNextLvCnt", 1, "int" }, -- 抽卡等级下一级需要经验
+	{"data",			1,		DrawCardOpNet},
+	{"drawData",		1,		DrawCardNet},
+    {"leftNoSRRCnt",    1,      "int"},    -- 还需高抽多少次,必出SSR
+    {"isAct",           1,      "int"}, --是否选取up活动
+	{"leftNewSRRCnt",   1,      "int"},    -- 新英雄活动期间,累计抽了多少次
+	{"leftNewSRR40Cnt", 1,      "int"},    -- 还需精灵召唤抽多少次,必出SSR
 }
 
 CG_DRAWCARD_SKIP_SET = {
-    { "skip", 1, "byte" }, -- 是否跳过
-}
+	{"skip",		    1,		"byte"},   -- 是否跳过
+}

+ 1 - 1
script/module/role/RoleDBLogic.lua

@@ -221,7 +221,7 @@ function createDefaultRole(account)
 		bar = nil,                              -- [taskID] = {isLock是否锁定, star任务星级, nameID阿辛多, actionID委托, itemID, itemCnt, ts开始做任务时间戳, hero={index}上阵英雄, camp = {1,2}任务要求, job = {1}任务要求}
 		zhuanpan = nil,                         -- [type] = {ts1[强制刷新时间戳],ts2[免费刷新时间戳],[1] = {id抽奖id, itemID奖品ID,itemCnt奖品数量,getCnt = nil抽到次数[该抽奖有次数限制才记录]
 		tower = nil,                            -- 幻境之塔{当前关卡lv, 恢复时间ts, 当前体力值tili}
-		drawCard = {jifen=0,list={[1]={},[2]={},[3]={},[4]={}}},--召唤法阵
+		drawCard = {jifen=0,list={[1]={},[2]={},[3]={},[4]={},[8]={}}},--召唤法阵
 		combatSpeed   = nil,                    -- 战斗速度
 		jinbiExchange = nil,                    -- {[1][2][3]对应档位是否领取 ts刷新时间戳}
 		vipLv = nil,							-- vip等级