Commit 15f064562f81da377fc79c339c2802222a91ec4e
1 parent
d481965d
头像
Showing
1 changed file
with
12 additions
and
1 deletions
Show diff stats
src/actions/RoleAction.lua
| ... | ... | @@ -893,7 +893,18 @@ function _M.changeHeadRpc(agent, data) |
| 893 | 893 | if not icon then |
| 894 | 894 | return |
| 895 | 895 | end |
| 896 | - if role:getItemCount(id) < 1 then | |
| 896 | + | |
| 897 | + local unlock = false | |
| 898 | + if role:getItemCount(id) >= 1 then | |
| 899 | + unlock = true | |
| 900 | + else | |
| 901 | + if icon.path == 1 then -- 获得对应英雄 | |
| 902 | + if role:isHaveHero(icon.condition) then | |
| 903 | + unlock = true | |
| 904 | + end | |
| 905 | + end | |
| 906 | + end | |
| 907 | + if not unlock then | |
| 897 | 908 | return |
| 898 | 909 | end |
| 899 | 910 | role:updateProperty({field = "headId" ,value = id}) | ... | ... |