/// <summary> /// コンストラクタ /// </summary> public SkillCountService() { SkillStorage.Create(); PowStorage.Create(); MapStorage.Create(); _skillArrayRecognizer.Updated += (_, e) => SkillsUpdated?.Invoke(this, new SkillsUpdatedEventArgs(e)); _powRecognizer.Updated += (_, e) => PowUpdated?.Invoke(this, new PowUpdatedEventArgs(e)); _hpRecognizer.Updated += (_, e) => HpUpdated?.Invoke(this, new HpUpdatedEventArgs(e)); _powDebuffArrayRecognizer.Updated += (_, e) => PowDebuffsUpdated?.Invoke(this, new PowDebuffsUpdatedEventArgs(e)); _keepDamageRecognizer.Updated += (_, e) => KeepDamageUpdated?.Invoke(this, new KeepDamageUpdatedEventArgs(e)); _bookUseRecognizer.Updated += (_, e) => BookUsesUpdated?.Invoke(this, new BookUsesUpdatedEventArgs(e)); _warStateRecognizer.WarStarted += (_, e) => { Logger.WriteLine("War started."); WarStarted?.Invoke(this, new WarStartedEventArgs(e)); }; _warStateRecognizer.WarCanceled += (_, e) => { Logger.WriteLine("War canceled."); WarCanceled?.Invoke(this, new WarCanceledEventArgs(e)); }; _warStateRecognizer.WarFinished += (_, e) => { Logger.WriteLine("War finished."); WarFinished?.Invoke(this, new WarFinishedEventArgs(e)); }; }
public void AddSkill(Skill skill) { _logger.LogEntry(); CachedSvcSkills.Add(skill.Id, skill); SkillsUpdated?.Invoke(this, EventArgs.Empty); _logger.LogExit(); }
public void UpdateSkill(SkillUpdateRequest skillUpdateRequest) { _logger.LogEntry(); var cachedSkill = CachedSvcSkills[skillUpdateRequest.Id]; cachedSkill.Ranks = skillUpdateRequest.Ranks; cachedSkill.Class = skillUpdateRequest.Class; _skillTotalCalculator.AddTotal(cachedSkill); SkillsUpdated?.Invoke(this, EventArgs.Empty); _logger.LogExit(); }
private void PrimaryStatsServiceOnPrimaryStatsUpdated(object sender, EventArgs e) { _skillTotalCalculator.AddTotals(CachedSvcSkills.Values); SkillsUpdated?.Invoke(this, EventArgs.Empty); }
// Token: 0x0600386E RID: 14446 RVA: 0x001981F4 File Offset: 0x001965F4 public PlayerDashboardSkillsUI() { if (PlayerDashboardSkillsUI.icons != null) { PlayerDashboardSkillsUI.icons.unload(); } PlayerDashboardSkillsUI.localization = Localization.read("/Player/PlayerDashboardSkills.dat"); PlayerDashboardSkillsUI.icons = Bundles.getBundle("/Bundles/Textures/Player/Icons/PlayerDashboardSkills/PlayerDashboardSkills.unity3d"); PlayerDashboardSkillsUI.container = new Sleek(); PlayerDashboardSkillsUI.container.positionScale_Y = 1f; PlayerDashboardSkillsUI.container.positionOffset_X = 10; PlayerDashboardSkillsUI.container.positionOffset_Y = 10; PlayerDashboardSkillsUI.container.sizeOffset_X = -20; PlayerDashboardSkillsUI.container.sizeOffset_Y = -20; PlayerDashboardSkillsUI.container.sizeScale_X = 1f; PlayerDashboardSkillsUI.container.sizeScale_Y = 1f; PlayerUI.container.add(PlayerDashboardSkillsUI.container); PlayerDashboardSkillsUI.active = false; PlayerDashboardSkillsUI.selectedSpeciality = byte.MaxValue; PlayerDashboardSkillsUI.backdropBox = new SleekBox(); PlayerDashboardSkillsUI.backdropBox.positionOffset_Y = 60; PlayerDashboardSkillsUI.backdropBox.sizeOffset_Y = -60; PlayerDashboardSkillsUI.backdropBox.sizeScale_X = 1f; PlayerDashboardSkillsUI.backdropBox.sizeScale_Y = 1f; Color white = Color.white; white.a = 0.5f; PlayerDashboardSkillsUI.backdropBox.backgroundColor = white; PlayerDashboardSkillsUI.container.add(PlayerDashboardSkillsUI.backdropBox); PlayerDashboardSkillsUI.experienceBox = new SleekBox(); PlayerDashboardSkillsUI.experienceBox.positionOffset_X = 10; PlayerDashboardSkillsUI.experienceBox.positionOffset_Y = -90; PlayerDashboardSkillsUI.experienceBox.positionScale_Y = 1f; PlayerDashboardSkillsUI.experienceBox.sizeOffset_X = -15; PlayerDashboardSkillsUI.experienceBox.sizeOffset_Y = 80; PlayerDashboardSkillsUI.experienceBox.sizeScale_X = 0.5f; PlayerDashboardSkillsUI.experienceBox.fontSize = 14; PlayerDashboardSkillsUI.experienceBox.foregroundColor = Palette.COLOR_Y; PlayerDashboardSkillsUI.experienceBox.foregroundTint = ESleekTint.NONE; PlayerDashboardSkillsUI.backdropBox.add(PlayerDashboardSkillsUI.experienceBox); for (int i = 0; i < (int)PlayerSkills.SPECIALITIES; i++) { SleekButtonIcon sleekButtonIcon = new SleekButtonIcon((Texture2D)PlayerDashboardSkillsUI.icons.load("Speciality_" + i)); sleekButtonIcon.positionOffset_X = -85 + i * 60; sleekButtonIcon.positionOffset_Y = 10; sleekButtonIcon.positionScale_X = 0.5f; sleekButtonIcon.sizeOffset_X = 50; sleekButtonIcon.sizeOffset_Y = 50; sleekButtonIcon.tooltip = PlayerDashboardSkillsUI.localization.format("Speciality_" + i + "_Tooltip"); sleekButtonIcon.iconImage.backgroundTint = ESleekTint.FOREGROUND; SleekButton sleekButton = sleekButtonIcon; if (PlayerDashboardSkillsUI.< > f__mg$cache2 == null) { PlayerDashboardSkillsUI.< > f__mg$cache2 = new ClickedButton(PlayerDashboardSkillsUI.onClickedSpecialityButton); } sleekButton.onClickedButton = PlayerDashboardSkillsUI.< > f__mg$cache2; PlayerDashboardSkillsUI.backdropBox.add(sleekButtonIcon); } PlayerDashboardSkillsUI.skillsScrollBox = new SleekScrollBox(); PlayerDashboardSkillsUI.skillsScrollBox.positionOffset_X = 10; PlayerDashboardSkillsUI.skillsScrollBox.positionOffset_Y = 70; PlayerDashboardSkillsUI.skillsScrollBox.sizeOffset_X = -20; PlayerDashboardSkillsUI.skillsScrollBox.sizeOffset_Y = -170; PlayerDashboardSkillsUI.skillsScrollBox.sizeScale_X = 1f; PlayerDashboardSkillsUI.skillsScrollBox.sizeScale_Y = 1f; PlayerDashboardSkillsUI.backdropBox.add(PlayerDashboardSkillsUI.skillsScrollBox); PlayerDashboardSkillsUI.updateSelection(0); PlayerSkills playerSkills = Player.player.skills; Delegate onExperienceUpdated = playerSkills.onExperienceUpdated; if (PlayerDashboardSkillsUI.< > f__mg$cache3 == null) { PlayerDashboardSkillsUI.< > f__mg$cache3 = new ExperienceUpdated(PlayerDashboardSkillsUI.onExperienceUpdated); } playerSkills.onExperienceUpdated = (ExperienceUpdated)Delegate.Combine(onExperienceUpdated, PlayerDashboardSkillsUI.< > f__mg$cache3); PlayerSkills playerSkills2 = Player.player.skills; Delegate onBoostUpdated = playerSkills2.onBoostUpdated; if (PlayerDashboardSkillsUI.< > f__mg$cache4 == null) { PlayerDashboardSkillsUI.< > f__mg$cache4 = new BoostUpdated(PlayerDashboardSkillsUI.onBoostUpdated); } playerSkills2.onBoostUpdated = (BoostUpdated)Delegate.Combine(onBoostUpdated, PlayerDashboardSkillsUI.< > f__mg$cache4); PlayerSkills playerSkills3 = Player.player.skills; Delegate onSkillsUpdated = playerSkills3.onSkillsUpdated; if (PlayerDashboardSkillsUI.< > f__mg$cache5 == null) { PlayerDashboardSkillsUI.< > f__mg$cache5 = new SkillsUpdated(PlayerDashboardSkillsUI.onSkillsUpdated); } playerSkills3.onSkillsUpdated = (SkillsUpdated)Delegate.Combine(onSkillsUpdated, PlayerDashboardSkillsUI.< > f__mg$cache5); }