예제 #1
0
 public FightBusinessEctype(FightObject[] teamA, FightObject[] teamB, List<PlayerBusiness> players,
     TeamInstanceBusiness tb, EctypeApc apc)
     : base(teamA, teamB, players, apc.Apc.ID, true)
 {
     tb.Astate = ActionState.Fight;
     m_tb = tb;
     m_apc = apc;
 }
예제 #2
0
 public static bool TryGetTeamInstance(long id, out TeamInstanceBusiness instance)
 {
     return m_online.TryGetValue(id, out instance);
 }
예제 #3
0
        /// <summary>
        /// 创建新副本
        /// </summary>
        /// <param name="note"></param>
        private void NewInstance(UserNote note)
        {
            PlayerBusiness player = note.Player;
            string id = note.GetString(0);

            GameConfig gc = GameConfigAccess.Instance.FindOneById(id);
            if (gc == null)
            {
                return;
            }
            //副本难度
            string difficulty = note.GetString(1);
            if (string.IsNullOrEmpty(difficulty))
            {
                return;
            }

            TeamInstanceBusiness eb;
            switch (gc.SubType)
            {
                case "Team":
                    eb = new TeamInstanceBusiness(gc, difficulty);
                    break;
                case "Personal":
                    eb = new PersonalFam(gc, difficulty);
                    break;
                default:
                    eb = new FamilyInstanceBusiness(gc, difficulty);
                    break;
            }

            if (eb.TryInto(player))
            {
                eb.NextDrame();
            }
        }
예제 #4
0
 public static bool TryAddInstance(TeamInstanceBusiness instance)
 {
     return m_online.TryAdd(instance.ID, instance);
 }