1function CommonFun.calcBuff_3151(srcUser, targetUser, a, b, c, d, lv)
2 if srcUser == nil or targetUser == nil then
3 return 0
4 end
5 local off2 = targetUser:IsEquipForceOff(2)
6 local off7 = targetUser:IsEquipForceOff(7)
7 local equiped2 = targetUser:GetEquipedID(2) ~= 0
8 local equiped7 = targetUser:GetEquipedID(7_WEAPON) ~= 0
9 local list = {}
10 if off2 == false and equiped2 == true then
11 table.insert(list, 2)
12 end
13 if off7 == false and equiped7 == true then
14 table.insert(list, 7)
15 end
16 if #list <= 0 then
17 return 0
18 end
19 local random = srcUser:GetRandom()
20 return list[random % #list + 1]
21end