Skip to content

Commit

Permalink
feat(constant/opcode): add ActorControl and FateInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
zhyupe committed Apr 14, 2022
1 parent 9d63418 commit 78b9647
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 16 deletions.
38 changes: 22 additions & 16 deletions Cafe.Matcha/Constant/MatchaOpcode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ namespace Cafe.Matcha.Constant

internal enum MatchaOpcode
{
ActorControl,
ActorControlSelf,
CEDirector,
CompanyAirshipStatus,
Expand All @@ -15,6 +16,7 @@ internal enum MatchaOpcode
DirectorStart,
EventPlay,
Examine,
FateInfo,
InitZone,
InventoryTransaction,
ItemInfo,
Expand All @@ -30,26 +32,29 @@ internal static class OpcodeStorage
{
public static Dictionary<ushort, MatchaOpcode> Global = new Dictionary<ushort, MatchaOpcode>
{
{ 0x0301, MatchaOpcode.ActorControlSelf },
{ 0x010a, MatchaOpcode.CEDirector },
{ 0x0142, MatchaOpcode.CompanyAirshipStatus },
{ 0x02b1, MatchaOpcode.CompanySubmersibleStatus },
{ 0x016e, MatchaOpcode.ContentFinderNotifyPop },
{ 0x02e7, MatchaOpcode.ActorControl },
{ 0x028f, MatchaOpcode.ActorControlSelf },
{ 0x0336, MatchaOpcode.CEDirector },
{ 0x03b4, MatchaOpcode.CompanyAirshipStatus },
{ 0x0172, MatchaOpcode.CompanySubmersibleStatus },
{ 0x01a3, MatchaOpcode.ContentFinderNotifyPop },
{ 0x0256, MatchaOpcode.DirectorStart },
{ 0x027a, MatchaOpcode.EventPlay },
{ 0x03ae, MatchaOpcode.Examine },
{ 0x017f, MatchaOpcode.InitZone },
{ 0x0134, MatchaOpcode.InventoryTransaction },
{ 0x00ec, MatchaOpcode.ItemInfo },
{ 0x014b, MatchaOpcode.MarketBoardItemListing },
{ 0x0370, MatchaOpcode.MarketBoardItemListingCount },
{ 0x0103, MatchaOpcode.MarketBoardItemListingHistory },
{ 0x032f, MatchaOpcode.NpcSpawn },
{ 0x01db, MatchaOpcode.PlayerSetup },
{ 0x03dc, MatchaOpcode.PlayerSpawn },
{ 0x00f3, MatchaOpcode.EventPlay },
{ 0xf008, MatchaOpcode.Examine },
{ 0xf009, MatchaOpcode.FateInfo },
{ 0x01e7, MatchaOpcode.InitZone },
{ 0x00d7, MatchaOpcode.InventoryTransaction },
{ 0x0309, MatchaOpcode.ItemInfo },
{ 0x0069, MatchaOpcode.MarketBoardItemListing },
{ 0x0167, MatchaOpcode.MarketBoardItemListingCount },
{ 0x019e, MatchaOpcode.MarketBoardItemListingHistory },
{ 0x012f, MatchaOpcode.NpcSpawn },
{ 0x01d2, MatchaOpcode.PlayerSetup },
{ 0x02bc, MatchaOpcode.PlayerSpawn },
};
public static Dictionary<ushort, MatchaOpcode> China = new Dictionary<ushort, MatchaOpcode>
{
{ 0x0282, MatchaOpcode.ActorControl },
{ 0x0205, MatchaOpcode.ActorControlSelf },
{ 0x00ea, MatchaOpcode.CEDirector },
{ 0x02c9, MatchaOpcode.CompanyAirshipStatus },
Expand All @@ -58,6 +63,7 @@ internal static class OpcodeStorage
{ 0x01c7, MatchaOpcode.DirectorStart },
{ 0x0310, MatchaOpcode.EventPlay },
{ 0x0299, MatchaOpcode.Examine },
{ 0x03ab, MatchaOpcode.FateInfo },
{ 0x0286, MatchaOpcode.InitZone },
{ 0x02fe, MatchaOpcode.InventoryTransaction },
{ 0x0115, MatchaOpcode.ItemInfo },
Expand Down
2 changes: 2 additions & 0 deletions utils/update-opcode.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const opcodes = [
'ActorControl',
'ActorControlSelf',
{
// https://github.com/quisquous/cactbot/blob/main/plugin/CactbotEventSource/FateWatcher.cs#L45
Expand All @@ -25,6 +26,7 @@ const opcodes = [
},
'EventPlay',
'Examine',
'FateInfo',
'InitZone',
'InventoryTransaction',
'ItemInfo',
Expand Down

0 comments on commit 78b9647

Please sign in to comment.