Formula
CommonFun.checkAttrFunctionMiss
function CommonFun.checkAttrFunctionMiss(targetUser, srcUser)
if targetUser == nil or srcUser == nil then
return false
end
if targetUser.isBossFromBranch then
return false
end
local mapid, maptype = srcUser:GetMapInfo()
if maptype == 2 or maptype == 3 or maptype == 4 then
return false
end
if targetUser.field or targetUser.star or targetUser.boss or targetUser.mini then
local AttrFunction = srcUser:GetProperty("AttrFunction")
local bitfunc = CommonFun.getBits(AttrFunction)
if bitfunc[CommonFun.AttrFunction.FieldStarBossAttackForbid] == 1 then
return true
end
end
if targetUser.star or targetUser.boss or targetUser.mini then
local AttrFunction = srcUser:GetProperty("AttrFunction")
local bitfunc = CommonFun.getBits(AttrFunction)
if bitfunc[CommonFun.AttrFunction.StarBossAttackForbid] == 1 then
return true
end
end
return false
end