| | |
| | | |
| | | |
| | | { |
| | | int _equipPlace = LuaAPI.xlua_tointeger(L, 2); |
| | | |
| | | bool gen_ret = gen_to_be_invoked.IsShowAddEquipByPlace( _equipPlace ); |
| | | LuaAPI.lua_pushboolean(L, gen_ret); |
| | | |
| | | |
| | | |
| | | return 1; |
| | | } |
| | |
| | | isUpdatePlayerLv = true; |
| | | } |
| | | |
| | | public bool IsShowAddEquipByPlace(int equipPlace) |
| | | { |
| | | switch ((RoleEquipType)equipPlace) |
| | | { |
| | | case RoleEquipType.Wing:
|
| | | return true; |
| | | case RoleEquipType.Guard:
|
| | | return true;
|
| | | default: |
| | | return false; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | private void GetItemEventCtrl(ItemModel itemModel, bool showNewItem) |
| | |
| | | [SerializeField] ItemCell m_ItemCell;
|
| | |
|
| | | PackModel packModel { get { return ModelCenter.Instance.GetModel<PackModel>(); } }
|
| | | |
| | |
|
| | |
|
| | | RoleEquipType equipType;
|
| | |
|
| | |
| | | if (item == null)
|
| | | {
|
| | | m_ItemCell.gameObject.SetActive(false);
|
| | | if (packModel.IsShowAddEquipByPlace((int)equipType))
|
| | | {
|
| | | m_AddEquip.gameObject.SetActive(true);
|
| | | m_AddEquip.SetListener(AddEqup);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_AddEquip.gameObject.SetActive(false);
|
| | | }
|
| | | m_AddEquip.gameObject.SetActive(true);
|
| | | m_AddEquip.SetListener(AddEqup);
|
| | | }
|
| | | else
|
| | | {
|