mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 08:55:31 +01:00
Add temp user binary parts 2 & 3
This commit is contained in:
@@ -2,6 +2,7 @@ package channelserver
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/base64"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -310,9 +311,6 @@ func handleMsgSysEnterStage(s *Session, p mhfpacket.MHFPacket) {
|
||||
CharID: s.charID,
|
||||
BinaryType: 1,
|
||||
}, s)
|
||||
|
||||
// Just the first user binary type (name) for right now.
|
||||
/*
|
||||
s.stage.BroadcastMHF(&mhfpacket.MsgSysNotifyUserBinary{
|
||||
CharID: s.charID,
|
||||
BinaryType: 2,
|
||||
@@ -321,7 +319,6 @@ func handleMsgSysEnterStage(s *Session, p mhfpacket.MHFPacket) {
|
||||
CharID: s.charID,
|
||||
BinaryType: 3,
|
||||
}, s)
|
||||
*/
|
||||
|
||||
// TODO(Andoryuuta): Notify this client about all of the existing clients in the stage.
|
||||
s.logger.Info("Notifying entree about existing stage clients")
|
||||
@@ -569,6 +566,18 @@ func handleMsgSysGetUserBinary(s *Session, p mhfpacket.MHFPacket) {
|
||||
// Stub name response with character ID
|
||||
resp.WriteBytes([]byte(fmt.Sprintf("CID%d", s.charID)))
|
||||
resp.WriteUint8(0) // NULL terminator.
|
||||
} else if pkt.BinaryType == 2 {
|
||||
data, err := base64.StdEncoding.DecodeString("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBn8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAwAAAAAAAAAAAAAABAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
resp.WriteBytes(data)
|
||||
} else if pkt.BinaryType == 3 {
|
||||
data, err := base64.StdEncoding.DecodeString("AQAAA2ea5P8ATgEA/wEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABBn8AAAAAAAAAAAABAKAMAAAAAAAAAAAAACgAAAAAAAAAAAABAsQOAAAAAAAAAAABA6UMAAAAAAAAAAABBKAMAAAAAAAAAAABBToNAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAgACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD/////AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
resp.WriteBytes(data)
|
||||
}
|
||||
|
||||
doSizedAckResp(s, pkt.AckHandle, resp.Data())
|
||||
|
||||
Reference in New Issue
Block a user