From 6427dca8124544e650204f69f5e3411e1ec4809f Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 22 May 2015 02:10:50 +0200 Subject: [PATCH 1/9] Update FFXIGameInstance.cs Update for getting back target lines functionality that was lost at some point. --- Source/FFXIGameInstance.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/FFXIGameInstance.cs b/Source/FFXIGameInstance.cs index 52f1491..c2e41e5 100644 --- a/Source/FFXIGameInstance.cs +++ b/Source/FFXIGameInstance.cs @@ -670,6 +670,7 @@ public override void Update() base.Name = info.DisplayName; base.Level = -1; //level is never known in FFXI base.Distance = 0; + base.TargetIndex = info.TargetIndex; base.PetIndex = info.PetIndex; base.Attackable = true; From 7a5602f393297da5994813fe2d960c56669191bf Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 22 May 2015 02:13:31 +0200 Subject: [PATCH 2/9] Update GameData.cs Update for getting back target lines functionality that was lost at some point. --- Source/Engine/GameData.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Engine/GameData.cs b/Source/Engine/GameData.cs index 5f60818..ecbfa8d 100644 --- a/Source/Engine/GameData.cs +++ b/Source/Engine/GameData.cs @@ -244,6 +244,7 @@ public GameSpawn(uint ID) Icon = null; FillColor = Color.Black; ClaimID = 0; + TargetIndex = 0; PetIndex = 0; GroupMember = false; RaidMember = false; @@ -272,6 +273,7 @@ public GameSpawn(uint ID) public Image Icon { get; protected set; } public Color FillColor { get; protected set; } public uint ClaimID { get; set; } + public uint TargetIndex { get; set; } public uint PetIndex { get; set; } public bool RaidMember { get; set; } public bool GroupMember { get; set; } @@ -281,4 +283,4 @@ public GameSpawn(uint ID) //prototype for derived classes public virtual void Update() { } } -} \ No newline at end of file +} From 0c760b973b4867f338a4f68a299f4396569dd4ba Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 22 May 2015 02:19:23 +0200 Subject: [PATCH 3/9] Update Engine.cs Update for getting back target lines functionality that was lost at some point. --- Source/Engine/Engine.cs | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/Source/Engine/Engine.cs b/Source/Engine/Engine.cs index 790b15f..d10bd30 100644 --- a/Source/Engine/Engine.cs +++ b/Source/Engine/Engine.cs @@ -1766,6 +1766,44 @@ private void DrawSpawns(Graphics g) g.DrawLine(pPetChain, headX - offX, headY - offY, tailX, tailY); DrawArrowHead(g, pPetChain, headX - offX, headY - offY, rads, 10f, 5f); } + if (m_drawPetLines && spawn.TargetIndex > 0 && m_game.Spawns.ContainsIndex(spawn.TargetIndex)) + { + if (spawn != m_game.Player) + { + GameSpawn target = m_game.Spawns[spawn.TargetIndex]; + float headX = CalcClientCoordX(target.Location.X); + float headY = CalcClientCoordY(target.Location.Y); + float tailX = CalcClientCoordX(spawn.Location.X); + float tailY = CalcClientCoordY(spawn.Location.Y); + float rads = (float)Math.Atan2(headY - tailY, headX - tailX); //calculate the line angle + float size = 0; + switch (spawn.Type) + { + case SpawnType.Player: + size = m_playerSize; + break; + case SpawnType.NPC: + size = m_NPCSize; + break; + case SpawnType.MOB: + size = m_MOBSize; + break; + case SpawnType.Hidden: + size = m_HiddenSize; + break; + default: + size = 4.0f; + break; + } + + float offX = (size * (float)Math.Cos(rads)); //move the line and arrow out a bit so its not in the dead center + float offY = (size * (float)Math.Sin(rads)); + + //draw ze lines + g.DrawLine(pPetChain, headX - offX, headY - offY, tailX, tailY); + DrawArrowHead(g, pPetChain, headX - offX, headY - offY, rads, 10f, 5f); + } + } if (m_drawClaimLines && spawn.ClaimID > 0 && m_game.Spawns.ContainsIndex(spawn.ClaimID)) { GameSpawn claimee = m_game.Spawns[spawn.ClaimID]; @@ -2124,4 +2162,4 @@ private void m_game_Updated() UpdateMap(); } } -} \ No newline at end of file +} From 5f9ee7978668fb976505e0e1240303520b345c6c Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 22 May 2015 02:26:48 +0200 Subject: [PATCH 4/9] Update Engine.cs damn last lines --- Source/Engine/Engine.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Engine/Engine.cs b/Source/Engine/Engine.cs index d10bd30..d105116 100644 --- a/Source/Engine/Engine.cs +++ b/Source/Engine/Engine.cs @@ -2163,3 +2163,4 @@ private void m_game_Updated() } } } + From 8f5f65c23b6446e193fea74c3ea764deb6f7f01a Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 22 May 2015 02:34:19 +0200 Subject: [PATCH 5/9] Update GameData.cs damn last lines --- Source/Engine/GameData.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Engine/GameData.cs b/Source/Engine/GameData.cs index ecbfa8d..270bc53 100644 --- a/Source/Engine/GameData.cs +++ b/Source/Engine/GameData.cs @@ -284,3 +284,4 @@ public GameSpawn(uint ID) public virtual void Update() { } } } + From 2e5dad29be41145754649612342ba8c45bc0dd2b Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Fri, 22 May 2015 15:25:28 +0200 Subject: [PATCH 6/9] correct indentation correct indentation --- Source/Engine/Engine.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Engine/Engine.cs b/Source/Engine/Engine.cs index d105116..6242255 100644 --- a/Source/Engine/Engine.cs +++ b/Source/Engine/Engine.cs @@ -1768,7 +1768,7 @@ private void DrawSpawns(Graphics g) } if (m_drawPetLines && spawn.TargetIndex > 0 && m_game.Spawns.ContainsIndex(spawn.TargetIndex)) { - if (spawn != m_game.Player) + if (spawn != m_game.Player) { GameSpawn target = m_game.Spawns[spawn.TargetIndex]; float headX = CalcClientCoordX(target.Location.X); @@ -1795,10 +1795,10 @@ private void DrawSpawns(Graphics g) size = 4.0f; break; } - + float offX = (size * (float)Math.Cos(rads)); //move the line and arrow out a bit so its not in the dead center float offY = (size * (float)Math.Sin(rads)); - + //draw ze lines g.DrawLine(pPetChain, headX - offX, headY - offY, tailX, tailY); DrawArrowHead(g, pPetChain, headX - offX, headY - offY, rads, 10f, 5f); From 029cb4a14bdc30ab924831dd549ab4979a192551 Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Thu, 25 Jun 2015 13:10:18 +0200 Subject: [PATCH 7/9] Update FFXIGameInstance.cs --- Source/FFXIGameInstance.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/FFXIGameInstance.cs b/Source/FFXIGameInstance.cs index c2e41e5..fc44e34 100644 --- a/Source/FFXIGameInstance.cs +++ b/Source/FFXIGameInstance.cs @@ -492,7 +492,7 @@ public struct SpawnInfo public UInt32 WarpPtr; public UInt32 Unk01; public UInt32 Unk02; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 10)] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 11)] public UInt32[] Unk03; public float Distance; public UInt32 Unk04; // 0x64 From af9e6693751b92d1e2c4caffa87cdb6ad718b941 Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Thu, 10 Dec 2015 14:33:09 +0100 Subject: [PATCH 8/9] Dec. 2015 update Updated Entity Struct for December 2015 update --- Source/FFXIGameInstance.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Source/FFXIGameInstance.cs b/Source/FFXIGameInstance.cs index fc44e34..46ad4e5 100644 --- a/Source/FFXIGameInstance.cs +++ b/Source/FFXIGameInstance.cs @@ -498,18 +498,16 @@ public struct SpawnInfo public UInt32 Unk04; // 0x64 public UInt32 Unk05; // 0x64 public float Heading; // Yaw - public UInt32 PetOwnderID; //only for permanent pets. charmed mobs do not fill this. - public UInt32 PetTP; + public UInt32 PetOwnerID; //only for permanent pets. charmed mobs do not fill this. public byte HealthPercent; public byte Unk06; - public byte Unk07; public byte ModelType; public byte Race; - public byte Unk08; - public UInt16 Unk09; // Some type of timer.. - public UInt16 Unk10; // Deals with model update.. + public byte Unk07; + public UInt16 Unk08; // Some type of timer.. + public byte Unk09; // Deals with model update.. public byte ModelFade; // Updates the entity model. (Blinking) - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 9)] + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] public byte[] Unk13; public UInt16 ModelFace; public UInt16 ModelHead; @@ -606,9 +604,11 @@ public struct SpawnInfo public byte PankrationFlagFlip; // Determines which side each flag is on. public UInt16 Unk34; // Deals with current action.. public float ModelSize; - public UInt32 Unk35; - public UInt16 MonstrosityFlag; // 01 Sets the entity name to a status icon of a black cat.. + public UInt32 Unk35; public UInt16 Unk36; + public UInt16 Unk37; + public UInt16 MonstrosityFlag; // 01 Sets the entity name to a status icon of a black cat.. + public UInt16 Unk38; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)] public string MonstrosityName; } From b7e21076a68947277ff7d45a31fd242a27f85480 Mon Sep 17 00:00:00 2001 From: KenshiDRK Date: Wed, 10 Feb 2016 13:46:50 +0100 Subject: [PATCH 9/9] February 10, 2016 update Entity structure update for february 10, 2016 --- Source/FFXIGameInstance.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Source/FFXIGameInstance.cs b/Source/FFXIGameInstance.cs index 46ad4e5..0032d02 100644 --- a/Source/FFXIGameInstance.cs +++ b/Source/FFXIGameInstance.cs @@ -579,6 +579,8 @@ public struct SpawnInfo public UInt16 Unk28; // Something with animations.. public UInt16 Unk29; // Does nothing.. public UInt32 EmoteID; // Emote string.. + public UInt32 Unk30; + public UInt32 Unk31; public UInt32 SpawnType; // 0x0001 PC, 0x0002 NPC, 0x0010 Mob, 0x000D Self public byte LSColorRed; public byte LSColorGreen; @@ -587,28 +589,28 @@ public struct SpawnInfo public UInt16 NameColor; // Sets the players name color.. [MarshalAs(UnmanagedType.I1)] public bool CampaignMode; - public byte Unk30; + public byte Unk32; public UInt16 FishingTimer; // Counts down from when you click 'fish' to either catch or real in.. public UInt16 FishingCastTimer; // Counts down fromw when you click 'fish' til your bait hits the water.. public UInt32 FishingUnknown0001; // Gets set to 1800 when you hook a fish.. then unknown afterward.. public UInt32 FishingUnknown0002; // Gets read when you first cast your rod.. public UInt16 FishingUnknown0003; // Gets set when you first cast your rod.. [MarshalAs(UnmanagedType.ByValArray, SizeConst = 14)] - public byte[] Unk31; + public byte[] Unk33; public UInt16 TargetIndex; // The players target's index. public UInt16 PetIndex; - public UInt16 Unk32; // Countdown after talking with an npc. - public byte Unk33; // Flag after talkign with an npc. + public UInt16 Unk34; // Countdown after talking with an npc. + public byte Unk35; // Flag after talkign with an npc. public byte BallistaScoreFlag; // Deals with Ballista / PvP, shows game information.. public byte PankrationEnabled; // Displays the Pankration score flags. public byte PankrationFlagFlip; // Determines which side each flag is on. - public UInt16 Unk34; // Deals with current action.. + public UInt16 Unk36; // Deals with current action.. public float ModelSize; - public UInt32 Unk35; - public UInt16 Unk36; - public UInt16 Unk37; - public UInt16 MonstrosityFlag; // 01 Sets the entity name to a status icon of a black cat.. + public UInt32 Unk37; public UInt16 Unk38; + public UInt16 Unk39; + public UInt16 MonstrosityFlag; // 01 Sets the entity name to a status icon of a black cat.. + public UInt16 Unk40; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 36)] public string MonstrosityName; }