Skip to content

Commit

Permalink
3.0.5589.24942
Browse files Browse the repository at this point in the history
  • Loading branch information
Icehunter committed Apr 22, 2015
1 parent 3e3a98f commit c23283c
Show file tree
Hide file tree
Showing 27 changed files with 1,636 additions and 460 deletions.
8 changes: 6 additions & 2 deletions FFXIVAPP.Client/Constants.cs
Expand Up @@ -32,7 +32,7 @@
using System.Diagnostics;
using System.Globalization;
using FFXIVAPP.Client.Helpers;
using FFXIVAPP.Client.Models;
using FFXIVAPP.Common.Core.Constant;

namespace FFXIVAPP.Client
{
Expand Down Expand Up @@ -69,7 +69,11 @@ public static partial class Constants
public static Dictionary<string, ActionInfo> Actions
{
get { return _actions ?? (_actions = new Dictionary<string, ActionInfo>()); }
set { _actions = value; }
set
{
_actions = value;
ConstantsHelper.UpdatePluginConstants();
}
}

public static Dictionary<string, string> AutoTranslate
Expand Down
19 changes: 14 additions & 5 deletions FFXIVAPP.Client/FFXIVAPP.Client.csproj
Expand Up @@ -147,13 +147,11 @@
<Compile Include="Localization\German.cs" />
<Compile Include="Localization\Japanese.cs" />
<Compile Include="Memory\ChatEntry.cs" />
<Compile Include="Memory\ActionWorker.cs" />
<Compile Include="Memory\ActorWorker.cs" />
<Compile Include="Memory\InventoryWorker.cs" />
<Compile Include="Memory\PartyInfoWorker.cs" />
<Compile Include="Memory\TargetWorker.cs" />
<Compile Include="Memory\PlayerInfoWorker.cs" />
<Compile Include="Models\ActionInfo.cs" />
<Compile Include="Models\BuildNumber.cs" />
<Compile Include="Models\PluginDownloadItem.cs" />
<Compile Include="Models\PluginFile.cs" />
Expand Down Expand Up @@ -181,6 +179,20 @@
<Compile Include="Models\PluginSourceItem.cs" />
<Compile Include="Models\PluginStatus.cs" />
<Compile Include="Models\WindowsMessageEvents.cs" />
<Compile Include="Network\IPHelper.cs" />
<Compile Include="Network\NetworkWorker.cs" />
<Compile Include="Network\DNSHeader.cs" />
<Compile Include="Network\TCPRow.cs" />
<Compile Include="Network\TCPTable.cs" />
<Compile Include="Network\ServerConnection.cs" />
<Compile Include="Network\SocketObject.cs" />
<Compile Include="Network\IPHeader.cs" />
<Compile Include="Network\NetworkConnection.cs" />
<Compile Include="Network\NetworkPacket.cs" />
<Compile Include="Network\Protocol.cs" />
<Compile Include="Network\TCPHeader.cs" />
<Compile Include="Network\UDPHeader.cs" />
<Compile Include="Network\UnsafeNativeMethods.cs" />
<Compile Include="PluginHost.cs" />
<Compile Include="Models\PluginInstance.cs" />
<Compile Include="PluginInitializer.cs" />
Expand All @@ -190,15 +202,12 @@
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<Compile Include="Utilities\BuildUtilities.cs" />
<Compile Include="Utilities\FlyingTextEntry.cs" />
<Compile Include="Utilities\OutGoingActionEntry.cs" />
<Compile Include="Reflection\AssemblyReflectionProxy.cs" />
<Compile Include="Reflection\AssemblyReflectionManager.cs" />
<Compile Include="SettingsProviders\Application\Settings.cs" />
<Compile Include="ShellViewModel.cs" />
<Compile Include="Helpers\SettingsHelper.cs" />
<Compile Include="Utilities\CommandBuilder.cs" />
<Compile Include="Utilities\IncomingActionEntry.cs" />
<Compile Include="Utilities\LogPublisher.cs" />
<Compile Include="Utilities\MicroStopwatch.cs" />
<Compile Include="Utilities\MicroTimer.cs" />
Expand Down
15 changes: 15 additions & 0 deletions FFXIVAPP.Client/Helpers/ActorEntityHelper.cs
Expand Up @@ -29,6 +29,7 @@

using System;
using System.Collections.Generic;
using System.Linq;
using FFXIVAPP.Client.Delegates;
using FFXIVAPP.Client.Memory;
using FFXIVAPP.Client.Properties;
Expand Down Expand Up @@ -189,13 +190,27 @@ public static ActorEntity ResolveActorFromBytes(byte[] source, bool isCurrentUse
Buffer.BlockCopy(statusesSource, i * statusSize, statusSource, 0, statusSize);
var statusEntry = new StatusEntry
{
TargetEntity = entry,
TargetName = entry.Name,
StatusID = BitConverter.ToInt16(statusSource, 0x0),
Stacks = statusSource[0x2],
Duration = BitConverter.ToSingle(statusSource, 0x4),
CasterID = BitConverter.ToUInt32(statusSource, 0x8)
};
try
{
var pc = PCWorkerDelegate.GetUniqueNPCEntities()
.FirstOrDefault(a => a.ID == statusEntry.CasterID);
var npc = NPCWorkerDelegate.GetUniqueNPCEntities()
.FirstOrDefault(a => a.NPCID2 == statusEntry.CasterID);
var monster = MonsterWorkerDelegate.GetUniqueNPCEntities()
.FirstOrDefault(a => a.ID == statusEntry.CasterID);
statusEntry.SourceEntity = (pc ?? npc) ?? monster;
}
catch (Exception ex)
{
}
try
{
var statusInfo = StatusEffectHelper.StatusInfo(statusEntry.StatusID);
statusEntry.IsCompanyAction = statusInfo.CompanyAction;
Expand Down
7 changes: 7 additions & 0 deletions FFXIVAPP.Client/Helpers/AppContextHelper.cs
Expand Up @@ -33,6 +33,7 @@
using FFXIVAPP.Client.Delegates;
using FFXIVAPP.Common.Core.Constant;
using FFXIVAPP.Common.Core.Memory;
using FFXIVAPP.Common.Core.Network;
using NLog;

namespace FFXIVAPP.Client.Helpers
Expand Down Expand Up @@ -214,5 +215,11 @@ public void RaiseNewInventoryEntries(List<InventoryEntity> inventoryEntities)
// THIRD PARTY
PluginHost.Instance.RaiseNewInventoryEntries(inventoryEntities);
}

public void RaiseNewPacket(NetworkPacket networkPacket)
{
// THIRD PARTY
PluginHost.Instance.RaiseNewNetworkPacket(networkPacket);
}
}
}
1 change: 1 addition & 0 deletions FFXIVAPP.Client/Helpers/ConstantsHelper.cs
Expand Up @@ -44,6 +44,7 @@ public static void UpdatePluginConstants()
AutoTranslate = Constants.AutoTranslate,
CharacterName = Constants.CharacterName,
ChatCodes = Constants.ChatCodes,
Actions = Constants.Actions,
ChatCodesXml = Constants.ChatCodesXml,
Colors = Constants.Colors,
CultureInfo = Constants.CultureInfo,
Expand Down
19 changes: 10 additions & 9 deletions FFXIVAPP.Client/Initializer.cs
Expand Up @@ -42,10 +42,12 @@
using FFXIVAPP.Client.Helpers;
using FFXIVAPP.Client.Memory;
using FFXIVAPP.Client.Models;
using FFXIVAPP.Client.Network;
using FFXIVAPP.Client.Properties;
using FFXIVAPP.Client.Utilities;
using FFXIVAPP.Client.ViewModels;
using FFXIVAPP.Client.Views;
using FFXIVAPP.Common.Core.Constant;
using FFXIVAPP.Common.Helpers;
using Newtonsoft.Json.Linq;
using NLog;
Expand All @@ -62,14 +64,14 @@ internal static class Initializer

#region Declarations

private static ActionWorker _actionWorker;
private static ActorWorker _actorWorker;
private static ChatLogWorker _chatLogWorker;
private static MonsterWorker _monsterWorker;
private static PlayerInfoWorker _playerInfoWorker;
private static TargetWorker _targetWorker;
private static PartyInfoWorker _partyInfoWorker;
private static InventoryWorker _inventoryWorker;
private static NetworkWorker _networkWorker;

#endregion

Expand Down Expand Up @@ -589,7 +591,6 @@ public static void CheckUpdates()
updateCheck.BeginInvoke(null, null);
}


/// <summary>
/// </summary>
public static void SetSignatures()
Expand Down Expand Up @@ -792,8 +793,6 @@ public static void StartMemoryWorkers()
MemoryHandler.Instance.SigScanner.LoadOffsets(AppViewModel.Instance.Signatures);
_chatLogWorker = new ChatLogWorker();
_chatLogWorker.StartScanning();
//_actionWorker = new ActionWorker();
//_actionWorker.StartScanning();
_actorWorker = new ActorWorker();
_actorWorker.StartScanning();
_monsterWorker = new MonsterWorker();
Expand All @@ -806,6 +805,8 @@ public static void StartMemoryWorkers()
_partyInfoWorker.StartScanning();
_inventoryWorker = new InventoryWorker();
_inventoryWorker.StartScanning();
_networkWorker = new NetworkWorker();
_networkWorker.StartScanning();
}

public static void UpdatePluginConstants()
Expand All @@ -822,11 +823,6 @@ public static void StopMemoryWorkers()
_chatLogWorker.StopScanning();
_chatLogWorker.Dispose();
}
if (_actionWorker != null)
{
_actionWorker.StopScanning();
_actionWorker.Dispose();
}
if (_actorWorker != null)
{
_actorWorker.StopScanning();
Expand Down Expand Up @@ -857,6 +853,11 @@ public static void StopMemoryWorkers()
_inventoryWorker.StopScanning();
_inventoryWorker.Dispose();
}
if (_networkWorker != null)
{
_networkWorker.StopScanning();
_networkWorker.Dispose();
}
}
}
}

0 comments on commit c23283c

Please sign in to comment.