| | |
| | | {
|
| | | isdelay = true;
|
| | | GlobalTimeEvent.Instance.secondEvent -= UpdateSecond;
|
| | | playerPack.ItemCntReduceAct -= UpdateItemCount;
|
| | | itemStack.Clear();
|
| | | itemGuids.Clear();
|
| | | currentShowItem = default(OverdueItem);
|
| | |
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | playerPack.ItemCntReduceAct += UpdateItemCount;
|
| | | GlobalTimeEvent.Instance.secondEvent += UpdateSecond;
|
| | | time = 0;
|
| | | }
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | private void UpdateItemCount(PackType type, int index, int id)
|
| | | {
|
| | | if (type != PackType.rptItem) return;
|
| | |
|
| | | for(int i = 0; i < itemGuids.Count; i++)
|
| | | {
|
| | | string guid = itemGuids[i];
|
| | | ItemModel itemModel = playerPack.GetItemModelByGUID(guid);
|
| | | if(itemModel == null)
|
| | | {
|
| | | if (itemGuids.Contains(guid))
|
| | | {
|
| | | itemGuids.Remove(guid);
|
| | | }
|
| | |
|
| | | if (itemStack.ContainsKey(guid))
|
| | | {
|
| | | itemStack.Remove(guid);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | RefreshCurrrentShowUseItem();
|
| | | }
|
| | |
|
| | | private void OnGetOverdueItem(int itemId, string guid,int index)
|
| | | {
|
| | | var overdueItem = new OverdueItem(itemId,guid,index);
|