From fd061e695f7b96256590c274a4fb999456f28564 Mon Sep 17 00:00:00 2001 From: wish Date: Fri, 29 Jul 2022 01:39:16 +1000 Subject: [PATCH] update various packets --- .../mhfpacket/msg_mhf_add_achievement.go | 14 +++--- .../mhfpacket/msg_mhf_enumerate_airoulist.go | 14 +++--- .../mhfpacket/msg_mhf_enumerate_guacot.go | 10 ++-- .../mhfpacket/msg_mhf_enumerate_guild.go | 34 ++++++------- .../mhfpacket/msg_mhf_mercenary_huntdata.go | 14 +++--- Erupe/network/mhfpacket/msg_mhf_read_mail.go | 10 ++-- .../mhfpacket/msg_mhf_read_mercenary_m.go | 16 +++--- .../mhfpacket/msg_mhf_update_guild_icon.go | 12 ++--- .../mhfpacket/msg_mhf_update_guild_item.go | 50 +++++++++---------- .../msg_mhf_update_guild_message_board.go | 22 ++++---- .../mhfpacket/msg_mhf_update_interior.go | 16 +++--- Erupe/network/mhfpacket/msg_mhf_vote_festa.go | 24 ++++----- .../mhfpacket/msg_sys_check_semaphore.go | 17 +++---- .../channelserver/handlers_semaphore.go | 2 +- .../channelserver/sys_channel_server.go | 38 +++++++------- 15 files changed, 144 insertions(+), 149 deletions(-) diff --git a/Erupe/network/mhfpacket/msg_mhf_add_achievement.go b/Erupe/network/mhfpacket/msg_mhf_add_achievement.go index 2ba0a1bdb..c127c3437 100644 --- a/Erupe/network/mhfpacket/msg_mhf_add_achievement.go +++ b/Erupe/network/mhfpacket/msg_mhf_add_achievement.go @@ -1,16 +1,18 @@ package mhfpacket import ( + "errors" + + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfAddAchievement represents the MSG_MHF_ADD_ACHIEVEMENT type MsgMhfAddAchievement struct { AchievementID uint8 - Unk1 uint16 - Unk2 uint16 + Unk1 uint16 + Unk2 uint16 } // Opcode returns the ID associated with this packet type. @@ -23,14 +25,10 @@ func (m *MsgMhfAddAchievement) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli m.AchievementID = bf.ReadUint8() m.Unk1 = bf.ReadUint16() m.Unk2 = bf.ReadUint16() - // doesn't expect a response return nil } // Build builds a binary packet from the current data. func (m *MsgMhfAddAchievement) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - bf.WriteUint8(m.AchievementID) - bf.WriteUint16(m.Unk1) - bf.WriteUint16(m.Unk2) - return nil + return errors.New("NOT IMPLEMENTED") } diff --git a/Erupe/network/mhfpacket/msg_mhf_enumerate_airoulist.go b/Erupe/network/mhfpacket/msg_mhf_enumerate_airoulist.go index 428b014ca..5af0d4c6d 100644 --- a/Erupe/network/mhfpacket/msg_mhf_enumerate_airoulist.go +++ b/Erupe/network/mhfpacket/msg_mhf_enumerate_airoulist.go @@ -1,18 +1,18 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfEnumerateAiroulist represents the MSG_MHF_ENUMERATE_AIROULIST type MsgMhfEnumerateAiroulist struct { AckHandle uint32 - Unk0 uint16 - Unk1 uint16 + Unk0 uint16 + Unk1 uint16 } // Opcode returns the ID associated with this packet type. @@ -23,8 +23,8 @@ func (m *MsgMhfEnumerateAiroulist) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfEnumerateAiroulist) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { m.AckHandle = bf.ReadUint32() - m.Unk0 = bf.ReadUint16() - m.Unk1 = bf.ReadUint16() + m.Unk0 = bf.ReadUint16() + m.Unk1 = bf.ReadUint16() return nil } diff --git a/Erupe/network/mhfpacket/msg_mhf_enumerate_guacot.go b/Erupe/network/mhfpacket/msg_mhf_enumerate_guacot.go index 4abe87e07..4fcdba523 100644 --- a/Erupe/network/mhfpacket/msg_mhf_enumerate_guacot.go +++ b/Erupe/network/mhfpacket/msg_mhf_enumerate_guacot.go @@ -1,9 +1,11 @@ package mhfpacket import ( + "errors" + + "erupe-ce/common/byteframe" "erupe-ce/network" "erupe-ce/network/clientctx" - "erupe-ce/common/byteframe" ) // MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT @@ -30,9 +32,5 @@ func (m *MsgMhfEnumerateGuacot) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl // Build builds a binary packet from the current data. func (m *MsgMhfEnumerateGuacot) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - bf.WriteUint32(m.AckHandle) - bf.WriteUint16(m.Unk0) - bf.WriteUint16(m.Unk1) - bf.WriteUint16(m.Unk2) - return nil + return errors.New("NOT IMPLEMENTED") } diff --git a/Erupe/network/mhfpacket/msg_mhf_enumerate_guild.go b/Erupe/network/mhfpacket/msg_mhf_enumerate_guild.go index b8f5bd2c8..777017cc4 100644 --- a/Erupe/network/mhfpacket/msg_mhf_enumerate_guild.go +++ b/Erupe/network/mhfpacket/msg_mhf_enumerate_guild.go @@ -1,29 +1,29 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) type EnumerateGuildType uint8 const ( - ENUMERATE_GUILD_TYPE_GUILD_NAME = 0x01 - ENUMERATE_GUILD_TYPE_LEADER_NAME = 0x02 - ENUMERATE_GUILD_TYPE_LEADER_ID = 0x03 - ENUMERATE_GUILD_TYPE_ORDER_MEMBERS = 0x04 - ENUMERATE_GUILD_TYPE_ORDER_REGISTRATION = 0x05 - ENUMERATE_GUILD_TYPE_ORDER_RANK = 0x06 - ENUMERATE_GUILD_TYPE_MOTTO = 0x07 - ENUMERATE_GUILD_TYPE_RECRUITING = 0x08 - ENUMERATE_ALLIANCE_TYPE_ALLIANCE_NAME = 0x09 - ENUMERATE_ALLIANCE_TYPE_LEADER_NAME = 0x0A - ENUMERATE_ALLIANCE_TYPE_LEADER_ID = 0x0B - ENUMERATE_ALLIANCE_TYPE_ORDER_MEMBERS = 0x0C - ENUMERATE_ALLIANCE_TYPE_ORDER_REGISTRATION = 0x0D + ENUMERATE_GUILD_TYPE_GUILD_NAME = 0x01 + ENUMERATE_GUILD_TYPE_LEADER_NAME = 0x02 + ENUMERATE_GUILD_TYPE_LEADER_ID = 0x03 + ENUMERATE_GUILD_TYPE_ORDER_MEMBERS = 0x04 + ENUMERATE_GUILD_TYPE_ORDER_REGISTRATION = 0x05 + ENUMERATE_GUILD_TYPE_ORDER_RANK = 0x06 + ENUMERATE_GUILD_TYPE_MOTTO = 0x07 + ENUMERATE_GUILD_TYPE_RECRUITING = 0x08 + ENUMERATE_ALLIANCE_TYPE_ALLIANCE_NAME = 0x09 + ENUMERATE_ALLIANCE_TYPE_LEADER_NAME = 0x0A + ENUMERATE_ALLIANCE_TYPE_LEADER_ID = 0x0B + ENUMERATE_ALLIANCE_TYPE_ORDER_MEMBERS = 0x0C + ENUMERATE_ALLIANCE_TYPE_ORDER_REGISTRATION = 0x0D ) // MsgMhfEnumerateGuild represents the MSG_MHF_ENUMERATE_GUILD @@ -43,7 +43,7 @@ func (m *MsgMhfEnumerateGuild) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli m.AckHandle = bf.ReadUint32() m.Type = EnumerateGuildType(bf.ReadUint8()) m.RawDataPayload = bf.DataFromCurrent() - bf.Seek(int64(len(bf.Data()) - 2), 0) + bf.Seek(int64(len(bf.Data())-2), 0) return nil } diff --git a/Erupe/network/mhfpacket/msg_mhf_mercenary_huntdata.go b/Erupe/network/mhfpacket/msg_mhf_mercenary_huntdata.go index e99822f17..bdcdf35a3 100644 --- a/Erupe/network/mhfpacket/msg_mhf_mercenary_huntdata.go +++ b/Erupe/network/mhfpacket/msg_mhf_mercenary_huntdata.go @@ -1,17 +1,17 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfMercenaryHuntdata represents the MSG_MHF_MERCENARY_HUNTDATA -type MsgMhfMercenaryHuntdata struct{ - AckHandle uint32 - Unk0 uint8 +type MsgMhfMercenaryHuntdata struct { + AckHandle uint32 + Unk0 uint8 } // Opcode returns the ID associated with this packet type. diff --git a/Erupe/network/mhfpacket/msg_mhf_read_mail.go b/Erupe/network/mhfpacket/msg_mhf_read_mail.go index 3895438bd..1d2b03cf5 100644 --- a/Erupe/network/mhfpacket/msg_mhf_read_mail.go +++ b/Erupe/network/mhfpacket/msg_mhf_read_mail.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfReadMail represents the MSG_MHF_READ_MAIL @@ -19,7 +19,7 @@ type MsgMhfReadMail struct { // This is the index within the current mail list Index uint8 - Unk0 uint16 + Unk0 uint16 } // Opcode returns the ID associated with this packet type. @@ -32,7 +32,7 @@ func (m *MsgMhfReadMail) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientCon m.AckHandle = bf.ReadUint32() m.AccIndex = bf.ReadUint8() m.Index = bf.ReadUint8() - m.Unk0 = bf.ReadUint16() + m.Unk0 = bf.ReadUint16() return nil } diff --git a/Erupe/network/mhfpacket/msg_mhf_read_mercenary_m.go b/Erupe/network/mhfpacket/msg_mhf_read_mercenary_m.go index f0e967a3f..75c973a74 100644 --- a/Erupe/network/mhfpacket/msg_mhf_read_mercenary_m.go +++ b/Erupe/network/mhfpacket/msg_mhf_read_mercenary_m.go @@ -1,18 +1,18 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfReadMercenaryM represents the MSG_MHF_READ_MERCENARY_M -type MsgMhfReadMercenaryM struct{ - AckHandle uint32 - CharID uint32 - Unk0 uint32 +type MsgMhfReadMercenaryM struct { + AckHandle uint32 + CharID uint32 + Unk0 uint32 } // Opcode returns the ID associated with this packet type. diff --git a/Erupe/network/mhfpacket/msg_mhf_update_guild_icon.go b/Erupe/network/mhfpacket/msg_mhf_update_guild_icon.go index a6d8f9bd9..6e3a780e5 100644 --- a/Erupe/network/mhfpacket/msg_mhf_update_guild_icon.go +++ b/Erupe/network/mhfpacket/msg_mhf_update_guild_icon.go @@ -1,11 +1,11 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) type GuildIconMsgPart struct { @@ -16,7 +16,7 @@ type GuildIconMsgPart struct { Rotation uint8 Red uint8 Green uint8 - Blue uint8 + Blue uint8 PosX uint16 PosY uint16 } @@ -52,8 +52,8 @@ func (m *MsgMhfUpdateGuildIcon) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cl Size: bf.ReadUint8(), Rotation: bf.ReadUint8(), Red: bf.ReadUint8(), - Green: bf.ReadUint8(), - Blue: bf.ReadUint8(), + Green: bf.ReadUint8(), + Blue: bf.ReadUint8(), PosX: bf.ReadUint16(), PosY: bf.ReadUint16(), } diff --git a/Erupe/network/mhfpacket/msg_mhf_update_guild_item.go b/Erupe/network/mhfpacket/msg_mhf_update_guild_item.go index ffe67363a..3eb37a8cb 100644 --- a/Erupe/network/mhfpacket/msg_mhf_update_guild_item.go +++ b/Erupe/network/mhfpacket/msg_mhf_update_guild_item.go @@ -1,27 +1,27 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) -type Item struct{ - Unk0 uint32 - ItemId uint16 - Amount uint16 - Unk1 uint32 +type Item struct { + Unk0 uint32 + ItemId uint16 + Amount uint16 + Unk1 uint32 } // MsgMhfUpdateGuildItem represents the MSG_MHF_UPDATE_GUILD_ITEM -type MsgMhfUpdateGuildItem struct{ - AckHandle uint32 - GuildId uint32 - Amount uint16 - Unk1 uint16 // 0x00 0x00 - Items []Item // Array of updated item IDs +type MsgMhfUpdateGuildItem struct { + AckHandle uint32 + GuildId uint32 + Amount uint16 + Unk1 uint16 // 0x00 0x00 + Items []Item // Array of updated item IDs } // Opcode returns the ID associated with this packet type. @@ -31,18 +31,18 @@ func (m *MsgMhfUpdateGuildItem) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfUpdateGuildItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.GuildId = bf.ReadUint32() - m.Amount = bf.ReadUint16() - m.Unk1 = bf.ReadUint16() - m.Items = make([]Item, int(m.Amount)) + m.AckHandle = bf.ReadUint32() + m.GuildId = bf.ReadUint32() + m.Amount = bf.ReadUint16() + m.Unk1 = bf.ReadUint16() + m.Items = make([]Item, int(m.Amount)) - for i := 0; i < int(m.Amount); i++ { - m.Items[i].Unk0 = bf.ReadUint32() - m.Items[i].ItemId = bf.ReadUint16() - m.Items[i].Amount = bf.ReadUint16() - m.Items[i].Unk1 = bf.ReadUint32() - } + for i := 0; i < int(m.Amount); i++ { + m.Items[i].Unk0 = bf.ReadUint32() + m.Items[i].ItemId = bf.ReadUint16() + m.Items[i].Amount = bf.ReadUint16() + m.Items[i].Unk1 = bf.ReadUint32() + } return nil } diff --git a/Erupe/network/mhfpacket/msg_mhf_update_guild_message_board.go b/Erupe/network/mhfpacket/msg_mhf_update_guild_message_board.go index 8a634b4fc..b8c4ee5e0 100644 --- a/Erupe/network/mhfpacket/msg_mhf_update_guild_message_board.go +++ b/Erupe/network/mhfpacket/msg_mhf_update_guild_message_board.go @@ -1,18 +1,18 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUpdateGuildMessageBoard represents the MSG_MHF_UPDATE_GUILD_MESSAGE_BOARD type MsgMhfUpdateGuildMessageBoard struct { AckHandle uint32 - MessageOp uint32 - Request []byte + MessageOp uint32 + Request []byte } // Opcode returns the ID associated with this packet type. @@ -22,12 +22,12 @@ func (m *MsgMhfUpdateGuildMessageBoard) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfUpdateGuildMessageBoard) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.MessageOp = bf.ReadUint32() - if m.MessageOp != 5 { - m.Request = bf.DataFromCurrent() - bf.Seek(int64(len(bf.Data()) - 2), 0) - } + m.AckHandle = bf.ReadUint32() + m.MessageOp = bf.ReadUint32() + if m.MessageOp != 5 { + m.Request = bf.DataFromCurrent() + bf.Seek(int64(len(bf.Data())-2), 0) + } return nil } diff --git a/Erupe/network/mhfpacket/msg_mhf_update_interior.go b/Erupe/network/mhfpacket/msg_mhf_update_interior.go index d22bb48ce..21e32d299 100644 --- a/Erupe/network/mhfpacket/msg_mhf_update_interior.go +++ b/Erupe/network/mhfpacket/msg_mhf_update_interior.go @@ -1,17 +1,17 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfUpdateInterior represents the MSG_MHF_UPDATE_INTERIOR type MsgMhfUpdateInterior struct { - AckHandle uint32 - InteriorData []byte + AckHandle uint32 + InteriorData []byte } // Opcode returns the ID associated with this packet type. @@ -21,9 +21,9 @@ func (m *MsgMhfUpdateInterior) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfUpdateInterior) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.InteriorData = bf.ReadBytes(20) - return nil + m.AckHandle = bf.ReadUint32() + m.InteriorData = bf.ReadBytes(20) + return nil } // Build builds a binary packet from the current data. diff --git a/Erupe/network/mhfpacket/msg_mhf_vote_festa.go b/Erupe/network/mhfpacket/msg_mhf_vote_festa.go index 2bbe75b82..b3c05d5fd 100644 --- a/Erupe/network/mhfpacket/msg_mhf_vote_festa.go +++ b/Erupe/network/mhfpacket/msg_mhf_vote_festa.go @@ -1,19 +1,19 @@ package mhfpacket import ( - "errors" + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfVoteFesta represents the MSG_MHF_VOTE_FESTA type MsgMhfVoteFesta struct { - AckHandle uint32 - Unk uint32 - GuildID uint32 - TrialID uint32 + AckHandle uint32 + Unk uint32 + GuildID uint32 + TrialID uint32 } // Opcode returns the ID associated with this packet type. @@ -23,11 +23,11 @@ func (m *MsgMhfVoteFesta) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfVoteFesta) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { - m.AckHandle = bf.ReadUint32() - m.Unk = bf.ReadUint32() - m.GuildID = bf.ReadUint32() - m.TrialID = bf.ReadUint32() - return nil + m.AckHandle = bf.ReadUint32() + m.Unk = bf.ReadUint32() + m.GuildID = bf.ReadUint32() + m.TrialID = bf.ReadUint32() + return nil } // Build builds a binary packet from the current data. diff --git a/Erupe/network/mhfpacket/msg_sys_check_semaphore.go b/Erupe/network/mhfpacket/msg_sys_check_semaphore.go index 2dec71930..ddeae028f 100644 --- a/Erupe/network/mhfpacket/msg_sys_check_semaphore.go +++ b/Erupe/network/mhfpacket/msg_sys_check_semaphore.go @@ -1,18 +1,17 @@ package mhfpacket -import ( - "errors" +import ( + "errors" - "erupe-ce/network/clientctx" - "erupe-ce/common/bfutil" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgSysCheckSemaphore represents the MSG_SYS_CHECK_SEMAPHORE -type MsgSysCheckSemaphore struct{ - AckHandle uint32 - StageID string +type MsgSysCheckSemaphore struct { + AckHandle uint32 + SemaphoreID string } // Opcode returns the ID associated with this packet type. @@ -31,4 +30,4 @@ func (m *MsgSysCheckSemaphore) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli // Build builds a binary packet from the current data. func (m *MsgSysCheckSemaphore) Build(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { return errors.New("NOT IMPLEMENTED") -} \ No newline at end of file +} diff --git a/Erupe/server/channelserver/handlers_semaphore.go b/Erupe/server/channelserver/handlers_semaphore.go index 630105ea3..4040f1ec2 100644 --- a/Erupe/server/channelserver/handlers_semaphore.go +++ b/Erupe/server/channelserver/handlers_semaphore.go @@ -134,7 +134,7 @@ func handleMsgSysCheckSemaphore(s *Session, p mhfpacket.MHFPacket) { pkt := p.(*mhfpacket.MsgSysCheckSemaphore) resp := []byte{0x00, 0x00, 0x00, 0x00} s.server.semaphoreLock.Lock() - if _, exists := s.server.semaphore[pkt.StageID]; exists { + if _, exists := s.server.semaphore[pkt.SemaphoreID]; exists { resp = []byte{0x00, 0x00, 0x00, 0x01} } s.server.semaphoreLock.Unlock() diff --git a/Erupe/server/channelserver/sys_channel_server.go b/Erupe/server/channelserver/sys_channel_server.go index 8b530ee13..f954ea97a 100644 --- a/Erupe/server/channelserver/sys_channel_server.go +++ b/Erupe/server/channelserver/sys_channel_server.go @@ -5,8 +5,8 @@ import ( "net" "sync" - ps "erupe-ce/common/pascalstring" "erupe-ce/common/byteframe" + ps "erupe-ce/common/pascalstring" "erupe-ce/config" "erupe-ce/network/binpacket" "erupe-ce/network/mhfpacket" @@ -19,17 +19,17 @@ type StageIdType = string const ( // GlobalStage is the stage that is used for all users. - MezeportaStageId StageIdType = "sl1Ns200p0a0u0" - GuildHallLv1StageId StageIdType = "sl1Ns202p0a0u0" - GuildHallLv2StageId StageIdType = "sl1Ns203p0a0u0" - GuildHallLv3StageId StageIdType = "sl1Ns204p0a0u0" - PugiFarmStageId StageIdType = "sl1Ns205p0a0u0" - RastaBarStageId StageIdType = "sl1Ns211p0a0u0" - PalloneCaravanStageId StageIdType = "sl1Ns260p0a0u0" - GookFarmStageId StageIdType = "sl1Ns265p0a0u0" - DivaFountainStageId StageIdType = "sl2Ns379p0a0u0" - DivaHallStageId StageIdType = "sl1Ns445p0a0u0" - MezFesStageId StageIdType = "sl1Ns462p0a0u0" + MezeportaStageId StageIdType = "sl1Ns200p0a0u0" + GuildHallLv1StageId StageIdType = "sl1Ns202p0a0u0" + GuildHallLv2StageId StageIdType = "sl1Ns203p0a0u0" + GuildHallLv3StageId StageIdType = "sl1Ns204p0a0u0" + PugiFarmStageId StageIdType = "sl1Ns205p0a0u0" + RastaBarStageId StageIdType = "sl1Ns211p0a0u0" + PalloneCaravanStageId StageIdType = "sl1Ns260p0a0u0" + GookFarmStageId StageIdType = "sl1Ns265p0a0u0" + DivaFountainStageId StageIdType = "sl2Ns379p0a0u0" + DivaHallStageId StageIdType = "sl1Ns445p0a0u0" + MezFesStageId StageIdType = "sl1Ns462p0a0u0" ) // Config struct allows configuring the server. @@ -335,9 +335,9 @@ func (s *Server) BroadcastChatMessage(message string) { func (s *Server) BroadcastRaviente(ip uint32, port uint16, stage []byte, _type uint8) { bf := byteframe.NewByteFrame() bf.SetLE() - bf.WriteUint16(0) // Unk + bf.WriteUint16(0) // Unk bf.WriteUint16(0x43) // Data len - bf.WriteUint16(3) // Unk len + bf.WriteUint16(3) // Unk len var text string switch _type { case 2: @@ -351,15 +351,15 @@ func (s *Server) BroadcastRaviente(ip uint32, port uint16, stage []byte, _type u } ps.Uint16(bf, text, false) bf.WriteBytes([]byte{0x5F, 0x53, 0x00}) - bf.WriteUint32(ip) // IP address + bf.WriteUint32(ip) // IP address bf.WriteUint16(port) // Port - bf.WriteUint16(0) // Unk + bf.WriteUint16(0) // Unk bf.WriteNullTerminatedBytes(stage) bf.WriteBytes(make([]byte, 17)) s.WorldcastMHF(&mhfpacket.MsgSysCastedBinary{ - CharID: 0x00000000, - BroadcastType: BroadcastTypeSemaphore, - MessageType: BinaryMessageTypeChat, + CharID: 0x00000000, + BroadcastType: BroadcastTypeSemaphore, + MessageType: BinaryMessageTypeChat, RawDataPayload: bf.Data(), }, nil) }