/// <summary> /// Updates the gamestrings of <paramref name="emoticonPack"/>. /// </summary> /// <param name="emoticonPack">The data who's gamestrings will be updated.</param> /// <param name="version">The version directory to load the gamestrings from.</param> /// <param name="localization">The <see cref="Localization"/> of the gamestrings.</param> /// <exception cref="ArgumentNullException"><paramref name="emoticonPack"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception> public void UpdateGameString(EmoticonPack emoticonPack, HeroesDataVersion version, Localization localization) { if (emoticonPack is null) { throw new ArgumentNullException(nameof(emoticonPack)); } if (version is null) { throw new ArgumentNullException(nameof(version)); } (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _emoticonPackFileTemplateName, false, true); using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath); emoticonPack.UpdateGameStrings(gameStringDocument); }
/// <summary> /// Updates the gamestrings of <paramref name="banner"/>. /// </summary> /// <param name="banner">The data who's gamestrings will be updated.</param> /// <param name="version">The version directory to load the gamestrings from.</param> /// <param name="localization">The <see cref="Localization"/> of the gamestrings.</param> /// <exception cref="ArgumentNullException"><paramref name="banner"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception> public void UpdateGameString(Banner banner, HeroesDataVersion version, Localization localization) { if (banner is null) { throw new ArgumentNullException(nameof(banner)); } if (version is null) { throw new ArgumentNullException(nameof(version)); } (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _bannerFileTemplateName, false, true); using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath); banner.UpdateGameStrings(gameStringDocument); }
/// <summary> /// Updates the gamestrings of <paramref name="rewardPortrait"/>. /// </summary> /// <param name="rewardPortrait">The data who's gamestrings will be updated.</param> /// <param name="version">The version directory to load the gamestrings from.</param> /// <param name="localization">The <see cref="Localization"/> of the gamestrings.</param> /// <exception cref="ArgumentNullException"><paramref name="rewardPortrait"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception> public void UpdateGameString(RewardPortrait rewardPortrait, HeroesDataVersion version, Localization localization) { if (rewardPortrait is null) { throw new ArgumentNullException(nameof(rewardPortrait)); } if (version is null) { throw new ArgumentNullException(nameof(version)); } (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _rewardPortraitFileTemplateName, false, true); using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath); rewardPortrait.UpdateGameStrings(gameStringDocument); }
/// <summary> /// Updates the gamestrings of <paramref name="voiceLine"/>. /// </summary> /// <param name="voiceLine">The data who's gamestrings will be updated.</param> /// <param name="version">The version directory to load the gamestrings from.</param> /// <param name="localization">The <see cref="Localization"/> of the gamestrings.</param> /// <exception cref="ArgumentNullException"><paramref name="voiceLine"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception> public void UpdateGameString(VoiceLine voiceLine, HeroesDataVersion version, Localization localization) { if (voiceLine is null) { throw new ArgumentNullException(nameof(voiceLine)); } if (version is null) { throw new ArgumentNullException(nameof(version)); } (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _voiceLineFileTemplateName, false, true); using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath); voiceLine.UpdateGameStrings(gameStringDocument); }
/// <summary> /// Updates the gamestrings of <paramref name="matchAward"/>. /// </summary> /// <param name="matchAward">The data who's gamestrings will be updated.</param> /// <param name="version">The version directory to load the gamestrings from.</param> /// <param name="localization">The <see cref="Localization"/> of the gamestrings.</param> /// <exception cref="ArgumentNullException"><paramref name="matchAward"/> is null.</exception> /// <exception cref="ArgumentNullException"><paramref name="version"/> is null.</exception> public void UpdateGameString(MatchAward matchAward, HeroesDataVersion version, Localization localization) { if (matchAward is null) { throw new ArgumentNullException(nameof(matchAward)); } if (version is null) { throw new ArgumentNullException(nameof(version)); } (_, string gameStringPath) = GetDataAndGameStringPaths(version, true, localization, _matchAwardFileTemplateName, false, true); using GameStringDocument gameStringDocument = GameStringDocument.Parse(gameStringPath); matchAward.UpdateGameStrings(gameStringDocument); }