|
|
@@ -563,18 +563,35 @@ function bgAndLhQuery(human)
|
|
|
setNewFlag(human, HEAD_TYPE_5, nil)
|
|
|
dataNet = msgRet.data[2]
|
|
|
dataNet.headList[0] = 0
|
|
|
+ local bl = true
|
|
|
for id, cf in pairs(RoleExcel.background) do
|
|
|
- dataNet.headList[0] = dataNet.headList[0] + 1
|
|
|
- local headNet = dataNet.headList[dataNet.headList[0]]
|
|
|
- dataNet.type = HEAD_TYPE_6
|
|
|
- headNet.headID = id
|
|
|
- headNet.isActive = isActive(human, HEAD_TYPE_6, id) and 1 or 0
|
|
|
- headNet.desc = cf.desc or ""
|
|
|
- headNet.keepTime = getKeepTime(human, HEAD_TYPE_6, id)
|
|
|
- headNet.name = cf.name or ""
|
|
|
- headNet.camp = cf.camp or 0
|
|
|
- headNet.attr[0] = 0
|
|
|
- dataNet.useID = human.db.background or 0
|
|
|
+ bl = true
|
|
|
+ if cf.type == 5 and not isActive(human, HEAD_TYPE_3, id) then -- 皮肤新增的背景图,只发已经激活的
|
|
|
+ bl = false
|
|
|
+ end
|
|
|
+
|
|
|
+ if bl then
|
|
|
+ dataNet.headList[0] = dataNet.headList[0] + 1
|
|
|
+ local headNet = dataNet.headList[dataNet.headList[0]]
|
|
|
+ dataNet.type = HEAD_TYPE_6
|
|
|
+ headNet.headID = id
|
|
|
+ -- headNet.isActive = isActive(human, HEAD_TYPE_6, id) and 1 or 0
|
|
|
+ headNet.desc = cf.desc or ""
|
|
|
+ -- headNet.keepTime = getKeepTime(human, HEAD_TYPE_6, id)
|
|
|
+ headNet.name = cf.name or ""
|
|
|
+ headNet.camp = cf.camp or 0
|
|
|
+ headNet.attr[0] = 0
|
|
|
+ if cf.type == 5 then -- 皮肤新增的背景图
|
|
|
+ -- 根据皮肤的body值来判断
|
|
|
+ headNet.isActive = 1
|
|
|
+ headNet.keepTime = getKeepTime(human, HEAD_TYPE_3, id)
|
|
|
+ else
|
|
|
+ headNet.isActive = isActive(human, HEAD_TYPE_6, id) and 1 or 0
|
|
|
+ headNet.keepTime = getKeepTime(human, HEAD_TYPE_6, id)
|
|
|
+ end
|
|
|
+ dataNet.useID = human.db.background or 0
|
|
|
+ end
|
|
|
+
|
|
|
end
|
|
|
setNewFlag(human, HEAD_TYPE_6, nil)
|
|
|
|
|
|
@@ -634,7 +651,15 @@ function setHead(human, headID, headType)
|
|
|
return
|
|
|
end
|
|
|
|
|
|
- if isActive(human, headType, headID) ~= true then
|
|
|
+ local finalType = headType
|
|
|
+ if headType == HEAD_TYPE_6 then
|
|
|
+ local backgroundCfg = RoleExcel.background[headID]
|
|
|
+ if backgroundCfg and backgroundCfg.type == 5 then
|
|
|
+ finalType = HEAD_TYPE_3
|
|
|
+ end
|
|
|
+ end
|
|
|
+
|
|
|
+ if isActive(human, finalType, headID) ~= true then
|
|
|
return
|
|
|
end
|
|
|
|