Skip to content

Commit

Permalink
Merge pull request #59 from Icehunter/3.0-changes
Browse files Browse the repository at this point in the history
3.0 changes
  • Loading branch information
Icehunter committed Jun 29, 2015
2 parents c4e8c89 + cb6e786 commit 4b43fdf
Show file tree
Hide file tree
Showing 27 changed files with 391 additions and 109 deletions.
8 changes: 7 additions & 1 deletion FFXIVAPP.Client/AppBootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
using System.Runtime.CompilerServices;
using System.Timers;
using FFXIVAPP.Client.Models;
using FFXIVAPP.Client.Properties;
using FFXIVAPP.Client.Views;
using FFXIVAPP.Common.Utilities;
using NLog;
Expand Down Expand Up @@ -147,6 +146,13 @@ private AppBootstrapper()
Title = "中國",
CultureInfo = new CultureInfo("zh")
});
AppViewModel.Instance.UILanguages.Add(new UILanguage
{
Language = "Russian",
ImageURI = "/FFXIVAPP.Client;component/Resources/Media/Icons/ru.png",
Title = "Русский",
CultureInfo = new CultureInfo("ru")
});

#endregion

Expand Down
2 changes: 1 addition & 1 deletion FFXIVAPP.Client/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static partial class Constants

public static readonly string[] Supported =
{
"ja", "fr", "en", "de", "zh"
"ja", "fr", "en", "de", "zh", "ru"
};

public static StringComparison InvariantComparer = StringComparison.InvariantCultureIgnoreCase;
Expand Down
4 changes: 3 additions & 1 deletion FFXIVAPP.Client/FFXIVAPP.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@
<Compile Include="Localization\French.cs" />
<Compile Include="Localization\German.cs" />
<Compile Include="Localization\Japanese.cs" />
<Compile Include="Memory\ChatEntry.cs" />
<Compile Include="Localization\Russian.cs" />
<Compile Include="Memory\ChatEntry.cs" />
<Compile Include="Memory\ActorWorker.cs" />
<Compile Include="Memory\InventoryWorker.cs" />
<Compile Include="Memory\PartyInfoWorker.cs" />
Expand Down Expand Up @@ -292,6 +293,7 @@
<Compile Include="Properties\AssemblyInfo.cs">
<SubType>Code</SubType>
</Compile>
<Resource Include="Resources\Media\Icons\ru.png" />
<Resource Include="Resources\Media\Icons\cn.png" />
<Resource Include="Resources\Media\Icons\fr.png" />
<Resource Include="Resources\Media\Icons\ja.png" />
Expand Down
28 changes: 14 additions & 14 deletions FFXIVAPP.Client/Helpers/ActorEntityHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,21 +124,21 @@ public static ActorEntity ResolveActorFromBytes(byte[] source, bool isCurrentUse
entry.ClaimedByID = BitConverter.ToUInt32(source, 0x180); // 0x1A0);
targetID = BitConverter.ToUInt32(source, 0x188); // 0x1A8);
pcTargetID = BitConverter.ToUInt32(source, 0x938); // 0xAA8);
entry.Job = (Actor.Job) source[0x1540]; // 0x17C0];
entry.Level = source[0x1541]; // 0x17C1];
entry.GrandCompany = source[0x1543]; // 0x17C3];
entry.GrandCompanyRank = source[0x1544]; //0x17C4];
entry.Job = (Actor.Job) source[0x14C0]; // 0x17C0];
entry.Level = source[0x14C1]; // 0x17C1];
entry.GrandCompany = source[0x14C3]; // 0x17C3];
entry.GrandCompanyRank = source[0x14C4]; //0x17C4];
entry.Title = source[0x1546]; //0x17C6];
entry.HPCurrent = BitConverter.ToInt32(source, 0x1548); // 0x17C8);
entry.HPMax = BitConverter.ToInt32(source, 0x154C); // 0x17CC);
entry.MPCurrent = BitConverter.ToInt32(source, 0x1550); // 0x17D0);
entry.MPMax = BitConverter.ToInt32(source, 0x1554); // 0x17D4);
entry.TPCurrent = BitConverter.ToInt16(source, 0x1558); // 0x17D8);
entry.HPCurrent = BitConverter.ToInt32(source, 0x14C8); // 0x17C8);
entry.HPMax = BitConverter.ToInt32(source, 0x14CC); // 0x17CC);
entry.MPCurrent = BitConverter.ToInt32(source, 0x14D0); // 0x17D0);
entry.MPMax = BitConverter.ToInt32(source, 0x14D4); // 0x17D4);
entry.TPCurrent = BitConverter.ToInt16(source, 0x14D8); // 0x17D8);
entry.TPMax = 1000;
entry.GPCurrent = BitConverter.ToInt16(source, 0x155A); // 0x17DA);
entry.GPMax = BitConverter.ToInt16(source, 0x155C); // 0x17DC);
entry.CPCurrent = BitConverter.ToInt16(source, 0x155E); // 0x17DE);
entry.CPMax = BitConverter.ToInt16(source, 0x1560); // 0x17E0);
entry.GPCurrent = BitConverter.ToInt16(source, 0x14DA); // 0x17DA);
entry.GPMax = BitConverter.ToInt16(source, 0x14DC); // 0x17DC);
entry.CPCurrent = BitConverter.ToInt16(source, 0x14DE); // 0x17DE);
entry.CPMax = BitConverter.ToInt16(source, 0x14E0); // 0x17E0);
entry.Race = source[0x2808]; // ??
entry.Sex = (Actor.Sex) source[0x2809]; //?
entry.IsCasting = BitConverter.ToBoolean(source, 0x2A30); // 0x2C90);
Expand Down Expand Up @@ -181,7 +181,7 @@ public static ActorEntity ResolveActorFromBytes(byte[] source, bool isCurrentUse
Buffer.BlockCopy(source, 0x3168, statusesSource, 0, limit * 12);
break;
default:
Buffer.BlockCopy(source, 0x28BC, statusesSource, 0, limit * 12);
Buffer.BlockCopy(source, 0x2878, statusesSource, 0, limit * 12);
break;
}
for (var i = 0; i < limit; i++)
Expand Down
6 changes: 5 additions & 1 deletion FFXIVAPP.Client/Helpers/LocaleHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ public static void Update(CultureInfo cultureInfo)
case "zh":
dictionary = Chinese.Context();
break;
case "ru":
dictionary = Russian.Context();
break;
default:
dictionary = English.Context();
break;
Expand All @@ -73,7 +76,8 @@ public static void Update(CultureInfo cultureInfo)
var locale = dictionary.Cast<DictionaryEntry>()
.ToDictionary(item => (string) item.Key, item => (string) item.Value);
AppViewModel.Instance.Locale = locale;
foreach (var pluginInstance in App.Plugins.Loaded.Cast<PluginInstance>().Where(pluginInstance => pluginInstance.Loaded))
foreach (var pluginInstance in App.Plugins.Loaded.Cast<PluginInstance>()
.Where(pluginInstance => pluginInstance.Loaded))
{
pluginInstance.Instance.Locale = locale;
}
Expand Down
32 changes: 19 additions & 13 deletions FFXIVAPP.Client/Initializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -674,31 +674,37 @@ public static void SetSignatures()
{
Key = "GAMEMAIN",
Value = "47616D654D61696E000000",
Offset = 1260 // pre 2.5 = 1248
Offset = 1344 // pre 3.0 = 1260
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "CHARMAP",
Value = "FFFFFFFF????????DB0FC93FDB0F49416F12833A00000000????????DB0FC93FDB0F49416F12833A00000000",
Offset = 44
Value = "DB0F49416F12833AFFFFFFFF00000000000000000000000000000000????????DB0FC940AAAA26416D30763FDB0FC93FDB0F49416F12833A",
Offset = 476 // pre 3.0 2.4
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "ENMITYMAP",
Value = "FFFFFFFF000000000000000000000000000000000000000000000000DB0FC940AAAA26416D30763FDB0FC93FDB0F49416F12833AFFFFFFFF",
Offset = 14964 // pre 3.0 2.4
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "NPCMAP",
Value = "3E000000????????4000000001000000000000000001000000",
Offset = 2748
Offset = 3524 // pre 3.0 = 2748
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "ACTORMAP",
Value = "3E000000????????4000000001000000000000000001000000",
Offset = 1348 // pre-2.5 = 1316
Offset = 1644 // pre-3.0 = 1348
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "PARTYMAP",
Value = "DB0F49416F12833A0000000000000000000000000000000000000000000000000000000000000000????????DB0FC93F",
Offset = 92
Value = "00000000DB0FC940AAAA26416D30763FDB0FC93FDB0F49416F12833AFFFFFFFFDB0FC940AAAA26416D30763FDB0FC93FDB0F49416F12833A00000000",
Offset = 80
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Expand All @@ -709,20 +715,20 @@ public static void SetSignatures()
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "MAP",
Value = "F783843E????????????????FFFFFFFF????????DB0FC93FDB0F49416F12833A",
Offset = 820
Value = "F783843E????????????????FFFFFFFFDB0FC940AAAA26416D30763FDB0FC93F",
Offset = 2052
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "TARGET",
Value = "403F00000000000000000000000000000000????0000????000000000000??000000????????DB0FC93FDB0F49416F12833A",
Offset = 218
Value = "403F00000000000000000000000000000000????0000????000000000000??000000????????DB0FC940AAAA26416D30763F",
Offset = 238
});
AppViewModel.Instance.Signatures.Add(new Signature
{
Key = "INVENTORY",
Value = "DB0FC93FDB0F49416F1283??FFFFFFFF00000000??00??00??00??00??????00??00????0000????????????DB0FC93FDB0F49416F12833A",
Offset = 60
Value = "0000??00000000000000DB0FC940AAAA26416D30763FDB0FC93FDB0F49416F12833AFFFFFFFF00000000??00??00??00??00??????00??00????0000????????????",
Offset = 106
});
break;
}
Expand Down
15 changes: 15 additions & 0 deletions FFXIVAPP.Client/Localization/Chinese.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ public static ResourceDictionary Context()
Dictionary.Add("app_UILanguageChangeWarningGeneral", "Do you want to change the GameLanguage setting as well to match this applications UILanguage? If you cancel you will manually have to change GameLanguage in Settings later.");
Dictionary.Add("app_UILanguageChangeWarningChinese", " When changing to or from Chinese an application restart is also required.");
Dictionary.Add("app_UILanguageChangeWarningNoGameLanguage", "The selected UILanguage does not have a supported GameLanguage. Please choose your game language in Settings.");
Dictionary.Add("app_UIScaleHeader", "UI.Scale");
Dictionary.Add("app_HomePluginLabel", "Home Plugin");
Dictionary.Add("app_ProcessSelectedInfo", "*Only use this if you restarted the game or are dual-boxing.");
Dictionary.Add("app_PALSettingsTabHeader", "Performance & Logging");
Dictionary.Add("app_DefNetInterfaceLabel", "Default Network Interface (Packet Reading)");
Dictionary.Add("app_EnableNetReadingLabel", "Enable Network Reading");
Dictionary.Add("app_BTNResNetWorker", "Reset Network Worker");
Dictionary.Add("app_DefAudioDeviceLabel", "Default Audio Device");
Dictionary.Add("app_MemScanSpeedLabel", "Memory Scanning Speed (Milliseconds)");
Dictionary.Add("app_ActorMSSLabel", "Actor (NPCs &amp; Other)");
Dictionary.Add("app_ChatLogMSSLabel", "ChatLog");
Dictionary.Add("app_MonstersPCMSSLabel", "Monsters &amp; PCs");
Dictionary.Add("app_PlayerInfMSSLabel", "Player Info (YOU)");
Dictionary.Add("app_TargEnmMSSLabel", "Targets &amp; Enmity");
Dictionary.Add("app_InvMSSLabel", "Inventory");
return Dictionary;
}
}
Expand Down
16 changes: 16 additions & 0 deletions FFXIVAPP.Client/Localization/English.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,22 @@ public static ResourceDictionary Context()
Dictionary.Add("app_UILanguageChangeWarningGeneral", "Do you want to change the GameLanguage setting as well to match this applications UILanguage? If you cancel you will manually have to change GameLanguage in Settings later.");
Dictionary.Add("app_UILanguageChangeWarningChinese", " When changing to or from Chinese an application restart is also required.");
Dictionary.Add("app_UILanguageChangeWarningNoGameLanguage", "The selected UILanguage does not have a supported GameLanguage. Please choose your game language in Settings.");
Dictionary.Add("app_UIScaleHeader", "UI.Scale");
Dictionary.Add("app_HomePluginLabel", "Home Plugin");
Dictionary.Add("app_ProcessSelectedInfo", "*Only use this if you restarted the game or are dual-boxing.");
Dictionary.Add("app_PALSettingsTabHeader", "Performance & Logging");
Dictionary.Add("app_DefNetInterfaceLabel", "Default Network Interface (Packet Reading)");
Dictionary.Add("app_EnableNetReadingLabel", "Enable Network Reading");
Dictionary.Add("app_BTNResNetWorker", "Reset Network Worker");
Dictionary.Add("app_DefAudioDeviceLabel", "Default Audio Device");
Dictionary.Add("app_MemScanSpeedLabel", "Memory Scanning Speed (Milliseconds)");
Dictionary.Add("app_ActorMSSLabel", "Actor (NPCs &amp; Other)");
Dictionary.Add("app_ChatLogMSSLabel", "ChatLog");
Dictionary.Add("app_MonstersPCMSSLabel", "Monsters &amp; PCs");
Dictionary.Add("app_PartyInfMSSLabel", "Party Info");
Dictionary.Add("app_PlayerInfMSSLabel", "Player Info (YOU)");
Dictionary.Add("app_TargEnmMSSLabel", "Targets &amp; Enmity");
Dictionary.Add("app_InvMSSLabel", "Inventory");
return Dictionary;
}
}
Expand Down
15 changes: 15 additions & 0 deletions FFXIVAPP.Client/Localization/French.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ public static ResourceDictionary Context()
Dictionary.Add("app_UILanguageChangeWarningGeneral", "Do you want to change the GameLanguage setting as well to match this applications UILanguage? If you cancel you will manually have to change GameLanguage in Settings later.");
Dictionary.Add("app_UILanguageChangeWarningChinese", " When changing to or from Chinese an application restart is also required.");
Dictionary.Add("app_UILanguageChangeWarningNoGameLanguage", "The selected UILanguage does not have a supported GameLanguage. Please choose your game language in Settings.");
Dictionary.Add("app_UIScaleHeader", "UI.Scale");
Dictionary.Add("app_HomePluginLabel", "Home Plugin");
Dictionary.Add("app_ProcessSelectedInfo", "*Only use this if you restarted the game or are dual-boxing.");
Dictionary.Add("app_PALSettingsTabHeader", "Performance & Logging");
Dictionary.Add("app_DefNetInterfaceLabel", "Default Network Interface (Packet Reading)");
Dictionary.Add("app_EnableNetReadingLabel", "Enable Network Reading");
Dictionary.Add("app_BTNResNetWorker", "Reset Network Worker");
Dictionary.Add("app_DefAudioDeviceLabel", "Default Audio Device");
Dictionary.Add("app_MemScanSpeedLabel", "Memory Scanning Speed (Milliseconds)");
Dictionary.Add("app_ActorMSSLabel", "Actor (NPCs &amp; Other)");
Dictionary.Add("app_ChatLogMSSLabel", "ChatLog");
Dictionary.Add("app_MonstersPCMSSLabel", "Monsters &amp; PCs");
Dictionary.Add("app_PlayerInfMSSLabel", "Player Info (YOU)");
Dictionary.Add("app_TargEnmMSSLabel", "Targets &amp; Enmity");
Dictionary.Add("app_InvMSSLabel", "Inventory");
return Dictionary;
}
}
Expand Down
15 changes: 15 additions & 0 deletions FFXIVAPP.Client/Localization/German.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ public static ResourceDictionary Context()
Dictionary.Add("app_UILanguageChangeWarningGeneral", "Do you want to change the GameLanguage setting as well to match this applications UILanguage? If you cancel you will manually have to change GameLanguage in Settings later.");
Dictionary.Add("app_UILanguageChangeWarningChinese", " When changing to or from Chinese an application restart is also required.");
Dictionary.Add("app_UILanguageChangeWarningNoGameLanguage", "The selected UILanguage does not have a supported GameLanguage. Please choose your game language in Settings.");
Dictionary.Add("app_UIScaleHeader", "UI.Scale");
Dictionary.Add("app_HomePluginLabel", "Home Plugin");
Dictionary.Add("app_ProcessSelectedInfo", "*Only use this if you restarted the game or are dual-boxing.");
Dictionary.Add("app_PALSettingsTabHeader", "Performance & Logging");
Dictionary.Add("app_DefNetInterfaceLabel", "Default Network Interface (Packet Reading)");
Dictionary.Add("app_EnableNetReadingLabel", "Enable Network Reading");
Dictionary.Add("app_BTNResNetWorker", "Reset Network Worker");
Dictionary.Add("app_DefAudioDeviceLabel", "Default Audio Device");
Dictionary.Add("app_MemScanSpeedLabel", "Memory Scanning Speed (Milliseconds)");
Dictionary.Add("app_ActorMSSLabel", "Actor (NPCs &amp; Other)");
Dictionary.Add("app_ChatLogMSSLabel", "ChatLog");
Dictionary.Add("app_MonstersPCMSSLabel", "Monsters &amp; PCs");
Dictionary.Add("app_PlayerInfMSSLabel", "Player Info (YOU)");
Dictionary.Add("app_TargEnmMSSLabel", "Targets &amp; Enmity");
Dictionary.Add("app_InvMSSLabel", "Inventory");
return Dictionary;
}
}
Expand Down
15 changes: 15 additions & 0 deletions FFXIVAPP.Client/Localization/Japanese.cs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ public static ResourceDictionary Context()
Dictionary.Add("app_UILanguageChangeWarningGeneral", "Do you want to change the GameLanguage setting as well to match this applications UILanguage? If you cancel you will manually have to change GameLanguage in Settings later.");
Dictionary.Add("app_UILanguageChangeWarningChinese", " When changing to or from Chinese an application restart is also required.");
Dictionary.Add("app_UILanguageChangeWarningNoGameLanguage", "The selected UILanguage does not have a supported GameLanguage. Please choose your game language in Settings.");
Dictionary.Add("app_UIScaleHeader", "UI.Scale");
Dictionary.Add("app_HomePluginLabel", "Home Plugin");
Dictionary.Add("app_ProcessSelectedInfo", "*Only use this if you restarted the game or are dual-boxing.");
Dictionary.Add("app_PALSettingsTabHeader", "Performance & Logging");
Dictionary.Add("app_DefNetInterfaceLabel", "Default Network Interface (Packet Reading)");
Dictionary.Add("app_EnableNetReadingLabel", "Enable Network Reading");
Dictionary.Add("app_BTNResNetWorker", "Reset Network Worker");
Dictionary.Add("app_DefAudioDeviceLabel", "Default Audio Device");
Dictionary.Add("app_MemScanSpeedLabel", "Memory Scanning Speed (Milliseconds)");
Dictionary.Add("app_ActorMSSLabel", "Actor (NPCs &amp; Other)");
Dictionary.Add("app_ChatLogMSSLabel", "ChatLog");
Dictionary.Add("app_MonstersPCMSSLabel", "Monsters &amp; PCs");
Dictionary.Add("app_PlayerInfMSSLabel", "Player Info (YOU)");
Dictionary.Add("app_TargEnmMSSLabel", "Targets &amp; Enmity");
Dictionary.Add("app_InvMSSLabel", "Inventory");
return Dictionary;
}
}
Expand Down
Loading

0 comments on commit 4b43fdf

Please sign in to comment.