Exemple #1
0
        override public void initDieItemData(SceneCardBase dieCard, stRetRemoveBattleCardUserCmd msg)
        {
            base.initDieItemData(dieCard, msg);

            m_card = dieCard;
            m_dieEffectId = 14;         // 普通死亡
        }
Exemple #2
0
        // 删除一个消息
        public void psstRetRemoveBattleCardUserCmd(stRetRemoveBattleCardUserCmd msg, int side, SceneCardItem sceneItem)
        {
            Ctx.m_instance.m_logSys.fightLog("[Fight] 接收到删除数据");

            m_curParseRound.psstRetRemoveBattleCardUserCmd(msg, side, sceneItem);
            //nextOneAttactRound();
        }
Exemple #3
0
        override public void initDieItemData(BeingEntity dieBeing, stRetRemoveBattleCardUserCmd msg)
        {
            base.initDieItemData(dieBeing, msg);

            m_being = dieBeing;
            m_dieEffectId = 14;         // 普通死亡
        }
        override public void psstRetRemoveBattleCardUserCmd(stRetRemoveBattleCardUserCmd msg, int side, SceneCardItem sceneItem)
        {
            m_msg = msg;
            m_side = side;
            m_sceneItem = sceneItem;

            m_card = Ctx.m_instance.m_sceneCardMgr.getCardByThisId(m_msg.dwThisID);
            m_card.setSvrDispose();       // 设置服务器死亡标志
        }
Exemple #5
0
        protected void testReceiveMsg()
        {
            ClientBuffer pDataBuffer = new ClientBuffer();
            stAddBattleCardPropertyUserCmd pCmd = new stAddBattleCardPropertyUserCmd();

            for (int idx = 0; idx < 6; ++idx)
            {
                Ctx.m_instance.m_logSys.log(string.Format("接收缓冲区测试索引 {0}", idx));

                pDataBuffer.sendData.clear();
                pCmd.serialize(pDataBuffer.sendData);
                pDataBuffer.send();
                pDataBuffer.getSocketSendData();
                pDataBuffer.dynBuff.size = pDataBuffer.sendBuffer.length;
                Array.Copy(pDataBuffer.sendBuffer.dynBuff.buff, 0, pDataBuffer.dynBuff.buff, 0, pDataBuffer.sendBuffer.length);
                pDataBuffer.moveDyn2Raw();
                pDataBuffer.moveRaw2Msg();
            }

            Ctx.m_instance.m_logSys.log(string.Format("接收缓冲区测试索引 {0}", 6));

            stRetRemoveBattleCardUserCmd pCmd_1 = new stRetRemoveBattleCardUserCmd();

            pDataBuffer.sendData.clear();
            pCmd_1.serialize(pDataBuffer.sendData);
            pDataBuffer.send();
            pDataBuffer.getSocketSendData();
            pDataBuffer.dynBuff.size = pDataBuffer.sendBuffer.length;
            Array.Copy(pDataBuffer.sendBuffer.dynBuff.buff, 0, pDataBuffer.dynBuff.buff, 0, pDataBuffer.sendBuffer.length);
            pDataBuffer.moveDyn2Raw();
            pDataBuffer.moveRaw2Msg();

            for (int idx = 7; idx < 13; ++idx)
            {
                Ctx.m_instance.m_logSys.log(string.Format("接收缓冲区测试索引 {0}", idx));

                pDataBuffer.sendData.clear();
                pCmd.serialize(pDataBuffer.sendData);
                pDataBuffer.send();
                pDataBuffer.getSocketSendData();
                pDataBuffer.dynBuff.size = pDataBuffer.sendBuffer.length;
                Array.Copy(pDataBuffer.sendBuffer.dynBuff.buff, 0, pDataBuffer.dynBuff.buff, 0, pDataBuffer.sendBuffer.length);
                pDataBuffer.moveDyn2Raw();
                pDataBuffer.moveRaw2Msg();
            }

            Ctx.m_instance.m_netDispList.clearOneRevMsg();
            Ctx.m_instance.m_netDispList.clearOneHandleMsg();
        }
        virtual public void psstRetRemoveBattleCardUserCmd(stRetRemoveBattleCardUserCmd msg, int side, SceneCardItem sceneItem)
        {

        }
Exemple #7
0
        virtual public void initDieItemData(SceneCardBase dieCard, stRetRemoveBattleCardUserCmd msg)
        {

        }
Exemple #8
0
 // side 删除的某一方的一个卡牌
 public void psstRetRemoveBattleCardUserCmd(stRetRemoveBattleCardUserCmd cmd, int side, SceneCardItem sceneItem)
 {
     if ((int)EDeleteType.OP_ATTACK_DELETE == cmd.opType)             // 攻击删除
     {
         m_sceneDZData.m_fightMsgMgr.psstRetRemoveBattleCardUserCmd(cmd, side, sceneItem);
     }
     else if((int)EDeleteType.OP_FASHUCARD_DELETE == cmd.opType)     // 法术牌攻击的时候,直接删除法术牌,然后从英雄处发出特效攻击
     {
         Ctx.m_instance.m_logSys.fightLog(string.Format("[Fight] 法术攻击删除一张卡牌 id = {0}", sceneItem.svrCard.qwThisID));
         m_sceneDZData.m_sceneDZAreaArr[side].removeAndDestroyOneCardByItem(sceneItem);
     }
 }
        // 从已经出牌区域删除一个卡牌,这个目前就是战斗删除
        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);
                }
            }
        }
        virtual public void initDieItemData(BeingEntity dieBeing, stRetRemoveBattleCardUserCmd msg)
        {

        }
Exemple #11
0
 public void psstRetRemoveBattleCardUserCmd(stRetRemoveBattleCardUserCmd msg, int side, SceneCardItem sceneItem)
 {
     m_bHasFightData = true;
     FightRoundItemBase attItem = new FightRoundDelItem(m_sceneDZData);
     attItem.addOneAttackAndHurtEndHandle(onOneAttackAndHurtEndHandle);
     attItem.psstRetRemoveBattleCardUserCmd(msg, side, sceneItem);
     m_cacheList.Add(attItem);
     //nextOneAttact();
 }