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 (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"log"
|
"log"
|
||||||
@@ -310,18 +311,14 @@ func handleMsgSysEnterStage(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
CharID: s.charID,
|
CharID: s.charID,
|
||||||
BinaryType: 1,
|
BinaryType: 1,
|
||||||
}, s)
|
}, s)
|
||||||
|
s.stage.BroadcastMHF(&mhfpacket.MsgSysNotifyUserBinary{
|
||||||
// Just the first user binary type (name) for right now.
|
CharID: s.charID,
|
||||||
/*
|
BinaryType: 2,
|
||||||
s.stage.BroadcastMHF(&mhfpacket.MsgSysNotifyUserBinary{
|
}, s)
|
||||||
CharID: s.charID,
|
s.stage.BroadcastMHF(&mhfpacket.MsgSysNotifyUserBinary{
|
||||||
BinaryType: 2,
|
CharID: s.charID,
|
||||||
}, s)
|
BinaryType: 3,
|
||||||
s.stage.BroadcastMHF(&mhfpacket.MsgSysNotifyUserBinary{
|
}, s)
|
||||||
CharID: s.charID,
|
|
||||||
BinaryType: 3,
|
|
||||||
}, s)
|
|
||||||
*/
|
|
||||||
|
|
||||||
// TODO(Andoryuuta): Notify this client about all of the existing clients in the stage.
|
// TODO(Andoryuuta): Notify this client about all of the existing clients in the stage.
|
||||||
s.logger.Info("Notifying entree about existing stage clients")
|
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
|
// Stub name response with character ID
|
||||||
resp.WriteBytes([]byte(fmt.Sprintf("CID%d", s.charID)))
|
resp.WriteBytes([]byte(fmt.Sprintf("CID%d", s.charID)))
|
||||||
resp.WriteUint8(0) // NULL terminator.
|
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())
|
doSizedAckResp(s, pkt.AckHandle, resp.Data())
|
||||||
|
|||||||
Reference in New Issue
Block a user