Skip to content

Commit

Permalink
Update protocol to 0.9.310 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihisil committed Oct 30, 2021
1 parent eebde22 commit 09372aa
Show file tree
Hide file tree
Showing 5 changed files with 1,797 additions and 1,161 deletions.
4 changes: 2 additions & 2 deletions example.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ async def login(lobby, username, password):
req.device.is_browser = True
req.random_key = uuid_key
req.gen_access_token = True
req.client_version_string = 'web-0.9.303'
req.client_version_string = 'web-0.9.333'
req.currency_platforms.append(2)

res = await lobby.login(req)
Expand Down Expand Up @@ -128,7 +128,7 @@ async def load_and_process_game_log(lobby, uuid):

req = pb.ReqGameRecord()
req.game_uuid = uuid
req.client_version_string = 'web-0.9.303'
req.client_version_string = 'web-0.9.333'
res = await lobby.fetch_game_record(req)

record_wrapper = pb.Wrapper()
Expand Down
2 changes: 1 addition & 1 deletion ms/liqi.json

Large diffs are not rendered by default.

70 changes: 70 additions & 0 deletions ms/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,7 @@ message GameDetailRule {
uint32 xuezhandaodi = 48;
uint32 huansanzhang = 49;
uint32 chuanma = 50;
uint32 reveal_discard = 51;
bool disable_leijiyiman = 60;
}

Expand Down Expand Up @@ -3848,6 +3849,7 @@ message ActionNewRound {
repeated NewRoundOpenedTiles opens = 15;
MuyuInfo muyu = 16;
uint32 ju_count = 17;
string new_tile = 18;
}

message RecordNewRound {
Expand All @@ -3871,6 +3873,7 @@ message RecordNewRound {
MuyuInfo muyu = 18;
repeated OptionalOperationList operations = 19;
uint32 ju_count = 20;
string new_tile = 21;
message TingPai {
uint32 seat = 1;
repeated TingPaiInfo tingpais1 = 2;
Expand Down Expand Up @@ -4089,6 +4092,70 @@ message RecordChangeTile {

}

message ActionRevealTile {
uint32 seat = 1;
bool is_liqi = 2;
bool is_wliqi = 3;
bool moqie = 4;
repeated int32 scores = 5;
uint32 liqibang = 6;
OptionalOperationList operation = 7;
repeated TingPaiInfo tingpais = 8;
string tile = 9;
bool zhenting = 10;
}

message RecordRevealTile {
uint32 seat = 1;
bool is_liqi = 2;
bool is_wliqi = 3;
bool moqie = 4;
repeated int32 scores = 5;
uint32 liqibang = 6;
repeated OptionalOperationList operations = 7;
repeated TingPaiInfo tingpais = 8;
string tile = 9;
repeated bool zhenting = 10;
}

message ActionUnveilTile {
int32 seat = 1;
repeated int32 scores = 2;
uint32 liqibang = 3;
OptionalOperationList operation = 4;
}

message RecordUnveilTile {
int32 seat = 1;
repeated int32 scores = 2;
uint32 liqibang = 3;
OptionalOperationList operation = 4;
}

message ActionLockTile {
uint32 seat = 1;
repeated int32 scores = 2;
uint32 liqibang = 3;
string tile = 4;
OptionalOperationList operation = 5;
bool zhenting = 6;
repeated TingPaiInfo tingpais = 7;
repeated string doras = 8;
int32 lock_state = 9;
}

message RecordLockTile {
uint32 seat = 1;
repeated int32 scores = 2;
uint32 liqibang = 3;
string tile = 4;
repeated OptionalOperationList operation = 5;
repeated bool zhentings = 6;
repeated TingPaiInfo tingpais = 7;
repeated string doras = 8;
int32 lock_state = 9;
}

message ActionDiscardTile {
uint32 seat = 1;
string tile = 2;
Expand All @@ -4101,6 +4168,9 @@ message ActionDiscardTile {
bool is_wliqi = 9;
uint32 tile_state = 10;
MuyuInfo muyu = 11;
bool revealed = 12;
repeated int32 scores = 13;
uint32 liqibang = 14;
}

message RecordDiscardTile {
Expand Down
2,880 changes: 1,723 additions & 1,157 deletions ms/protocol_pb2.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
packages=[
'ms',
],
version='0.9.271',
version='0.9.310',
description='Python wrapper for the Mahjong Soul (Majsoul) Protobuf objects. It allows to use their API.',
long_description='',
author='Nihisil',
Expand Down

0 comments on commit 09372aa

Please sign in to comment.