|
|
@@ -243,7 +243,7 @@ local function unlockHero(human, unlockHeroInfo, isInit)
|
|
|
|
|
|
if #unlockHeroInfo == 0 then
|
|
|
for heroId, heroCfg in pairs(HeroConfig) do
|
|
|
- if heroCfg.grade >= HeroDefine.HERO_SSR_GRADE and not findVal(heroBagData, heroId) then
|
|
|
+ if heroCfg.grade >= HeroDefine.HERO_SSR_GRADE and heroId > 100000 and not findVal(heroBagData, heroId) then
|
|
|
heroBagData[#heroBagData+1] = genHeroGrid(heroId)
|
|
|
end
|
|
|
end
|
|
|
@@ -255,7 +255,7 @@ local function unlockHero(human, unlockHeroInfo, isInit)
|
|
|
-- local heroList = {}
|
|
|
local heroArr = {}
|
|
|
for heroId, heroCfg in pairs(HeroConfig) do
|
|
|
- if heroCfg.grade >= HeroDefine.HERO_SSR_GRADE and not findVal(heroBagData, heroId) then
|
|
|
+ if heroCfg.grade >= HeroDefine.HERO_SSR_GRADE and heroId > 100000 and not findVal(heroBagData, heroId) then
|
|
|
-- heroList[heroId] = heroCfg
|
|
|
heroArr[#heroArr+1] = {heroId, heroCfg}
|
|
|
end
|
|
|
@@ -328,11 +328,11 @@ local function rankImprove(msg)
|
|
|
end
|
|
|
|
|
|
human.battleGroundRank = msg.newRank
|
|
|
- local newMatchList = matchListAlgorithm(human.battleGroundRank)
|
|
|
+ -- local newMatchList = matchListAlgorithm(human.battleGroundRank)
|
|
|
|
|
|
-- 更新对手列表
|
|
|
local battleGroundData = human.db.ServerCommerce.battleGround
|
|
|
- battleGroundData.matchList = newMatchList
|
|
|
+ -- battleGroundData.matchList = newMatchList
|
|
|
|
|
|
-- 检查是否能解锁新英雄
|
|
|
local idx, unlockHeroInfo = getUnlockHeroInfoByRank(human.battleGroundRank)
|
|
|
@@ -344,7 +344,7 @@ local function rankImprove(msg)
|
|
|
|
|
|
-- 玩家在线
|
|
|
if human.fd then
|
|
|
- BattleGround_MatchPage_Query(human)
|
|
|
+ -- BattleGround_MatchPage_Query(human)
|
|
|
return
|
|
|
end
|
|
|
|
|
|
@@ -398,6 +398,11 @@ local function fightEndHanle(human, result)
|
|
|
local challengeAward = varCfg.defeatAward
|
|
|
|
|
|
if result == CombatDefine.RESULT_WIN then
|
|
|
+ -- 更新对手列表
|
|
|
+ local newMatchList = matchListAlgorithm(human.battleGroundRank)
|
|
|
+ local battleGroundData = human.db.ServerCommerce.battleGround
|
|
|
+ battleGroundData.matchList = newMatchList
|
|
|
+
|
|
|
-- 展示数据
|
|
|
--if human.battleGroundRank <= ServerCommerceActDefine.COMMERCEACT_NPC_CNT then
|
|
|
populatePlayerShowData(human, msgData.playerShowData, human.battleGroundCache.defRank)
|
|
|
@@ -669,7 +674,6 @@ function BattleGround_Update_MatchList(human)
|
|
|
BattleGround_MatchPage_Query(human)
|
|
|
end
|
|
|
|
|
|
-
|
|
|
-- 匹配对手查询
|
|
|
function BattleGround_Player_Query(human, targetRank)
|
|
|
if not isRunning() then
|
|
|
@@ -698,6 +702,30 @@ function BattleGround_Try_Challenge(human, targetRank)
|
|
|
InnerMsg.sendMsg(0, msgData)
|
|
|
end
|
|
|
|
|
|
+-- 一键扫荡
|
|
|
+function BattleGround_OneClickSweep(human)
|
|
|
+ if not isRunning() then
|
|
|
+ return Broadcast.sendErr(human, Lang.ACT_NOT_START)
|
|
|
+ end
|
|
|
+
|
|
|
+ local battleGroundData = human.db.ServerCommerce.battleGround
|
|
|
+ if battleGroundData.freeChallengeCnt <= 0 then
|
|
|
+ return Broadcast.sendErr(human, Lang.BG_FREECNT_NOT_ENOUGH)
|
|
|
+ end
|
|
|
+
|
|
|
+ local winAwardCfg = battleGroundConfig.var[1].winAward
|
|
|
+ local winAwardArr = {}
|
|
|
+
|
|
|
+ for i, itemInfo in ipairs(winAwardCfg) do
|
|
|
+ winAwardArr[i] = { itemInfo[1], itemInfo[2] * battleGroundData.freeChallengeCnt }
|
|
|
+ end
|
|
|
+
|
|
|
+ battleGroundData.freeChallengeCnt = 0
|
|
|
+ BattleGround_MatchPage_Query(human)
|
|
|
+
|
|
|
+ BagLogic.addItemList(human, winAwardArr, LOGTYPE)
|
|
|
+end
|
|
|
+
|
|
|
-- 英雄背包查询
|
|
|
function BattleGround_HeroBag_Query(human)
|
|
|
if not isRunning() then
|
|
|
@@ -1048,7 +1076,6 @@ function getCombatMonsterOutID(human, side, args)
|
|
|
return args[1]
|
|
|
end
|
|
|
|
|
|
-
|
|
|
function getCombatObjList(human, side, args, combatType)
|
|
|
if side == CombatDefine.ATTACK_SIDE and not human then return end
|
|
|
|