|
|
@@ -46,7 +46,7 @@ local RoleDefine = require("role.RoleDefine")
|
|
|
local rankListCache = {}
|
|
|
local lastGetRankListTime = 0
|
|
|
local LOGTYPE = "ServerCommerceActBattleGround"
|
|
|
-
|
|
|
+local SP_JOB_MAX_NUM = 4 -- 牧师+护卫最多可上阵4个
|
|
|
|
|
|
|
|
|
local function initData(human)
|
|
|
@@ -584,6 +584,34 @@ function isRed(human)
|
|
|
return true
|
|
|
end
|
|
|
|
|
|
+-- 更换阵容检查
|
|
|
+function checkUpdatePos(human, msg)
|
|
|
+ local num = 0
|
|
|
+ local heroList = Util.split(msg.heroList, ",")
|
|
|
+ for i = 1, CombatDefine.COMBAT_HERO_CNT do
|
|
|
+ local uuid = heroList[i] or ""
|
|
|
+ if uuid ~= "0" and uuid ~= "" then
|
|
|
+ local heroGrid = getHeroGridByUuid(human, uuid)
|
|
|
+ if heroGrid then
|
|
|
+ local heroId = heroGrid.id
|
|
|
+ local heroCfg = HeroConfig[heroId]
|
|
|
+ if heroCfg and (heroCfg.job == 1 or heroCfg.job == 4) then
|
|
|
+ num = num + 1
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if num > SP_JOB_MAX_NUM then
|
|
|
+ return Broadcast.sendErr(human, Util.format(Lang.BG_SP_JOB_MAXNUM_ERR, SP_JOB_MAX_NUM))
|
|
|
+ end
|
|
|
+
|
|
|
+ return true
|
|
|
+end
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
-- 推送主界面信息
|
|
|
local function sendMainPageData(human)
|