Beispiel #1
0
        private bool HandleGetUserItem(NetCmdBase obj)
        {
            //获得全部的物品
            LC_Cmd_GetUserItem ncb = (LC_Cmd_GetUserItem)obj;

            if ((ncb.States & FishDataInfo.MsgBegin) != 0)
            {
                ItemMap.Clear();
                ItemCountMap.Clear();
            }
            for (UInt16 i = 0; i < ncb.Sum; ++i)
            {
                OnAddItemMap(ncb.Array[i]);
            }
            if ((ncb.States & FishDataInfo.MsgEnd) != 0)
            {
                m_IsLoadItem = true;
                //tagItemChangeEvent Event = new tagItemChangeEvent();
                //MsgEventHandle.HandleMsg(Event);
                IEvent evt = new GF.Event(EventMsg.UPDATE_USERITEM);
                //evt.parameter = ncc;
                EventManager.Instance.DispatchEvent(evt);
            }
            return(true);
        }
Beispiel #2
0
    private bool HandleGetUserItem(NetCmdBase obj)
    {
        //获得全部的物品
        LC_Cmd_GetUserItem ncb = (LC_Cmd_GetUserItem)obj;

        if ((ncb.States & FishDataInfo.MsgBegin) != 0)
        {
            ItemMap.Clear();
            ItemCountMap.Clear();
        }
        for (UInt16 i = 0; i < ncb.Sum; ++i)
        {
            OnAddItemMap(ncb.Array[i]);
        }
        if ((ncb.States & FishDataInfo.MsgEnd) != 0)
        {
            m_IsLoadItem = true;
            tagItemChangeEvent Event = new tagItemChangeEvent();
            MsgEventHandle.HandleMsg(Event);
        }
        return(true);
    }