diff --git a/Packets/Factory.py b/Packets/Factory.py index 6d9ce012..cf37e53f 100644 --- a/Packets/Factory.py +++ b/Packets/Factory.py @@ -16,6 +16,7 @@ from Packets.Messages.Client.Home.Avatar_Name_Check_Request_Message import AvatarNameCheckRequestMessage from Packets.Messages.Client.Gameroom.Team_Use_Gadget_Message import TeamUseGadgetMessage from Packets.Messages.Client.Gameroom.Do_Not_Distrub_Message import DoNotDistrubMessage +from Packets.Messages.Client.Home.Player_Status_Message import PlayerStatusMessage from Packets.CommandFactory import EndClientTurn packets = { @@ -37,6 +38,7 @@ 14354: TeamChangeMemberSettingsMessage, 14372: TeamUseGadgetMessage, 14600: AvatarNameCheckRequestMessage, + 14366: PlayerStatusMessage, 14777: DoNotDistrubMessage, } diff --git a/Packets/Messages/Client/Home/Player_Status_Message.py b/Packets/Messages/Client/Home/Player_Status_Message.py new file mode 100644 index 00000000..02c0e757 --- /dev/null +++ b/Packets/Messages/Client/Home/Player_Status_Message.py @@ -0,0 +1,21 @@ +from Packets.Messages.Server.Battle.Match_Making_Cancelled_Message import MatchMakingCancelledMessage + + +from Utils.Reader import BSMessageReader + + +class PlayerStatusMessage(BSMessageReader): + def __init__(self, client, player, initial_bytes): + super().__init__(initial_bytes) + self.player = player + self.client = client + + + def decode(self): + self.status = self.read_Vint() + + + def process(self): + if self.status == 4 or self.status == 12: + MatchMakingCancelledMessage(self.client, self.player).send() + diff --git a/Packets/Messages/Server/Battle/Match_Making_Cancelled_Message.py b/Packets/Messages/Server/Battle/Match_Making_Cancelled_Message.py new file mode 100644 index 00000000..8627653b --- /dev/null +++ b/Packets/Messages/Server/Battle/Match_Making_Cancelled_Message.py @@ -0,0 +1,16 @@ +from Utils.Writer import Writer +from Database.DataBase import DataBase + +class MatchMakingCancelledMessage(Writer): + + def __init__(self, client, player): + super().__init__(client) + self.id = 20406 + self.player = player + + + def encode(self): + pass + + + diff --git a/config.json b/config.json index a114b0b5..860f168f 100644 --- a/config.json +++ b/config.json @@ -1 +1,20 @@ -{"Gems": 99999, "Gold": 99999, "Tickets": 99999, "Starpoints": 99999, "BrawlBoxTokens": 5000, "BigBoxTokens": 5000, "Trophies": 5000, "BrawlerTrophies": 500, "BrawlerTrophiesForRank": 500, "BrawlerPowerLevel": 8, "BrawlerUpgradePoints": 0, "ThemeID": 11, "ShowPacketsInLog": false, "Maintenance": false, "MaintenanceTime": 3600, "Patch": false, "PatchUrl": "http://192.168.0.103:8080/", "UpdateUrl": "https://github.com/PhoenixFire6879/Classic-Brawl"} \ No newline at end of file +{ + "Gems": 99999, + "Gold": 99999, + "Tickets": 99999, + "Starpoints": 99999, + "BrawlBoxTokens": 5000, + "BigBoxTokens": 5000, + "Trophies": 5000, + "BrawlerTrophies": 500, + "BrawlerTrophiesForRank": 500, + "BrawlerPowerLevel": 8, + "BrawlerUpgradePoints": 0, + "ThemeID": 11, + "ShowPacketsInLog": false, + "Maintenance": false, + "MaintenanceTime": 3600, + "Patch": false, + "PatchUrl": "http://192.168.0.103:8080/", + "UpdateUrl": "https://github.com/PhoenixFire6879/Classic-Brawl" +} \ No newline at end of file