From ba3df8d4d1d667a1aab27b87bc1b14826f616551 Mon Sep 17 00:00:00 2001 From: Sophie Date: Mon, 9 Mar 2020 18:05:01 +0000 Subject: [PATCH] Remove unnecessary messages, these were covered by recasting user bins --- .../binpacket/msg_bin_player_joined_party.go | 48 ------------------- server/channelserver/handlers.go | 27 ----------- 2 files changed, 75 deletions(-) delete mode 100644 network/binpacket/msg_bin_player_joined_party.go diff --git a/network/binpacket/msg_bin_player_joined_party.go b/network/binpacket/msg_bin_player_joined_party.go deleted file mode 100644 index d3f3ff575..000000000 --- a/network/binpacket/msg_bin_player_joined_party.go +++ /dev/null @@ -1,48 +0,0 @@ -package binpacket - -import ( - "github.com/Andoryuuta/Erupe/network" - "github.com/Andoryuuta/Erupe/network/mhfpacket" - "github.com/Andoryuuta/byteframe" -) - -type PartyJoinType uint8 - -const ( - JoinedLocalParty PartyJoinType = 0x01 - JoinedYourParty PartyJoinType = 0x04 -) - -type MsgBinPlayerJoinedParty struct { - CharID uint32 - PartyJoinType PartyJoinType - Unk1 uint16 -} - -// Opcode returns the ID associated with this packet type. -func (m *MsgBinPlayerJoinedParty) Opcode() network.PacketID { - return network.MSG_SYS_CASTED_BINARY -} - -func (m *MsgBinPlayerJoinedParty) Parse(bf *byteframe.ByteFrame) error { - panic("Not implemented") -} - -// Build builds a binary packet from the current data. -func (m *MsgBinPlayerJoinedParty) Build(bf *byteframe.ByteFrame) error { - payload := byteframe.NewByteFrame() - - payload.WriteUint16(0x02) - payload.WriteUint8(uint8(m.PartyJoinType)) - payload.WriteUint16(m.Unk1) - payload.WriteBytes([]byte{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}) - - pkt := &mhfpacket.MsgSysCastedBinary{ - CharID: m.CharID, - Type0: 0x03, - Type1: 0x03, - RawDataPayload: payload.Data(), - } - - return pkt.Build(bf) -} diff --git a/server/channelserver/handlers.go b/server/channelserver/handlers.go index 3fff8e738..e71f52cae 100644 --- a/server/channelserver/handlers.go +++ b/server/channelserver/handlers.go @@ -6,7 +6,6 @@ import ( "encoding/base64" "encoding/hex" "fmt" - "github.com/Andoryuuta/Erupe/network/binpacket" "io/ioutil" "os" "path/filepath" @@ -602,32 +601,6 @@ func handleMsgSysReserveStage(s *Session, p mhfpacket.MHFPacket) { s.QueueAck(pkt.AckHandle, []byte{0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}) } - for _, charID := range stage.clients { - if charID == s.charID { - continue - } - - // Notify joining player of all existing party members - s.QueueSendMHF(&binpacket.MsgBinPlayerJoinedParty{ - CharID: charID, - PartyJoinType: binpacket.JoinedYourParty, - Unk1: 0x01, - }) - } - - // Notify players in room that player has joined a party - s.stage.BroadcastMHF(&binpacket.MsgBinPlayerJoinedParty{ - CharID: s.charID, - PartyJoinType: binpacket.JoinedLocalParty, - Unk1: 0x01, - }, s) - - // Notify players in party that player has joined - stage.BroadcastMHF(&binpacket.MsgBinPlayerJoinedParty{ - CharID: s.charID, - PartyJoinType: binpacket.JoinedYourParty, - Unk1: 0x01, - }, s) } func handleMsgSysUnreserveStage(s *Session, p mhfpacket.MHFPacket) {