Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeromusXYZ committed Jun 3, 2019
2 parents 359f7d3 + 484d913 commit 882199c
Show file tree
Hide file tree
Showing 28 changed files with 167 additions and 50 deletions.
4 changes: 2 additions & 2 deletions App.config
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
<setting name="ColField15" serializeAs="String">
<value>Turquoise</value>
</setting>
<setting name="Setting" serializeAs="String">
<value />
<setting name="ShowStringHexData" serializeAs="String">
<value>False</value>
</setting>
</PacketViewerLogViewer.Properties.Settings>
</userSettings>
Expand Down
3 changes: 2 additions & 1 deletion DataLookupDefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ static public class DataLookups
public static string LU_RoE = "roe";
public static string LU_CraftRanks = "craftranks";
public static string LU_Buffs = "buffs";
public static string LU_ActionCategory0x028 = "actioncategory0x028";
public static string LU_ActionCategory = "actioncategory";
public static string LU_ActionReaction = "actionreaction";

Expand Down Expand Up @@ -398,7 +399,7 @@ public static void RegisterCustomLookup(string customListName, UInt64 customID,
{
var listv = li.Value;
// Special case, don't update if this is a "null string" parsed
if (customValue != "null ()")
if ((customValue != "NULL") && (listv.Val != customValue))
listv.Val = customValue;
listv.Extra = string.Empty;
return;
Expand Down
29 changes: 29 additions & 0 deletions PVLV.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Res\usgaiji-10.png" />
<None Include="Res\usgaiji-9.png" />
<None Include="Res\mini_video_icon.png" />
<None Include="Res\mini_unk_ticon1.png" />
<None Include="Res\mini_unk_ticon.png" />
Expand All @@ -309,6 +311,9 @@
<Content Include="lookup\abilityrecast.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="lookup\actioncategory0x028.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="lookup\actionreaction.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -747,9 +752,33 @@
<Content Include="parse\in-0x119.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x011.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x00F.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x00D.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x00A.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x00C.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x017.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x016.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x015.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x01E.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="parse\out-0x01A.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down
4 changes: 2 additions & 2 deletions PacketDefs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1148,15 +1148,15 @@ public bool LoadFromStringList(List<string> FileData,PacketLogFileFormats logFil
)
{
AskForPacketType = false;
hasData = true;
// Ask for type
var askDlgRes = DialogResult.Cancel;
using (PacketTypeSelectForm askDlg = new PacketTypeSelectForm())
{
askDlg.lHeaderData.Text = s;
askDlgRes = askDlg.ShowDialog();
//var askDlgStr = "Unable to indentify the packet type.\r\nDo you want to assign a default type ?\r\n\r\nPress YES for Incomming\r\n\r\nPress NO for outgoing\r\n\r\nPress Cancel to keep it undefined\r\n\r\nLineData:\r\n\r\n" + s.Substring(0, Math.Min(s.Length, 100)) + " ...";
//MessageBox.Show(askDlgStr, "Packet Type ?", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question);
}

if (askDlgRes == DialogResult.Yes)
{
preferedType = PacketLogTypes.Incoming ;
Expand Down
28 changes: 20 additions & 8 deletions PacketParsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ void AddField(ref byte AddDataFieldIndex, int BitSize,string name, string data,
MarkParsed(0x09, 1, DataFieldIndex);

AddDataFieldEx(0x0A, 1, ref DataFieldIndex);
AddParseLineToView(DataFieldIndex, "0x0A:2-4", GetDataColor(DataFieldIndex), "Action Category", pActionCategory.ToString() + " => " + DataLookups.NLU(DataLookups.LU_ActionCategory).GetValue((UInt64)pActionCategory),(UInt64)pActionCategory);
AddParseLineToView(DataFieldIndex, "0x0A:2-4", GetDataColor(DataFieldIndex), "Action Category", pActionCategory.ToString() + " => " + DataLookups.NLU(DataLookups.LU_ActionCategory0x028).GetValue((UInt64)pActionCategory),(UInt64)pActionCategory);
MarkParsed(0x0A, 1, DataFieldIndex);

AddDataFieldEx(0x0B, 1, ref DataFieldIndex);
Expand Down Expand Up @@ -947,17 +947,29 @@ void AddDataField(int StartPos, int FieldByteSize)
}
var d = PD.GetStringAtPos(Offset, size);
string dHex = "";
foreach(char c in d)
if (d == string.Empty)
{
if (dHex != string.Empty)
dHex += " ";
dHex += ((byte)c).ToString("X2");
d = "NULL";
dHex = string.Empty;
}
else
if (Properties.Settings.Default.ShowStringHexData)
{
foreach (char c in d)
{
if (dHex != string.Empty)
dHex += " ";
dHex += ((byte)c).ToString("X2");
}
dHex = " (" + dHex + ")";
}
else
{
dHex = string.Empty;
}
if (d == string.Empty)
d = "null";

AddDataField(Offset,size);
AddParseLineToView(DataFieldIndex, posField, GetDataColor(DataFieldIndex), nameField, d + " ("+dHex+")");
AddParseLineToView(DataFieldIndex, posField, GetDataColor(DataFieldIndex), nameField, d + dHex);
if (size > 1)
{
MarkParsed(Offset, size, DataFieldIndex);
Expand Down
4 changes: 2 additions & 2 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.5.3.0")]
[assembly: AssemblyFileVersion("0.5.3.0")]
[assembly: AssemblyVersion("0.5.4.0")]
[assembly: AssemblyFileVersion("0.5.4.0")]
20 changes: 20 additions & 0 deletions Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,10 @@
<data name="mini_video_icon" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Res\mini_video_icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="usgaiji_10" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Res\usgaiji-10.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="usgaiji_9" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Res\usgaiji-9.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
7 changes: 4 additions & 3 deletions Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
<Setting Name="ColField15" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)">Turquoise</Value>
</Setting>
<Setting Name="Setting" Type="System.Drawing.Color" Scope="User">
<Value Profile="(Default)" />
<Setting Name="ShowStringHexData" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
Binary file added Res/auto-translate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Res/usgaiji-10.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Res/usgaiji-9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 17 additions & 24 deletions lookup/actioncategory.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
rem;packet-in-0x028 action category names
0;None
1;Melee Attack
2;Ranged Attack Finish
3;Weapon Skill Finish
4;Magic Finish
5;Item Finish
6;Job Ability Finish
7;Weapon Skill Start
8;Magic Start
9;Item Start
10;Job Ability Start
11;NPC Ability Finish
12;Ranged Attack Start
13;Pet Mob Ability Finish
14;Job Ability DNC
15;Job Ability RUN
rem;DSP stuff (not actually used as max value would be 15 with just 4 bits)
29;ACTION_ITEM_INTERRUPT';
31;ACTION_MAGIC_INTERRUPT';
32;ACTION_RANGED_INTERRUPT';
33;ACTION_MOBABILITY_START';
35;ACTION_MOBABILITY_INTERRUPT';
37;ACTION_RAISE_MENU_SELECTION';
rem;action category names
0x00;NPC Interaction
0x02;Engage monster
0x03;Magic cast
0x04;Disengage
0x05;Call for Help
0x07;Weaponskill usage
0x09;Job ability usage
0x0C;Assist
0x0D;Reraise dialogue
0x0E;Cast Fishing Rod
0x0F;Switch target
0x10;Ranged attack
0x12;Dismount Chocobo
0x14;Show/Zone In
0x19;Monsterskill
0x1A;Mount
24 changes: 24 additions & 0 deletions lookup/actioncategory0x028.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
rem;packet-in-0x028 action category names
0;None
1;Melee Attack
2;Ranged Attack Finish
3;Weapon Skill Finish
4;Magic Finish
5;Item Finish
6;Job Ability Finish
7;Weapon Skill Start
8;Magic Start
9;Item Start
10;Job Ability Start
11;NPC Ability Finish
12;Ranged Attack Start
13;Pet Mob Ability Finish
14;Job Ability DNC
15;Job Ability RUN
rem;DSP stuff (not actually used as max value would be 15 with just 4 bits)
29;ACTION_ITEM_INTERRUPT';
31;ACTION_MAGIC_INTERRUPT';
32;ACTION_RANGED_INTERRUPT';
33;ACTION_MOBABILITY_START';
35;ACTION_MOBABILITY_INTERRUPT';
37;ACTION_RAISE_MENU_SELECTION';
1 change: 1 addition & 0 deletions parse/in-0x00a.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,4 @@ uint32;$EC;Max MP
data20;$F0;_unknown16

save;@actors;Player ID;Player Name
save;@players;Player ID;Player Name
3 changes: 2 additions & 1 deletion parse/in-0x00d.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,5 @@ uint16:itemmodels:-0x8000;$58;Ranged Weapon Model;

string;$5A;Character Name

save;@actors;Player ID;Character Name
save;@actors;Player ID;Character Name
save;@players;Player ID;Character Name
3 changes: 2 additions & 1 deletion parse/in-0x0DD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ byte:jobs;$24;Sub Job
byte;$25;Sub Job Level
string;$26;Name

save;@actors;Player ID;Name
save;@actors;Player ID;Name
save;@players;Player ID;Name
2 changes: 2 additions & 0 deletions parse/out-0x00A.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
file;out-0x00A;Client Connect

2 changes: 2 additions & 0 deletions parse/out-0x00C.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
file;out-0x00C;Zone In 1

2 changes: 2 additions & 0 deletions parse/out-0x00D.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
file;out-0x00D;Client Leave

2 changes: 2 additions & 0 deletions parse/out-0x00F.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
file;out-0x00F;Zone In 2

2 changes: 2 additions & 0 deletions parse/out-0x011.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
file;out-0x011;Zone In 3

3 changes: 3 additions & 0 deletions parse/out-0x016.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file;out-0x016;Update Request

uint16;0x04;Target Index
8 changes: 8 additions & 0 deletions parse/out-0x017.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
file;out-0x017;NPC Race Error;Packet sent in response to impossible incoming NPC packets (like trying to put equipment on a race 0 monster).

uint16;0x04;NPC Index
uint16;0x06;_unknown1
uint32:@actors;0x08;NPC ID
data6:0x0C;_unknown2
byte:0x12;Reported NPC type
byte:0x13;_unknown3
10 changes: 7 additions & 3 deletions parse/out-0x01A.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
file;in-0x01A;Action;Newly created parser.
file;out-0x01A;Action;Newly created parser.

rem;Add your parser lines here
uint32;$04;Target ID
uint32:@actors;0x04;Target ID
uint16;0x08;Target Index
uint16:actioncategory;0x0A;Category
uint16;0x0C;Param
uint16;0x0E;_unknown1
pos;0x10;Offset Position;non-zero values only observed for geo spells cast using a repositioned subtarget
3 changes: 3 additions & 0 deletions parse/out-0x01E.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
file;out-0x01A;Volunteer;Sent in response to a /volunteer command.

string;0x04;Target Name
2 changes: 1 addition & 1 deletion parse/out-0x05B.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
file;in-0x05B;Dialog Choice;Selecting a dialog option
file;out-0x05B;Dialog Choice;Selecting a dialog option

uint32;$04;Target ID
uint16;$06;Option Index
Expand Down

0 comments on commit 882199c

Please sign in to comment.