Skip to content

Commit

Permalink
Update protocol to 0.8.165 version
Browse files Browse the repository at this point in the history
  • Loading branch information
Nihisil committed Nov 26, 2020
1 parent 5c07f77 commit 3a45117
Show file tree
Hide file tree
Showing 5 changed files with 1,702 additions and 1,067 deletions.
2 changes: 1 addition & 1 deletion ms/liqi.json

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions ms/protocol.proto
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ message AccountUpdate {
TaskUpdate activity_period_task = 11;
TaskUpdate activity_random_task = 12;
AccountChallengeUpdate challenge = 13;
AccountABMatchUpdate ab_match = 14;
message NumericalUpdate {
uint32 id = 1;
uint32 final = 3;
Expand Down Expand Up @@ -415,6 +416,21 @@ message AccountUpdate {
repeated uint32 rewarded_season = 7;
}

message AccountABMatchUpdate {
uint32 match_id = 1;
uint32 match_count = 2;
uint32 buy_in_count = 3;
uint32 point = 4;
bool rewarded = 5;
repeated MatchPoint match_max_point = 6;
bool quit = 7;
message MatchPoint {
uint32 match_id = 1;
uint32 point = 2;
}

}

}

message GameMetaData {
Expand Down Expand Up @@ -475,12 +491,17 @@ message PlayerGameView {
repeated ViewSlot views = 10;
}

message GameSetting {
uint32 emoji_switch = 1;
}

message GameMode {
uint32 mode = 1;
bool ai = 4;
string extendinfo = 5;
GameDetailRule detail_rule = 6;
GameTestingEnvironmentSet testing_environment = 7;
GameSetting game_setting = 8;
}

message GameTestingEnvironmentSet {
Expand Down Expand Up @@ -536,6 +557,7 @@ message GameDetailRule {
uint32 jiuchao_mode = 45;
uint32 muyu_mode = 46;
uint32 open_hand = 47;
bool disable_leijiyiman = 60;
}

message Room {
Expand Down Expand Up @@ -1036,6 +1058,7 @@ message CustomizedContestDetail {
GameMode game_mode = 11;
string private_notice = 12;
uint32 observer_switch = 13;
uint32 emoji_switch = 14;
}

message CustomizedContestPlayerReport {
Expand Down Expand Up @@ -1438,6 +1461,7 @@ service Lobby {
rpc createMyCardAndroidOrder (ReqCreateMyCardOrder) returns (ResCreateMyCardOrder);
rpc createMyCardWebOrder (ReqCreateMyCardOrder) returns (ResCreateMyCardOrder);
rpc createPaypalOrder (ReqCreatePaypalOrder) returns (ResCreatePaypalOrder);
rpc createXsollaOrder (ReqCreateXsollaOrder) returns (ResCreateXsollaOrder);
rpc verifyMyCardOrder (ReqVerifyMyCardOrder) returns (ResCommon);
rpc verificationIAPOrder (ReqVerificationIAPOrder) returns (ResVerificationIAPOrder);
rpc createYostarSDKOrder (ReqCreateYostarOrder) returns (ResCreateYostarOrder);
Expand Down Expand Up @@ -1489,6 +1513,10 @@ service Lobby {
rpc forceCompleteChallengeTask (ReqForceCompleteChallengeTask) returns (ResCommon);
rpc fetchChallengeSeason (ReqCommon) returns (ResChallengeSeasonInfo);
rpc receiveChallengeRankReward (ReqReceiveChallengeRankReward) returns (ResReceiveChallengeRankReward);
rpc fetchABMatchInfo (ReqCommon) returns (ResFetchABMatch);
rpc buyInABMatch (ReqBuyInABMatch) returns (ResCommon);
rpc receiveABMatchReward (ReqCommon) returns (ResCommon);
rpc quitABMatch (ReqCommon) returns (ResCommon);
rpc startUnifiedMatch (ReqStartUnifiedMatch) returns (ResCommon);
rpc cancelUnifiedMatch (ReqCancelUnifiedMatch) returns (ResCommon);
}
Expand All @@ -1503,6 +1531,7 @@ message ReqSignupAccount {
string password = 2;
string code = 3;
uint32 type = 4;
ClientDeviceInfo device = 5;
}

message ResSignupAccount {
Expand Down Expand Up @@ -1628,6 +1657,7 @@ message ReqOauth2Signup {
string access_token = 2;
string email = 3;
string advertise_str = 4;
ClientDeviceInfo device = 5;
}

message ResOauth2Signup {
Expand Down Expand Up @@ -2556,6 +2586,19 @@ message ResCreatePaypalOrder {
string url = 3;
}

message ReqCreateXsollaOrder {
uint32 goods_id = 1;
uint32 client_type = 2;
uint32 account_id = 3;
uint32 payment_method = 4;
}

message ResCreateXsollaOrder {
Error error = 1;
string order_id = 2;
string url = 3;
}

message ReqOpenChest {
uint32 chest_id = 1;
uint32 count = 2;
Expand Down Expand Up @@ -3128,6 +3171,22 @@ message ReqForceCompleteChallengeTask {
uint32 task_id = 1;
}

message ResFetchABMatch {
Error error = 1;
uint32 match_id = 2;
uint32 match_count = 3;
uint32 buy_in_count = 4;
uint32 point = 5;
bool rewarded = 6;
repeated MatchPoint match_max_point = 7;
bool quit = 8;
message MatchPoint {
uint32 match_id = 1;
uint32 point = 2;
}

}

message ReqStartUnifiedMatch {
string match_sid = 1;
}
Expand Down Expand Up @@ -3160,6 +3219,10 @@ message ResReceiveChallengeRankReward {

}

message ReqBuyInABMatch {
uint32 match_id = 1;
}

message ActionMJStart {
}

Expand Down
2,677 changes: 1,612 additions & 1,065 deletions ms/protocol_pb2.py

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions ms/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ class Lobby(MSRPCService):
'createMyCardAndroidOrder': pb.ReqCreateMyCardOrder,
'createMyCardWebOrder': pb.ReqCreateMyCardOrder,
'createPaypalOrder': pb.ReqCreatePaypalOrder,
'createXsollaOrder': pb.ReqCreateXsollaOrder,
'verifyMyCardOrder': pb.ReqVerifyMyCardOrder,
'verificationIAPOrder': pb.ReqVerificationIAPOrder,
'createYostarSDKOrder': pb.ReqCreateYostarOrder,
Expand Down Expand Up @@ -221,6 +222,10 @@ class Lobby(MSRPCService):
'forceCompleteChallengeTask': pb.ReqForceCompleteChallengeTask,
'fetchChallengeSeason': pb.ReqCommon,
'receiveChallengeRankReward': pb.ReqReceiveChallengeRankReward,
'fetchABMatchInfo': pb.ReqCommon,
'buyInABMatch': pb.ReqBuyInABMatch,
'receiveABMatchReward': pb.ReqCommon,
'quitABMatch': pb.ReqCommon,
'startUnifiedMatch': pb.ReqStartUnifiedMatch,
'cancelUnifiedMatch': pb.ReqCancelUnifiedMatch,
}
Expand Down Expand Up @@ -386,6 +391,7 @@ class Lobby(MSRPCService):
'createMyCardAndroidOrder': pb.ResCreateMyCardOrder,
'createMyCardWebOrder': pb.ResCreateMyCardOrder,
'createPaypalOrder': pb.ResCreatePaypalOrder,
'createXsollaOrder': pb.ResCreateXsollaOrder,
'verifyMyCardOrder': pb.ResCommon,
'verificationIAPOrder': pb.ResVerificationIAPOrder,
'createYostarSDKOrder': pb.ResCreateYostarOrder,
Expand Down Expand Up @@ -437,6 +443,10 @@ class Lobby(MSRPCService):
'forceCompleteChallengeTask': pb.ResCommon,
'fetchChallengeSeason': pb.ResChallengeSeasonInfo,
'receiveChallengeRankReward': pb.ResReceiveChallengeRankReward,
'fetchABMatchInfo': pb.ResFetchABMatch,
'buyInABMatch': pb.ResCommon,
'receiveABMatchReward': pb.ResCommon,
'quitABMatch': pb.ResCommon,
'startUnifiedMatch': pb.ResCommon,
'cancelUnifiedMatch': pb.ResCommon,
}
Expand Down Expand Up @@ -936,6 +946,9 @@ async def create_my_card_web_order(self, req):
async def create_paypal_order(self, req):
return await self.call_method('createPaypalOrder', req)

async def create_xsolla_order(self, req):
return await self.call_method('createXsollaOrder', req)

async def verify_my_card_order(self, req):
return await self.call_method('verifyMyCardOrder', req)

Expand Down Expand Up @@ -1089,6 +1102,18 @@ async def fetch_challenge_season(self, req):
async def receive_challenge_rank_reward(self, req):
return await self.call_method('receiveChallengeRankReward', req)

async def fetch_ab_match_info(self, req):
return await self.call_method('fetchABMatchInfo', req)

async def buy_in_ab_match(self, req):
return await self.call_method('buyInABMatch', req)

async def receive_ab_match_reward(self, req):
return await self.call_method('receiveABMatchReward', req)

async def quit_ab_match(self, req):
return await self.call_method('quitABMatch', req)

async def start_unified_match(self, req):
return await self.call_method('startUnifiedMatch', req)

Expand Down
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.8.125',
version='0.8.165',
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 3a45117

Please sign in to comment.