Skip to content

Commit

Permalink
Merge pull request #50 from shambarick/master
Browse files Browse the repository at this point in the history
Add FreeCompanyInfo and Airship/Submarine related packets
  • Loading branch information
karashiiro authored Feb 22, 2021
2 parents 29c355a + a74bbba commit 09370ff
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions PacketDetection/ScannerRegistry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,43 @@ private void DeclareScanners()
row <= 2 &&
digit <= 9;
});
//=================
RegisterScanner("FreeCompanyInfo", "Load a zone.",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 112 && packet.Data[Offsets.IpcData + 45] == int.Parse(parameters[0]),
new[] { "Please enter your Free Company rank:" });
//=================
RegisterScanner("AirshipTimers", "Open your Estate tab from the Timers window if you have any airships on exploration.",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 176 && IncludesBytes(packet.Data, Encoding.UTF8.GetBytes(parameters[0])),
new[] { "Please enter your airship name:" });
RegisterScanner("SubmarineTimers", "Open your Estate tab from the Timers window if you have any submarines on exploration.",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 176 && IncludesBytes(packet.Data, Encoding.UTF8.GetBytes(parameters[0])),
new[] { "Please enter your submarine name:" });
RegisterScanner("AirshipStatusList", "Open your airship management console if you have any airships",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 192 && IncludesBytes(packet.Data, Encoding.UTF8.GetBytes(parameters[0])),
new[] { "Please enter your airship name:" });
RegisterScanner("AirshipStatus", "Check the status of a specific airship if you have any airships",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 104 && IncludesBytes(packet.Data, Encoding.UTF8.GetBytes(parameters[0])),
new[] { "Please enter your airship name:" });
RegisterScanner("AirshipExplorationResult", "Open a voyage log from an airship",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 320 && BitConverter.ToUInt32(packet.Data, Offsets.IpcData + 4) == int.Parse(parameters[0]),
new[] { "Please enter the experience from the first sector:" });
RegisterScanner("SubmarineProgressionStatus", "Open your submarine management console if you have any submarines",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 56 && packet.Data[Offsets.IpcData] >= 1 && packet.Data[Offsets.IpcData] <= 4);
RegisterScanner("SubmarineStatusList", "Open your submarine management console if you have any submarines",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 272 && IncludesBytes(packet.Data, Encoding.UTF8.GetBytes(parameters[0])),
new[] { "Please enter your submarine name:" });
RegisterScanner("SubmarineExplorationResult", "Open a voyage log from a submarine",
PacketSource.Server,
(packet, parameters) => packet.PacketSize == 320 && BitConverter.ToUInt32(packet.Data, Offsets.IpcData + 16) == int.Parse(parameters[0]),
new[] { "Please enter the experience from the first sector:" });
}

/// <summary>
Expand Down

0 comments on commit 09370ff

Please sign in to comment.