Ejemplo n.º 1
0
        // 创建一个套牌
        protected void psstRetCreateOneCardGroupUserCmd(ByteBuffer msg)
        {
            stRetCreateOneCardGroupUserCmd cmd = new stRetCreateOneCardGroupUserCmd();

            cmd.derialize(msg);

            // 更新数据
            Ctx.m_instance.m_dataPlayer.m_dataCard.psstRetCreateOneCardGroupUserCmd(cmd);
            // 更新界面
            IUITuJian uiSC = Ctx.m_instance.m_uiMgr.getForm(UIFormID.eUITuJian) as IUITuJian;

            if (uiSC != null && uiSC.isVisible())
            {
                uiSC.psstRetCreateOneCardGroupUserCmd(Ctx.m_instance.m_dataPlayer.m_dataCard.m_id2CardGroupDic[cmd.index]);
            }
        }
Ejemplo n.º 2
0
        public void psstRetCreateOneCardGroupUserCmd(stRetCreateOneCardGroupUserCmd msg)
        {
            TableItemBase tableItem;

            tableItem = Ctx.m_instance.m_tableSys.getItem(TableID.TABLE_JOB, msg.occupation);
            if (tableItem != null)
            {
                CardGroupItem item = new CardGroupItem();
                item.m_cardGroup            = new t_group_list();
                item.m_cardGroup.occupation = msg.occupation;
                item.m_cardGroup.index      = msg.index;
                item.m_cardGroup.name       = msg.name;
                item.m_tableJobItemBody     = tableItem.m_itemBody as TableJobItemBody;
                m_cardGroupListArr.Add(item);
                m_id2CardGroupDic[item.m_cardGroup.index] = item;
            }

            m_cardSetChangedDisp.dispatchEvent(null);
        }