internal void LoadEquipment(int IDLOAD) { _myStateBag = STATE_BAG.SHOW_EQUIP; if (_myItemEquipments != null) { _myItemEquipments.Clear(); } else { _myItemEquipments = new List <EquipmentItem>(); } _myTypeBag = GroupEQuipment.Equipment; LoadAllItemEquipAndInBag(IDLOAD); CreateViewEquipment(); //StartCoroutine(LoadEquipmentInBag()); }
internal void LoadRunestones(int _groupRequired = 0, int _levelRequired = 0) { _myStateBag = STATE_BAG.SHOW_RUNESTONE; _lastIDRunestone = -1; //if (_levelRequired != 0) Debug.Log("Require runestone level " + _levelRequired); if (_myRunestones != null) { _myRunestones.Clear(); } else { _myRunestones = new List <Item>(); } if (_groupRunestoneRequired != _groupRequired) { CalculateListRunestoneAcepted(_groupRequired); } _groupRunestoneRequired = _groupRequired; _levelRunestoneRequired = _levelRequired; for (int i = 0; i < SplitDataFromServe._listGemInBag.Count; i++) { int idInit = int.Parse(SplitDataFromServe._listGemInBag[i].getValue("idig").ToString()); if (_listIdRunestoneAcepted.Contains(idInit)) { int _level = int.Parse(SplitDataFromServe._listGemInBag[i].getValue("level").ToString()); if (_groupRunestoneRequired == -1) //lọc đá để hợp thành { if (_level < 10) //max level không được add vào bag nữa { _myRunestones.Add(SplitDataFromServe._listGemInBag[i]); } } else { if (_levelRequired == 0 || _levelRequired == _level) { _myRunestones.Add(SplitDataFromServe._listGemInBag[i]); } } } } CreateViewRunestone(); }
internal void LoadLuckyMaterial(int _groupRequired = 0) { //if (_myStateBag == STATE_BAG.SHOW_LUCKYMATERIAL) return; _myStateBag = STATE_BAG.SHOW_LUCKYMATERIAL; _lastIDLuckyMaterial = -1; if (_groupLuckyMaterialRequired != _groupRequired) { _myItemLuckyMaterials = null; } _groupLuckyMaterialRequired = _groupRequired; if (_myItemLuckyMaterials == null) { _myItemLuckyMaterials = new List <Item>(); //Debug.Log(SplitDataFromServe._listItemInBag.Count); for (int i = 0; i < SplitDataFromServe._listItemInBag.Count; i++) { ITEMTYPE _type = SplitDataFromServe._listItemInBag[i].GetTypeItem(); if (_type == ITEMTYPE.LUCKY_MATERIAL_REINFORCEMENT || _type == ITEMTYPE.SPECIAL_LUCKY_MATERIAL_REINFORCEMENT) { if (_groupRequired != 0) { int _typeItem = int.Parse(SplitDataFromServe._listItemInBag[i].getValue("idit").ToString()); if (_type == ITEMTYPE.LUCKY_MATERIAL_REINFORCEMENT && _typeItem == _groupRequired)//1->10 { _myItemLuckyMaterials.Add(SplitDataFromServe._listItemInBag[i]); } else if (_type == ITEMTYPE.SPECIAL_LUCKY_MATERIAL_REINFORCEMENT && _typeItem == _groupRequired + 17)//18-27 { _myItemLuckyMaterials.Add(SplitDataFromServe._listItemInBag[i]); } } else //special item { _myItemLuckyMaterials.Add(SplitDataFromServe._listItemInBag[i]); } } } //Debug.Log(_myItemLuckyMaterials.Count); } CreateViewLuckMaterial(); //StartCoroutine(LoadLuckyMaterialInBag()); }