예제 #1
0
        //public static MessageCode CreateMatchTourAsyn(Guid matchId, Guid homeId, int stageId, bool hasTask, MatchThread.MatchCallback callback, bool isElite = false, int guideTaskRecordId = 0)// bool isMopUp,
        //{
        //    var stateObj = new TourMatchData(matchId, homeId, Guid.Empty, stageId);
        //    stateObj.GuideTaskRecordId = guideTaskRecordId;
        //    stateObj.HasTask = hasTask;
        //    if (isElite)
        //    {
        //        var elite = CacheFactory.TourdicCache.GetTourElite(stageId);
        //        if (elite == null)
        //        {
        //            return MessageCode.TourStageNotExists;
        //        }
        //        else
        //        {
        //            stateObj.Away.ManagerId = elite.NpcId;
        //            stateObj.MatchType = (int)EnumMatchType.TourElite;
        //        }
        //    }
        //    else
        //    {
        //        var stage = CacheFactory.TourdicCache.GetStage(stageId);
        //        if (stage == null)
        //        {
        //            return MessageCode.TourStageNotExists;
        //        }
        //        else
        //        {
        //            if (guideTaskRecordId > 0)
        //                stateObj.IsGuide = true;
        //            stateObj.Away.ManagerId = stage.NpcId;
        //        }
        //    }
        //    return CreateMatchAsyn(stateObj, callback);
        //}

        //public static MessageCode CreateMatchChallengeAsyn(Guid matchId, Guid homeId,int buff,WorldchallengeRecordEntity recordEntity, bool hasTask, MatchThread.MatchCallback callback)
        //{
        //    var stateObj = new WChallengeMatchData(matchId, homeId, recordEntity.NpcId);
        //    stateObj.HasTask = hasTask;
        //    stateObj.WorldchallengeRecord = recordEntity;
        //    stateObj.Home.BuffScale = buff;
        //    return CreateMatchAsyn(stateObj, callback);
        //}

        public static MessageCode CreateMatchFriendAsyn(Guid matchId, Guid managerId, Guid awayId, FriendManagerEntity friendManager, MatchThread.MatchCallback callback)
        {
            var stateObj = new FriendMatchData(matchId, managerId, awayId);

            stateObj.HasTask      = false;
            stateObj.FriendRecord = friendManager;
            return(CreateMatchAsyn(stateObj, callback));
        }
예제 #2
0
        public static MessageCode CreateMatchAsyn(EnumMatchType matchType, Guid matchId, Guid homeId, Guid awayId, MatchThread.MatchCallback callback)
        {
            var stateObj = new BaseMatchData((int)matchType, matchId, homeId, awayId);

            return(CreateMatchAsyn(stateObj, callback));
        }
예제 #3
0
 public static MessageCode CreateMatchAsyn(BaseMatchData matchData, MatchThread.MatchCallback callback)
 {
     return(MatchThread.Instance.CreateMatchAsyn(matchData, callback));
 }
예제 #4
0
        public static MessageCode CreateMatchPkAsyn(Guid matchId, Guid managerId, Guid awayId, long revengeRecordId, int dayWinTimes, MatchThread.MatchCallback callback, bool hasTask)
        {
            var stateObj = new PkMatchData(matchId, managerId, awayId, revengeRecordId, dayWinTimes);

            stateObj.HasTask = hasTask;
            return(CreateMatchAsyn(stateObj, callback));
        }