diff --git a/FFXIVAPP.Client/App.cs b/FFXIVAPP.Client/App.cs
index 058064e8..3ba435ec 100644
--- a/FFXIVAPP.Client/App.cs
+++ b/FFXIVAPP.Client/App.cs
@@ -192,12 +192,6 @@ private static void SettingsPropertyChanged(object sender, PropertyChangedEventA
case "CharacterName":
Constants.CharacterName = Settings.Default.CharacterName;
break;
- case "FirstName":
- Initializer.SetCharacter();
- break;
- case "LastName":
- Initializer.SetCharacter();
- break;
case "GameLanguage":
Constants.GameLanguage = Settings.Default.GameLanguage;
var lang = Settings.Default.GameLanguage.ToLower();
diff --git a/FFXIVAPP.Client/Initializer.cs b/FFXIVAPP.Client/Initializer.cs
index 72784058..823750cf 100644
--- a/FFXIVAPP.Client/Initializer.cs
+++ b/FFXIVAPP.Client/Initializer.cs
@@ -459,14 +459,6 @@ private static void SetHomePlugin(int pluginIndex)
ShellView.View.PluginsTC.SelectedIndex = pluginIndex;
}
- ///
- ///
- public static void SetCharacter()
- {
- var name = String.Format("{0} {1}", Settings.Default.FirstName, Settings.Default.LastName);
- Settings.Default.CharacterName = StringHelper.TrimAndCleanSpaces(name);
- }
-
///
///
public static void CheckUpdates()
diff --git a/FFXIVAPP.Client/Localization/Chinese.cs b/FFXIVAPP.Client/Localization/Chinese.cs
index e3805966..9f4ea91e 100644
--- a/FFXIVAPP.Client/Localization/Chinese.cs
+++ b/FFXIVAPP.Client/Localization/Chinese.cs
@@ -60,6 +60,7 @@ public static ResourceDictionary Context()
Dictionary.Add("app_DescriptionHeader", "描述");
Dictionary.Add("app_DescriptionLabel", "描述:");
Dictionary.Add("app_EnableNLogHeader", "用NLog开启记录");
+ Dictionary.Add("app_CharacterNameLabel", "Character Name:");
Dictionary.Add("app_FirstNameLabel", "名:");
Dictionary.Add("app_GameLanguageLabel", "游戏语言:");
Dictionary.Add("app_ImportLodestoneIDButtonText", "输入 磁石 ID");
diff --git a/FFXIVAPP.Client/Localization/English.cs b/FFXIVAPP.Client/Localization/English.cs
index d05ea4a2..6e13ef5a 100644
--- a/FFXIVAPP.Client/Localization/English.cs
+++ b/FFXIVAPP.Client/Localization/English.cs
@@ -60,6 +60,7 @@ public static ResourceDictionary Context()
Dictionary.Add("app_DescriptionHeader", "Description");
Dictionary.Add("app_DescriptionLabel", "Description:");
Dictionary.Add("app_EnableNLogHeader", "Enable Logging With NLog");
+ Dictionary.Add("app_CharacterNameLabel", "Character Name:");
Dictionary.Add("app_FirstNameLabel", "First Name:");
Dictionary.Add("app_GameLanguageLabel", "Game Language:");
Dictionary.Add("app_ImportLodestoneIDButtonText", "Import Lodestone ID");
diff --git a/FFXIVAPP.Client/Localization/French.cs b/FFXIVAPP.Client/Localization/French.cs
index 2d1171dc..f0b7b0af 100644
--- a/FFXIVAPP.Client/Localization/French.cs
+++ b/FFXIVAPP.Client/Localization/French.cs
@@ -60,6 +60,7 @@ public static ResourceDictionary Context()
Dictionary.Add("app_DescriptionHeader", "Description");
Dictionary.Add("app_DescriptionLabel", "Description:");
Dictionary.Add("app_EnableNLogHeader", "Activer le logging avec NLog");
+ Dictionary.Add("app_CharacterNameLabel", "Character Name:");
Dictionary.Add("app_FirstNameLabel", "Prénom:");
Dictionary.Add("app_GameLanguageLabel", "Langage du jeu:");
Dictionary.Add("app_ImportLodestoneIDButtonText", "Importer l'ID Lodestone");
diff --git a/FFXIVAPP.Client/Localization/German.cs b/FFXIVAPP.Client/Localization/German.cs
index 8fd8db65..ed7dc7c8 100644
--- a/FFXIVAPP.Client/Localization/German.cs
+++ b/FFXIVAPP.Client/Localization/German.cs
@@ -60,6 +60,7 @@ public static ResourceDictionary Context()
Dictionary.Add("app_DescriptionHeader", "Beschreibung");
Dictionary.Add("app_DescriptionLabel", "Beschreibung:");
Dictionary.Add("app_EnableNLogHeader", "Protokoll mit Nlog zulassen");
+ Dictionary.Add("app_CharacterNameLabel", "Character Name:");
Dictionary.Add("app_FirstNameLabel", "Virname:");
Dictionary.Add("app_GameLanguageLabel", "Spielsprache");
Dictionary.Add("app_ImportLodestoneIDButtonText", "Lodestone ID Importieren");
diff --git a/FFXIVAPP.Client/Localization/Japanese.cs b/FFXIVAPP.Client/Localization/Japanese.cs
index 25d09b51..3955f2f9 100644
--- a/FFXIVAPP.Client/Localization/Japanese.cs
+++ b/FFXIVAPP.Client/Localization/Japanese.cs
@@ -60,6 +60,7 @@ public static ResourceDictionary Context()
Dictionary.Add("app_DescriptionHeader", "内容");
Dictionary.Add("app_DescriptionLabel", "内容:");
Dictionary.Add("app_EnableNLogHeader", "NLogでのログ取得を有効にする");
+ Dictionary.Add("app_CharacterNameLabel", "名:");
Dictionary.Add("app_FirstNameLabel", "名前:");
Dictionary.Add("app_GameLanguageLabel", "表示言語:");
Dictionary.Add("app_ImportLodestoneIDButtonText", "Lodestone IDを取得する");
diff --git a/FFXIVAPP.Client/Memory/InventoryWorker.cs b/FFXIVAPP.Client/Memory/InventoryWorker.cs
index 163449fc..29d46848 100644
--- a/FFXIVAPP.Client/Memory/InventoryWorker.cs
+++ b/FFXIVAPP.Client/Memory/InventoryWorker.cs
@@ -38,7 +38,6 @@
using FFXIVAPP.Client.Properties;
using FFXIVAPP.Common.Core.Memory;
using FFXIVAPP.Common.Core.Memory.Enums;
-using FFXIVAPP.Common.Core.Constant;
using Newtonsoft.Json;
using NLog;
@@ -93,36 +92,7 @@ public void StopScanning()
#region Threads
public Stopwatch Stopwatch = new Stopwatch();
- // when CharacterName is not set in FFXIVAPP, get it from CHARMAP.
- private void SetCharacterName()
- {
- if (Settings.Default.CharacterName.Length == 0)
- {
- var characterAddressMap = MemoryHandler.Instance.SigScanner.Locations["CHARMAP"];
- uint characterAddress = MemoryHandler.Instance.GetUInt32(characterAddressMap);
- String tempName = MemoryHandler.Instance.GetString(characterAddress, 0x30);
- if (!tempName.Equals(Constants.CharacterName))
- {
- Constants.CharacterName = tempName;
- ConstantsEntity lce = new ConstantsEntity
- {
- AutoTranslate = Constants.AutoTranslate,
- CharacterName = Constants.CharacterName,
- ChatCodes = Constants.ChatCodes,
- ChatCodesXml = Constants.ChatCodesXml,
- Colors = Constants.Colors,
- CultureInfo = Constants.CultureInfo,
- EnableHelpLabels = Constants.EnableHelpLabels,
- GameLanguage = Constants.GameLanguage,
- ServerName = Constants.ServerName,
- Theme = Constants.Theme,
- UIScale = Constants.UIScale
- };
- AppContextHelper.Instance.RaiseNewConstants(lce);
- }
- }
-
- }
+
///
///
///
@@ -157,7 +127,6 @@ private void ScanTimerElapsed(object sender, ElapsedEventArgs e)
GetItems(InventoryPointerMap, Inventory.Container.EXTRA_EQ),
GetItems(InventoryPointerMap, Inventory.Container.CRYSTALS),
GetItems(InventoryPointerMap, Inventory.Container.QUESTS_KI),
-
GetItems(InventoryPointerMap, Inventory.Container.HIRE_1),
GetItems(InventoryPointerMap, Inventory.Container.HIRE_2),
GetItems(InventoryPointerMap, Inventory.Container.HIRE_3),
@@ -165,12 +134,10 @@ private void ScanTimerElapsed(object sender, ElapsedEventArgs e)
GetItems(InventoryPointerMap, Inventory.Container.HIRE_5),
GetItems(InventoryPointerMap, Inventory.Container.HIRE_6),
GetItems(InventoryPointerMap, Inventory.Container.HIRE_7),
-
GetItems(InventoryPointerMap, Inventory.Container.COMPANY_1),
GetItems(InventoryPointerMap, Inventory.Container.COMPANY_2),
GetItems(InventoryPointerMap, Inventory.Container.COMPANY_3),
GetItems(InventoryPointerMap, Inventory.Container.COMPANY_CRYSTALS),
-
GetItems(InventoryPointerMap, Inventory.Container.AC_MH),
GetItems(InventoryPointerMap, Inventory.Container.AC_OH),
GetItems(InventoryPointerMap, Inventory.Container.AC_HEAD),
@@ -205,7 +172,6 @@ private void ScanTimerElapsed(object sender, ElapsedEventArgs e)
}
if (notify)
{
- SetCharacterName();
AppContextHelper.Instance.RaiseNewInventoryEntries(inventoryEntities);
}
}
@@ -232,20 +198,20 @@ private InventoryEntity GetItems(uint address, Inventory.Container type)
Type = type
};
// The number of item is 50 in COMPANY's locker
- int MAX_AMOUNT;
+ int limit;
switch (type)
{
case Inventory.Container.COMPANY_1:
case Inventory.Container.COMPANY_2:
case Inventory.Container.COMPANY_3:
- MAX_AMOUNT = 3200;
+ limit = 3200;
break;
default:
- MAX_AMOUNT = 1600;
+ limit = 1600;
break;
}
- for (var ci = 0; ci < MAX_AMOUNT; ci += 64)
+ for (var ci = 0; ci < limit; ci += 64)
{
var itemOffset = (uint) (containerAddress + ci);
var id = MemoryHandler.Instance.GetUInt32(itemOffset, 0x8);
@@ -260,7 +226,7 @@ private InventoryEntity GetItems(uint address, Inventory.Container type)
Durability = MemoryHandler.Instance.GetUInt16(itemOffset, 0x12),
GlamourID = MemoryHandler.Instance.GetUInt32(itemOffset, 0x30),
//get the flag that show if the item is hq or not
- IsHQ = (MemoryHandler.Instance.GetByte(itemOffset, 0x14) == 0x01)? true:false
+ IsHQ = (MemoryHandler.Instance.GetByte(itemOffset, 0x14) == 0x01)
});
}
}
diff --git a/FFXIVAPP.Client/Memory/MonsterWorker.cs b/FFXIVAPP.Client/Memory/MonsterWorker.cs
index 9184426e..e402be64 100644
--- a/FFXIVAPP.Client/Memory/MonsterWorker.cs
+++ b/FFXIVAPP.Client/Memory/MonsterWorker.cs
@@ -176,6 +176,11 @@ private void ScanTimerElapsed(object sender, ElapsedEventArgs e)
entry.MapIndex = mapIndex;
if (i == 0)
{
+ var name = Settings.Default.CharacterName;
+ if (name != entry.Name || String.IsNullOrWhiteSpace(name))
+ {
+ Settings.Default.CharacterName = entry.Name;
+ }
if (targetAddress > 0)
{
uint currentTargetID;
diff --git a/FFXIVAPP.Client/ViewModels/SettingsViewModel.cs b/FFXIVAPP.Client/ViewModels/SettingsViewModel.cs
index 48483430..8c4e389d 100644
--- a/FFXIVAPP.Client/ViewModels/SettingsViewModel.cs
+++ b/FFXIVAPP.Client/ViewModels/SettingsViewModel.cs
@@ -121,7 +121,6 @@ public List AvailableAudioDevicesList
public ICommand DefaultSettingsCommand { get; private set; }
public ICommand ChangeAudioModeCommand { get; private set; }
public ICommand GetCICUIDCommand { get; private set; }
- public ICommand SaveCharacterCommand { get; private set; }
public ICommand ColorSelectionCommand { get; private set; }
public ICommand UpdateColorCommand { get; private set; }
@@ -135,7 +134,6 @@ public SettingsViewModel()
DefaultSettingsCommand = new DelegateCommand(DefaultSettings);
ChangeAudioModeCommand = new DelegateCommand(ChangeAudioMode);
GetCICUIDCommand = new DelegateCommand(GetCICUID);
- SaveCharacterCommand = new DelegateCommand(SaveCharacter);
ColorSelectionCommand = new DelegateCommand(ColorSelection);
UpdateColorCommand = new DelegateCommand(UpdateColor);
}
@@ -193,7 +191,6 @@ public static void ChangeAudioMode()
///
private static void GetCICUID()
{
- SaveCharacter();
var characterName = Settings.Default.CharacterName;
var serverName = Settings.Default.ServerName;
if (characterName.Replace(" ", "")
@@ -255,13 +252,6 @@ private static void LodestoneCallBack(IAsyncResult asyncResult)
Settings.Default.CICUID = result;
}
- ///
- ///
- private static void SaveCharacter()
- {
- Initializer.SetCharacter();
- }
-
///
///
private static void ColorSelection()
diff --git a/FFXIVAPP.Client/Views/SettingsView.xaml b/FFXIVAPP.Client/Views/SettingsView.xaml
index c8d93fe8..8eabe42b 100644
--- a/FFXIVAPP.Client/Views/SettingsView.xaml
+++ b/FFXIVAPP.Client/Views/SettingsView.xaml
@@ -204,21 +204,13 @@
-
-
-
-
diff --git a/distribution/FFXIVAPP.Client.exe b/distribution/FFXIVAPP.Client.exe
index cbab1bbf..eb31453a 100644
Binary files a/distribution/FFXIVAPP.Client.exe and b/distribution/FFXIVAPP.Client.exe differ
diff --git a/distribution/FFXIVAPP.Common.dll b/distribution/FFXIVAPP.Common.dll
index 8ad30c31..c064b4aa 100644
Binary files a/distribution/FFXIVAPP.Common.dll and b/distribution/FFXIVAPP.Common.dll differ
diff --git a/distribution/FFXIVAPP.IPluginInterface.dll b/distribution/FFXIVAPP.IPluginInterface.dll
index feeb86d2..d633ec33 100644
Binary files a/distribution/FFXIVAPP.IPluginInterface.dll and b/distribution/FFXIVAPP.IPluginInterface.dll differ
diff --git a/distribution/FFXIVAPP.Updater.exe b/distribution/FFXIVAPP.Updater.exe
index bf892b7a..f09a22fd 100644
Binary files a/distribution/FFXIVAPP.Updater.exe and b/distribution/FFXIVAPP.Updater.exe differ