Add a message when assembly version of Dalamud.dll changed

This commit is contained in:
goat 2019-11-24 22:58:22 +09:00
parent 0022c15fa1
commit 948b7b30b3
4 changed files with 17 additions and 3 deletions

View file

@ -118,6 +118,9 @@ namespace XIVLauncher.Dalamud
[CustomComboInfo("ES Painflare", "Change Energy Siphon into Painflare while you have Aetherflow stacks.", 27)] [CustomComboInfo("ES Painflare", "Change Energy Siphon into Painflare while you have Aetherflow stacks.", 27)]
SummonerESPainflareCombo = 1L << 40, SummonerESPainflareCombo = 1L << 40,
[CustomComboInfo("DWT", "DWT.", 27)]
SummonerDwtCombo = 1L << 50,
// SCHOLAR // SCHOLAR
[CustomComboInfo("Seraph Fey Blessing/Consolation", "Change Fey Blessing into Consolation when Seraph is out.", 28)] [CustomComboInfo("Seraph Fey Blessing/Consolation", "Change Fey Blessing into Consolation when Seraph is out.", 28)]
ScholarSeraphConsolationFeature = 1L << 29, ScholarSeraphConsolationFeature = 1L << 29,

View file

@ -25,6 +25,7 @@ namespace Dalamud
public List<FateInfo> Fates; public List<FateInfo> Fates;
public string LastVersion { get; set; }
public static DalamudConfiguration Load(string path) { public static DalamudConfiguration Load(string path) {
return JsonConvert.DeserializeObject<DalamudConfiguration>(File.ReadAllText(path)); return JsonConvert.DeserializeObject<DalamudConfiguration>(File.ReadAllText(path));

View file

@ -98,8 +98,20 @@ namespace Dalamud.Game {
ref StdString message, ref bool isHandled) { ref StdString message, ref bool isHandled) {
if (type == XivChatType.Notice && !this.hasSeenLoadingMsg) { if (type == XivChatType.Notice && !this.hasSeenLoadingMsg) {
this.dalamud.Framework.Gui.Chat.Print($"XIVLauncher in-game addon v{Assembly.GetAssembly(typeof(ChatHandlers)).GetName().Version} loaded."); var assemblyVersion = Assembly.GetAssembly(typeof(ChatHandlers)).GetName().Version.ToString();
this.dalamud.Framework.Gui.Chat.Print($"XIVLauncher in-game addon v{assemblyVersion} loaded.");
this.hasSeenLoadingMsg = true; this.hasSeenLoadingMsg = true;
if (string.IsNullOrEmpty(this.dalamud.Configuration.LastVersion) || !assemblyVersion.StartsWith(this.dalamud.Configuration.LastVersion)) {
this.dalamud.Framework.Gui.Chat.PrintChat(new XivChatEntry {
MessageBytes = Encoding.UTF8.GetBytes("The In-Game addon has been updated or was reinstalled successfully! Please check the discord for a full changelog."),
Type = XivChatType.Urgent
});
this.dalamud.Configuration.LastVersion = assemblyVersion;
this.dalamud.Configuration.Save(this.dalamud.StartInfo.ConfigurationPath);
}
} }
#if !DEBUG #if !DEBUG

View file

@ -465,7 +465,6 @@ namespace Dalamud.Game.Internal.Gui {
// DWT changes. // DWT changes.
// Now contains DWT, Deathflare, Summon Bahamut, Enkindle Bahamut, FBT, and Enkindle Phoenix. // Now contains DWT, Deathflare, Summon Bahamut, Enkindle Bahamut, FBT, and Enkindle Phoenix.
// What a monster of a button. // What a monster of a button.
/*
if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.SummonerDwtCombo)) { if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.SummonerDwtCombo)) {
if (actionID == 3581) { if (actionID == 3581) {
SMNGauge gauge = this.dalamud.ClientState.JobGauges.Get<SMNGauge>(); SMNGauge gauge = this.dalamud.ClientState.JobGauges.Get<SMNGauge>();
@ -483,7 +482,6 @@ namespace Dalamud.Game.Internal.Gui {
} }
} }
} }
*/
if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.SummonerDemiCombo)) { if (this.dalamud.Configuration.ComboPresets.HasFlag(CustomComboPreset.SummonerDemiCombo)) {
// Replace Deathflare with demi enkindles // Replace Deathflare with demi enkindles