コード例 #1
0
 public MonsterController(IMonsterRepository repo, IMonsterProf profRepo, IMonsterSense senseRepo, IAbilityRepository abilityRepo)
 {
     _repo        = repo;
     _profRepo    = profRepo;
     _senseRepo   = senseRepo;
     _abilityRepo = abilityRepo;
 }
コード例 #2
0
 public AbilityAuthorizationService(IUserRepository userRepository,
                                    IRoleRepository roleRepository,
                                    IAbilityRepository abilityRepository)
 {
     _userRepository    = userRepository;
     _roleRepository    = roleRepository;
     _abilityRepository = abilityRepository;
 }
コード例 #3
0
 public AbilityAuthorizationService(IUserRepository userRepository, 
                                    IRoleRepository roleRepository, 
                                    IAbilityRepository abilityRepository)
 {
     _userRepository = userRepository;
     _roleRepository = roleRepository;
     _abilityRepository = abilityRepository;
 }
コード例 #4
0
 public HomeController(IImageRepository imageRepo, ISiteSettingRepository siteSettingRepo, IPersonalSettingRepository personalSettingRepo, IPostRepository postRepo, ISocialRepository socialRepo, IAbilityRepository abilityRepo, IProjectRepository projectRepo)
 {
     _socialRepository          = socialRepo;
     _abilityRepository         = abilityRepo;
     _projectRepository         = projectRepo;
     _postRepository            = postRepo;
     _personalSettingRepository = personalSettingRepo;
     _siteSettingRepository     = siteSettingRepo;
     _imageRepository           = imageRepo;
 }
コード例 #5
0
        public PlayerPeer(Socket socket, IAccountRepository accountRepository, IPlayerRepository playerRepository, IAbilityRepository abilityRepository, Dictionary <int, Zone> zones)
            : base(socket)
        {
            m_accountRepository = accountRepository;
            m_playerRepository  = playerRepository;
            m_abilityRepository = abilityRepository;
            m_zones             = zones;

            InitialiseRoutes();

            Fiber.Enqueue(Update);
        }
コード例 #6
0
 public BlogController(ICommentRepository commentRepo, IImageRepository imageRepo, ICategoryRepository categoryRepo, ISiteSettingRepository siteSettingRepo, IPersonalSettingRepository personalSettingRepo, IPostRepository postRepo, ISocialRepository socialRepo, IAbilityRepository abilityRepo, IProjectRepository projectRepo)
 {
     _categoryRepository        = categoryRepo;
     _socialRepository          = socialRepo;
     _abilityRepository         = abilityRepo;
     _projectRepository         = projectRepo;
     _postRepository            = postRepo;
     _personalSettingRepository = personalSettingRepo;
     _siteSettingRepository     = siteSettingRepo;
     _imageRepository           = imageRepo;
     _commentRepository         = commentRepo;
 }
コード例 #7
0
        public LevelEnemyUnitSetupProcessor(AgentFactory agentFactory, IItemTemplateRepository itemTemplateRepository, IRandomizer randomizer, IUnitIdPool unitIdPool, UnitBuilder unitBuilder, IAbilityRepository abilityRepository, ISpellRepository spellRepository, ICardEffectsRepository cardEffectsRepository)
        {
            AgentFactory           = agentFactory;
            ItemTemplateRepository = itemTemplateRepository;
            Randomizer             = randomizer;
            UnitIdPool             = unitIdPool;
            UnitBuilder            = unitBuilder;
            AbilityRepository      = abilityRepository;
            SpellRepository        = spellRepository;
            CardEffectsRepository  = cardEffectsRepository;

            GlobalLootTable = GenerateLootTable();
        }
コード例 #8
0
 protected override void ResolveApplicationDependencies()
 {
     base.ResolveApplicationDependencies();
     Level                  = Container.Resolve <Level>();
     GameConfiguration      = Container.Resolve <GameConfiguration>();
     GameState              = Container.Resolve <GameState>();
     UnitBuilder            = Container.Resolve <UnitBuilder>();
     ItemTemplateRepository = Container.Resolve <IItemTemplateRepository>();
     CardEffectsRepository  = Container.Resolve <ICardEffectsRepository>();
     SpellRepository        = Container.Resolve <ISpellRepository>();
     UnitIdPool             = Container.Resolve <IUnitIdPool>();
     AbilityRepository      = Container.Resolve <IAbilityRepository>();
 }
コード例 #9
0
ファイル: FullModule.cs プロジェクト: schmidtgit/SC2Abathur
 /// IModules can take any number of these in the constructor and in any order.
 /// It is all handled using Dependency Injection.
 public FullModule(ILogger log, IIntelManager intelManager, ICombatManager combatManager,
                   IProductionManager productionManager, IRawManager rawManager, IAbilityRepository abilityRepository,
                   IUnitTypeRepository unitTypeRepository, IUpgradeRepository upgradeRepository, IBuffRepository buffRepository,
                   ISquadRepository squadRepository, IGameMap gameMap, ITechTree techTree, GameSettings gameSettings)
 {
     this.log                = log;
     this.intelManager       = intelManager;
     this.combatManager      = combatManager;
     this.productionManager  = productionManager;
     this.rawManager         = rawManager;
     this.abilityRepository  = abilityRepository;
     this.unitTypeRepository = unitTypeRepository;
     this.upgradeRepository  = upgradeRepository;
     this.buffRepository     = buffRepository;
     this.squadRepository    = squadRepository;
     this.gameMap            = gameMap;
     this.techTree           = techTree;
 }
コード例 #10
0
        public World(IAccountRepository accountRepository, INPCRepository npcRepository, IPlayerRepository playerRepository, IServerStatsRepository statsRepository, IAbilityRepository abilityRepository)
        {
            m_accountRepository = accountRepository;
            m_npcRepository     = npcRepository;
            m_playerRepository  = playerRepository;
            m_statsRepository   = statsRepository;
            m_abilityRepository = abilityRepository;

            m_npcFactory = new NPCFactory(npcRepository);

            m_zones = BuildZones(m_npcRepository);

            m_cpuCounter.CategoryName = "Processor";
            m_cpuCounter.CounterName  = "% Processor Time";
            m_cpuCounter.InstanceName = "_Total";

            m_fiber.Enqueue(Update, false);
            //m_fiber.Enqueue(StatsUpdate, false);
        }
コード例 #11
0
 public GameMap(IAbilityRepository abilityRepository, IUnitTypeRepository unitTypeRepository, IRawManager rawManager)
 {
     this.abilityRepository  = abilityRepository;
     this.unitTypeRepository = unitTypeRepository;
     this.rawManager         = rawManager;
 }
コード例 #12
0
 public AbilityController(IAbilityRepository repository)
 {
     abilityRepository = repository;
 }
コード例 #13
0
 public AbilityController(IAbilityRepository abilityRepository)
 {
     _abilityRepository = abilityRepository;
 }
コード例 #14
0
 public AbilityAuthorizationService()
 {
     _userRepository    = new UserRepository();
     _roleRepository    = new RoleRepository();
     _abilityRepository = new AbilityRepository();
 }
コード例 #15
0
 public AbilityService(IAbilityRepository abilityRepository, IStatusRepository statusRepository)
 {
     this.abilityRepository = abilityRepository;
     this.statusRepository  = statusRepository;
 }
コード例 #16
0
 public AbilityService(IMapper mapper, IRaceAbilityRepository raceAbilityRepository, IAbilityRepository abilityRepository) : base(mapper)
 {
     _raceAbilityRepository = raceAbilityRepository;
     _abilityRepository     = abilityRepository;
 }
コード例 #17
0
        private static void Main(string[] args)
        {
            GCSettings.LatencyMode = GCLatencyMode.SustainedLowLatency;

            ServerConfiguration config = (ServerConfiguration)ConfigurationManager.GetSection("server");

            s_log.Info("Creating repositories...");
            UnityContainer repositoryResolver = new UnityContainer();

            repositoryResolver.LoadConfiguration();

            IAccountRepository     accountRepository = repositoryResolver.Resolve <IAccountRepository>();
            INPCRepository         npcRepository     = repositoryResolver.Resolve <INPCRepository>();
            IPlayerRepository      playerRepository  = repositoryResolver.Resolve <IPlayerRepository>();
            IAbilityRepository     abilityRepository = repositoryResolver.Resolve <IAbilityRepository>();
            IServerStatsRepository statsRepository   = new NullServerStatsRepository();

            try
            {
                statsRepository = repositoryResolver.Resolve <IServerStatsRepository>();
            }
            catch
            {
                s_log.Warn("Failed to create stats repository. Stats will be disabled.");
            }

            s_log.Info("Precaching NPCs...");
            var npcs = npcRepository.GetNPCs();

            s_log.Info("Precaching NPC Spawns...");
            npcRepository.GetNPCSpawns();

            s_log.Info("Precaching NPC Behaviours...");
            var npcBehaviours = npcRepository.GetNPCBehaviours();

            foreach (NPCModel npc in npcs)
            {
                npcRepository.GetNPCBehavioursByNPCID(npc.NPCID);
            }

            s_log.Info("Precaching NPC Behaviour Vars...");
            npcRepository.GetNPCBehaviourVars();
            foreach (NPCBehaviourModel npcBehaviour in npcBehaviours)
            {
                npcRepository.GetNPCBehaviourVarsByNPCBehaviourID(npcBehaviour.NPCBehaviourID);
            }

            s_log.Info("Precaching NPC Stats...");
            npcRepository.GetNPCStats();
            foreach (NPCModel npc in npcs)
            {
                npcRepository.GetNPCStatsByNPCID(npc.NPCID);
            }

            s_log.Info("Precaching abilities...");
            abilityRepository.GetAbilities();

            s_log.Info("Initialising serializer...");
            ProtocolUtility.InitialiseSerializer();

            s_log.Info("Creating world...");
            using (World world = new World(accountRepository, npcRepository, playerRepository, statsRepository, abilityRepository))
            {
                TcpListener listener = new TcpListener(IPAddress.Any, config.Port);
                listener.Start();
                s_log.Info("Listening for connections on " + listener.LocalEndpoint.ToString());

                while (true)
                {
                    Socket socket = listener.AcceptSocket();
                    world.AcceptSocket(socket);
                }
            }
        }
コード例 #18
0
 public AbilityAuthorizationService()
 {
     _userRepository = new UserRepository();
     _roleRepository = new RoleRepository();
     _abilityRepository = new AbilityRepository();
 }
コード例 #19
0
 public AbilityMenuViewComponent(IAbilityRepository repo)
 {
     repository = repo;
 }