rename rights variable

This commit is contained in:
wish
2022-08-14 18:09:06 +10:00
parent 6b70771884
commit d48a64e208
2 changed files with 3 additions and 3 deletions

View File

@@ -37,7 +37,7 @@ type ClientRight struct {
// MsgSysUpdateRight represents the MSG_SYS_UPDATE_RIGHT // MsgSysUpdateRight represents the MSG_SYS_UPDATE_RIGHT
type MsgSysUpdateRight struct { type MsgSysUpdateRight struct {
ClientRespAckHandle uint32 // If non-0, requests the client to send back a MSG_SYS_ACK packet with this value. ClientRespAckHandle uint32 // If non-0, requests the client to send back a MSG_SYS_ACK packet with this value.
Unk1 uint32 Bitfield uint32
Rights []ClientRight Rights []ClientRight
UnkSize uint16 // Count of some buf up to 0x800 bytes following it. UnkSize uint16 // Count of some buf up to 0x800 bytes following it.
} }
@@ -55,7 +55,7 @@ func (m *MsgSysUpdateRight) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client
// Build builds a binary packet from the current data. // Build builds a binary packet from the current data.
func (m *MsgSysUpdateRight) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { func (m *MsgSysUpdateRight) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
bf.WriteUint32(m.ClientRespAckHandle) bf.WriteUint32(m.ClientRespAckHandle)
bf.WriteUint32(m.Unk1) bf.WriteUint32(m.Bitfield)
bf.WriteUint16(uint16(len(m.Rights))) bf.WriteUint16(uint16(len(m.Rights)))
bf.WriteUint16(0) bf.WriteUint16(0)
for _, v := range m.Rights { for _, v := range m.Rights {

View File

@@ -79,7 +79,7 @@ func doAckSimpleFail(s *Session, ackHandle uint32, data []byte) {
func updateRights(s *Session) { func updateRights(s *Session) {
update := &mhfpacket.MsgSysUpdateRight{ update := &mhfpacket.MsgSysUpdateRight{
ClientRespAckHandle: 0, ClientRespAckHandle: 0,
Unk1: s.rights, Bitfield: s.rights,
Rights: []mhfpacket.ClientRight{ Rights: []mhfpacket.ClientRight{
{ {
ID: 1, ID: 1,