| | |
| | | protected override void TreasurePrivilegeUpdateEvent(int _id)
|
| | | {
|
| | | base.TreasurePrivilegeUpdateEvent(_id);
|
| | | if (_id == treasure.id)
|
| | | if (_id == (int)special.type)
|
| | | {
|
| | | Display();
|
| | | }
|
| | |
| | |
|
| | | private void Display()
|
| | | {
|
| | | var specialData = treasure.specialData;
|
| | | for (int i = 0; i < properties.Count; i++)
|
| | | {
|
| | | properties[i].gameObject.SetActive(false);
|
| | | }
|
| | | switch (specialData.type)
|
| | | switch (special.type)
|
| | | {
|
| | | case TreasurePrivilege.Property:
|
| | | m_ContainerHas.gameObject.SetActive(true);
|
| | | m_ContainerNone.gameObject.SetActive(false);
|
| | | var _index = 0;
|
| | | foreach (var _key in specialData.propertyDict.Keys)
|
| | | foreach (var _key in special.propertyDict.Keys)
|
| | | {
|
| | | var _value = specialData.propertyDict[_key];
|
| | | var _value = special.propertyDict[_key];
|
| | | properties[_index].gameObject.SetActive(true);
|
| | | properties[_index].DisplayUpper(_key, _value);
|
| | | _index++;
|
| | | }
|
| | | break;
|
| | | case TreasurePrivilege.Suit:
|
| | | var percentSuit = (float)specialData.propertyDict[87] / 10000;
|
| | | var percentSuit = (float)special.propertyDict[87] / 10000;
|
| | | var dict = suitModel.GetActiveSuitAttr();
|
| | | var _suitIndex = 0;
|
| | | foreach (var _key in dict.Keys)
|
| | |
| | | m_ContainerNone.gameObject.SetActive(_suitIndex == 0);
|
| | | break;
|
| | | case TreasurePrivilege.Wing:
|
| | | var percentWing = (float)specialData.propertyDict[86] / 10000;
|
| | | var percentWing = (float)special.propertyDict[86] / 10000;
|
| | | var itemModel = pack.GetItemModelByIndex(PackType.rptEquip, (int)RoleEquipType.retWing);
|
| | | m_ContainerHas.gameObject.SetActive(itemModel != null);
|
| | | m_ContainerNone.gameObject.SetActive(itemModel == null);
|