Skip to content

Commit

Permalink
feat: add requestResponse packet
Browse files Browse the repository at this point in the history
  • Loading branch information
Sceat committed Aug 9, 2024
1 parent ba80b3a commit 824e65a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
12 changes: 9 additions & 3 deletions generated/ares_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
export const file_ares =
/*@__PURE__*/
fileDesc(
'CgphcmVzLnByb3RvEgRhcmVzIsAFCgZQYWNrZXQSMgoQc2lnbmF0dXJlUmVxdWVzdBgBIAEoCzIWLmFyZXMuU2lnbmF0dXJlUmVxdWVzdEgAEhwKBWVycm9yGAIgASgLMgsuYXJlcy5FcnJvckgAEjQKEXNpZ25hdHVyZVJlc3BvbnNlGAMgASgLMhcuYXJlcy5TaWduYXR1cmVSZXNwb25zZUgAEjAKD2NoYXJhY3RlckFjdGlvbhgEIAEoCzIVLmFyZXMuQ2hhcmFjdGVyQWN0aW9uSAASNAoRY2hhcmFjdGVyUG9zaXRpb24YBSABKAsyFy5hcmVzLkNoYXJhY3RlclBvc2l0aW9uSAASMgoQZW50aXR5R3JvdXBTcGF3bhgGIAEoCzIWLmFyZXMuRW50aXR5R3JvdXBTcGF3bkgAEjQKEWNoYXJhY3RlcnNEZXNwYXduGAcgASgLMhcuYXJlcy5DaGFyYWN0ZXJzRGVzcGF3bkgAEiYKCnNlcnZlckluZm8YCCABKAsyEC5hcmVzLlNlcnZlckluZm9IABIoCgtjaGF0TWVzc2FnZRgJIAEoCzIRLmFyZXMuQ2hhdE1lc3NhZ2VIABIwCg9jaGFyYWN0ZXJIZWFsdGgYCiABKAsyFS5hcmVzLkNoYXJhY3RlckhlYWx0aEgAEkAKF2NoYXJhY3RlckF0dGFja01vYkdyb3VwGAsgASgLMh0uYXJlcy5DaGFyYWN0ZXJBdHRhY2tNb2JHcm91cEgAEiYKCmZpZ2h0U3Bhd24YDCABKAsyEC5hcmVzLkZpZ2h0U3Bhd25IABI4ChNlbnRpdHl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HCgNSVU4QARIICgRKVU1QEAISDAoISlVNUF9SVU4QAxIICgRGQUxMEAQSCQoFREVBVEgQBRIOCgpBVFRBQ0tfQ0FDEAYSDgoKU1BFTExfQlVGRhAHEhAKDFNQRUxMX1RBUkdFVBAIEgkKBURBTkNFEAkSBwoDU0lUEAoSCAoEV0FMSxALYgZwcm90bzM',
)

/**
Expand Down Expand Up @@ -110,17 +110,23 @@ export const CharacterPositionSchema = /*@__PURE__*/ messageDesc(file_ares, 13)
*/
export const ChatMessageSchema = /*@__PURE__*/ messageDesc(file_ares, 14)

/**
* Describes the message ares.RequestResponse.
* Use `create(RequestResponseSchema)` to create a new message.
*/
export const RequestResponseSchema = /*@__PURE__*/ messageDesc(file_ares, 15)

/**
* Describes the message ares.Position.
* Use `create(PositionSchema)` to create a new message.
*/
export const PositionSchema = /*@__PURE__*/ messageDesc(file_ares, 15)
export const PositionSchema = /*@__PURE__*/ messageDesc(file_ares, 16)

/**
* Describes the message ares.Entity.
* Use `create(EntitySchema)` to create a new message.
*/
export const EntitySchema = /*@__PURE__*/ messageDesc(file_ares, 16)
export const EntitySchema = /*@__PURE__*/ messageDesc(file_ares, 17)

/**
* Describes the enum ares.Classe.
Expand Down
6 changes: 6 additions & 0 deletions proto/ares.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ message Packet {
FightSpawn fightSpawn = 12;
EntityGroupsDespawn entityGroupsDespawn = 13;
FightsDespawn fightsDespawn = 14;
RequestResponse requestResponse = 15;
}
}

Expand Down Expand Up @@ -107,6 +108,11 @@ message ChatMessage {
string address = 3;
}

message RequestResponse {
string id = 1;
string message = 2;
}

// ========================================
// Types used by packets

Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ type Packets = {
'packet/characterAttackMobGroup': { id: string; mob_group_id: string } // client -> server
'packet/fightSpawn': Fight // server -> client
'packet/fightsDespawn': { ids: string[] } // server -> client
'packet/requestResponse': { id: string; message: string } // server <-> client
}

type Packet = {
Expand Down

0 comments on commit 824e65a

Please sign in to comment.