| | |
| | | {
|
| | | isdelay = true;
|
| | | GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
|
| | | playerPack.ItemCntReduceAct -= UpdateItemCount;
|
| | | playerPack.RefreshItemCountAct -= UpdateItemCount;
|
| | | itemStack.Clear();
|
| | | itemGuids.Clear();
|
| | | currentShowItem = default(OverdueItem);
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | playerPack.ItemCntReduceAct += UpdateItemCount;
|
| | | playerPack.RefreshItemCountAct += UpdateItemCount;
|
| | | GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
|
| | | time = 0;
|
| | | }
|
| | |
| | |
|
| | | private void UpdateItemCount(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptItem || type != PackType.rptWarehouse) return;
|
| | | if (type != PackType.rptItem && type != PackType.rptWarehouse) return;
|
| | | ItemConfig itemConfig = Config.Instance.Get<ItemConfig>(id);
|
| | | if (itemConfig == null || itemConfig.EquipPlace != (int)RoleEquipType.retSpiritAnimal) return;
|
| | |
|
| | | bool isRemove = false;
|
| | | for(int i = 0; i < itemGuids.Count; i++)
|
| | | {
|
| | | string guid = itemGuids[i];
|
| | | ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if(itemModel == null || itemModel.packType != PackType.rptItem)
|
| | | {
|
| | | isRemove = true;
|
| | | if (itemGuids.Contains(guid))
|
| | | {
|
| | | itemGuids.Remove(guid);
|
| | |
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | RefreshCurrrentShowUseItem();
|
| | | if(isRemove)
|
| | | {
|
| | | RefreshCurrrentShowUseItem();
|
| | | }
|
| | | }
|
| | |
|
| | | private void OnGetOverdueItem(int itemId, string guid,int index)
|