Пример #1
0
    /**
     *进出副本模块-->进入 RPC请求
     */
    public void Enter(int DungeonId, List <int> HeroList, int PVPType, ReplyHandler replyCB)
    {
        DungeonRpcEnterAskWraper askPBWraper = new DungeonRpcEnterAskWraper();

        askPBWraper.DungeonId = DungeonId;
        askPBWraper.SetHeroList(HeroList);
        askPBWraper.PVPType = PVPType;
        ModMessage askMsg = new ModMessage();

        askMsg.MsgNum  = RPC_CODE_DUNGEON_ENTER_REQUEST;
        askMsg.protoMS = askPBWraper.ToMemoryStream();

        Singleton <GameSocket> .Instance.SendAsk(askMsg, delegate(ModMessage replyMsg){
            DungeonRpcEnterReplyWraper replyPBWraper = new DungeonRpcEnterReplyWraper();
            replyPBWraper.FromMemoryStream(replyMsg.protoMS);
            replyCB(replyPBWraper);
        });
    }
Пример #2
0
    /**
     *进出副本模块-->进入 RPC请求
     */
    public void Enter(int DungeonId, int DungeonType, int BirthPoint, int FaceDir, int GuildId, ReplyHandler replyCB)
    {
        DungeonRpcEnterAskWraper askPBWraper = new DungeonRpcEnterAskWraper();

        askPBWraper.DungeonId   = DungeonId;
        askPBWraper.DungeonType = DungeonType;
        askPBWraper.BirthPoint  = BirthPoint;
        askPBWraper.FaceDir     = FaceDir;
        askPBWraper.GuildId     = GuildId;
        ModMessage askMsg = new ModMessage();

        askMsg.MsgNum  = RPC_CODE_DUNGEON_ENTER_REQUEST;
        askMsg.protoMS = askPBWraper.ToMemoryStream();

        Singleton <GameSocket> .Instance.SendAsk(askMsg, delegate(ModMessage replyMsg){
            DungeonRpcEnterReplyWraper replyPBWraper = new DungeonRpcEnterReplyWraper();
            replyPBWraper.FromMemoryStream(replyMsg.protoMS);
            replyCB(replyPBWraper);
        });
    }