Ejemplo n.º 1
0
        // 从已经出牌区域删除一个卡牌,这个目前就是战斗删除
        protected void psstRetRemoveBattleCardUserCmd(ByteBuffer bu)
        {
            stRetRemoveBattleCardUserCmd cmd = new stRetRemoveBattleCardUserCmd();
            cmd.derialize(bu);

            Ctx.m_instance.m_logSys.log(string.Format("删除一个卡牌 thisid: {0}", cmd.dwThisID));

            int side = 0;
            SceneCardItem sceneItem = null;
            if (!Ctx.m_instance.m_dataPlayer.m_dzData.m_playerArr[0].removeOneSceneCardByThisID(cmd.dwThisID, ref sceneItem))
            {
                side = 1;
                Ctx.m_instance.m_dataPlayer.m_dzData.m_playerArr[1].removeOneSceneCardByThisID(cmd.dwThisID, ref sceneItem);
            }
            UISceneDZ uiSceneDZ = Ctx.m_instance.m_uiSceneMgr.getSceneUI<UISceneDZ>(UISceneFormID.eUISceneDZ);
            if (uiSceneDZ != null && uiSceneDZ.isVisible())
            {
                if (sceneItem != null)
                {
                    uiSceneDZ.psstRetRemoveBattleCardUserCmd(cmd, side, sceneItem);
                }
            }
        }