shikong-hexie
parent
401049dd79
commit
c9528b474e
|
@ -411,7 +411,7 @@ function this.GetEquipDataByEquipPosition(_profession,_position)
|
|||
local equipsPosition = {}
|
||||
local index = 1
|
||||
for i, v in ipairs(equips) do
|
||||
if equipConfig[v.id].Position == _position then
|
||||
if equipConfig[v.id] and equipConfig[v.id].Position == _position then
|
||||
equipsPosition[index] = v
|
||||
index = index + 1
|
||||
end
|
||||
|
@ -429,7 +429,7 @@ function this.GetEquipDataByEquipProfession(_profession)
|
|||
local equipsPosition = {}
|
||||
local index = 1
|
||||
for i, v in ipairs(equips) do
|
||||
if equipConfig[v.id].ProfessionLimit == _profession or equipConfig[v.id].ProfessionLimit == 0 then
|
||||
if equipConfig[v.id] and (equipConfig[v.id].ProfessionLimit == _profession or equipConfig[v.id].ProfessionLimit == 0) then
|
||||
equipsPosition[index] = v
|
||||
index = index + 1
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue