Skip to content

Commit

Permalink
Cancel matchmake support
Browse files Browse the repository at this point in the history
  • Loading branch information
PhoenixFire6934 committed Jan 17, 2021
1 parent c4a6dd9 commit 88bc2ff
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Packets/Factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -37,6 +38,7 @@
14354: TeamChangeMemberSettingsMessage,
14372: TeamUseGadgetMessage,
14600: AvatarNameCheckRequestMessage,
14366: PlayerStatusMessage,
14777: DoNotDistrubMessage,

}
21 changes: 21 additions & 0 deletions Packets/Messages/Client/Home/Player_Status_Message.py
Original file line number Diff line number Diff line change
@@ -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()

16 changes: 16 additions & 0 deletions Packets/Messages/Server/Battle/Match_Making_Cancelled_Message.py
Original file line number Diff line number Diff line change
@@ -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



21 changes: 20 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -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"}
{
"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"
}

0 comments on commit 88bc2ff

Please sign in to comment.