public Player(PlayerModel p, LocatorService ls) { _areaLocator = ls.AreaLocator; _shipLocator = ls.ShipLocator; _accountLocator = ls.AccountLocator; _teamLocator = ls.TeamLocator; _model = p; }
public PendingStockActions(IStockPriceProvider priceProvider, IAccountLocator accountLocator, IAccountPersister accountPersister) { this.priceProvider = priceProvider; this.accountLocator = accountLocator; this.accountPersister = accountPersister; this.hubContext = GlobalHost.ConnectionManager.GetHubContext<StockTraderHub>(); this.pendingActions = new List<PendingAction>(); this.pendingActionsTimer = new Timer(this.PendingActionsCallback, null, TimeSpan.FromSeconds(3), TimeSpan.FromSeconds(3)); }
public IEnumerable <Player> GetAllPlayers(IAreaLocator al, IShipLocator sl, IAccountLocator acl, ITeamLocator tl, ITeamManager tm) { IEnumerable <DBPlayer> allPlayers = _galacticObjectContext.Players; List <Player> acc = new List <Player>(); foreach (DBPlayer p in allPlayers) { acc.Add(new Player(p, al, sl, acl, tl, tm)); } return(acc); }
public Player(int playerID, string name, Account account, LocatorService ls) { _model = new PlayerModel(); _model.Id = playerID; Username = name; IsOnline = false; CheatEngineOpen = false; HackCount = -1; _areaLocator = ls.AreaLocator; _shipLocator = ls.ShipLocator; _accountLocator = ls.AccountLocator; _teamLocator = ls.TeamLocator; _model.AccountID = account.Id; _model.DefaultTeamID = ls.TeamManager.CreateNewTeam(this); _model.TeamIDs.Add((int)_model.DefaultTeamID); _model.PlayerType = PlayerTypes.Human; }
public LocatorService(IGalaxyRegistrationManager grm, IPlayerLocator pl, IAreaLocator al, IShipLocator sl, IAccountLocator acl, ITeamLocator tl, ITeamManager tm, IMessageManager mm, IObjectLocator <IStructure> structureManager, ISlaveIDProvider slaveIDProvider) { PlayerLocator = pl; ShipLocator = sl; AccountLocator = acl; TeamLocator = tl; TeamManager = tm; AreaLocator = al; MessageManager = mm; RegistrationManager = grm; StructureManager = structureManager; SlaveIDProvider = slaveIDProvider; }
public StockTraderHub(IAccountLocator accountLocator, IStocksUpdater stocksUpdater, IStockBroker stockBroker) { this.accountLocator = accountLocator; this.stocksUpdater = stocksUpdater; this.stockBroker = stockBroker; }
public void Test(IDatabaseManager dbm, IPlayerLocator pl, IAreaLocator al, ITeamLocator tl, IShipLocator sl, IMessageManager mm, IAccountLocator acl, ITeamManager tm) { }
/// <summary> /// Returns null if player not found /// </summary> /// <param name="id"></param> /// <returns></returns> public Player GetPlayer(int id, IAreaLocator al, IShipLocator sl, IAccountLocator acl, ITeamLocator tl, ITeamManager tm) { DBPlayer p = _galacticObjectContext.Players.First(ee => ee.Id == id); return(p != null ? new Player(p, al, sl, acl, tl, tm) : null); }