public AdminProfileCommands( IProfileService profileService, IGuildPreferences guildPreferences, IExperienceService experienceService, IGotService gotService, ILeaveService leaveService, ISpellErrorService spellErrorService, ISpellCorrectService spellCorrectService, IBoganCountService boganCountService, IQuietModeService quietModeService, ITextProcessorService textProcessorService, IGoldService goldService ) { _profileService = profileService; _guildPreferences = guildPreferences; _experienceService = experienceService; _gotService = gotService; _leaveService = leaveService; _spellErrorService = spellErrorService; _spellCorrectService = spellCorrectService; _boganCountService = boganCountService; _quietModeService = quietModeService; _textProcessorService = textProcessorService; _goldService = goldService; }
public GambleCommands(IProfileService profileService, IExperienceService experienceService, IGotService gotService, ILeaveService leaveService, IGoldService goldService) { _profileService = profileService; _experienceService = experienceService; _gotService = gotService; _leaveService = leaveService; _goldService = goldService; }
public ItemCommands( IRobbingItemService robbingItemService, IProfileService profileService, IGoldService goldService ) { _robbingItemService = robbingItemService; _profileService = profileService; _goldService = goldService; }
public CrimeCommands( IProfileService profileService, IGoldService goldService, IRobbingItemService robbingItemService ) { _profileService = profileService; _goldService = goldService; _robbingItemService = robbingItemService; }
public GoldCommands( IProfileService profileService, IGotService gotService, IGoldService goldService, IGuildPreferences guildPreferences ) { _profileService = profileService; _gotService = gotService; _goldService = goldService; _guildPreferences = guildPreferences; }
public adminCommands( IGuildPreferences guildPreferences, IAssignableRoleService assignableRoleService, IGoldService goldService, IProfileService profileService ) { _guildPreferences = guildPreferences; _assignableRoleService = assignableRoleService; _goldService = goldService; _profileService = profileService; }
public void BuyArmy(ArmyPrice armyPrice) { if (Parent.GetComponent <OwnerComponent>().Owner == 0) { Parent.GetComponent <SelectComponent>().Selected = true; } int owner = Parent.GetComponent <OwnerComponent>().Owner; IGoldService goldService = Parent.Scene.ServiceProvider.GetService <IGoldService>(); int gold = goldService.GetGold(owner); if (gold < (int)armyPrice) { return; } goldService.RemoveGold(owner, (int)armyPrice); IGameEntityFactory factory = (IGameEntityFactory)Parent.Scene.EntityFactory; IEntity entity = null; switch (armyPrice) { case ArmyPrice.Archer: if (Parent.GetComponent <OwnerComponent>().Owner == 0) { Parent.Scene.ServiceProvider.GetService <IAudioService>().PlaySound("intro"); } entity = factory.CreateArcher(Parent.Position, owner, 0); break; case ArmyPrice.Knight: if (Parent.GetComponent <OwnerComponent>().Owner == 0) { Parent.Scene.ServiceProvider.GetService <IAudioService>().PlaySound("intro"); } entity = factory.CreateKnight(Parent.Position, owner, 0); break; case ArmyPrice.Catapult: if (Parent.GetComponent <OwnerComponent>().Owner == 0) { Parent.Scene.ServiceProvider.GetService <IAudioService>().PlaySound("intro"); } entity = factory.CreateCatapult(Parent.Position, owner, 0); break; } if (entity != null) { new MoveRandomComponent(entity); } }
public void Update() { if (Parent.Scene.ServiceProvider.GetService <ITimeService>().TimeScale == 0) { return; } ITimeService timeService = Parent.Scene.ServiceProvider.GetService <ITimeService>(); if (lastEarn + EarnSpeed > timeService.AbsoluteTime) { return; } lastEarn = timeService.AbsoluteTime; IGoldService goldService = Parent.Scene.ServiceProvider.GetService <IGoldService>(); int owner = Parent.GetComponent <OwnerComponent>().Owner; goldService.AddGold(owner, Amount); }
public GoldsController(IGoldService goldService) { _goldService = goldService; }