refactored gametime and utils folder which decouples entrance and sign from channel servers

This commit is contained in:
stratic-dev
2024-10-09 08:34:13 +01:00
parent 4348aa02a8
commit e8fc650d49
496 changed files with 1484 additions and 1443 deletions

1
.gitignore vendored
View File

@@ -9,3 +9,4 @@ savedata/*/
*.bat
/docker/db-data
screenshots/*
/docker/Servers

View File

@@ -15,6 +15,7 @@ import (
"erupe-ce/server/discordbot"
"erupe-ce/server/entranceserver"
"erupe-ce/server/signserver"
"erupe-ce/utils/gametime"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
@@ -138,7 +139,7 @@ func main() {
logger.Info("Database: Finished clearing")
}
logger.Info(fmt.Sprintf("Server Time: %s", channelserver.TimeAdjusted().String()))
logger.Info(fmt.Sprintf("Server Time: %s", gametime.TimeAdjusted().String()))
// Now start our server(s).

View File

@@ -1,9 +1,9 @@
package binpacket
import (
"erupe-ce/common/byteframe"
"erupe-ce/common/stringsupport"
"erupe-ce/network"
"erupe-ce/utils/byteframe"
"erupe-ce/utils/stringsupport"
)
// ChatType represents the chat message type (Thanks to @Alice on discord for identifying these!)

View File

@@ -1,9 +1,9 @@
package binpacket
import (
"erupe-ce/common/byteframe"
"erupe-ce/common/stringsupport"
"erupe-ce/network"
"erupe-ce/utils/byteframe"
"erupe-ce/utils/stringsupport"
)
type MsgBinMailNotify struct {

View File

@@ -1,8 +1,8 @@
package binpacket
import (
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/utils/byteframe"
)
// MsgBinTargeted is a format used for some broadcast types

View File

@@ -1,9 +1,9 @@
package mhfpacket
import (
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// Parser is the interface that wraps the Parse method.

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgCaExchangeItem represents the MSG_CA_EXCHANGE_ITEM

View File

@@ -6,7 +6,7 @@ import (
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgHead represents the MSG_HEAD

View File

@@ -6,7 +6,7 @@ import (
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcceptReadReward represents the MSG_MHF_ACCEPT_READ_REWARD

View File

@@ -4,9 +4,9 @@ import (
"errors"
_config "erupe-ce/config"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireCafeItem represents the MSG_MHF_ACQUIRE_CAFE_ITEM

View File

@@ -5,14 +5,14 @@ import (
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireDistItem represents the MSG_MHF_ACQUIRE_DIST_ITEM
type MsgMhfAcquireDistItem struct {
AckHandle uint32
AckHandle uint32
DistributionType uint8
DistributionID uint32
DistributionID uint32
}
// Opcode returns the ID associated with this packet type.

View File

@@ -3,7 +3,7 @@ package mhfpacket
import (
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireExchangeShop represents the MSG_MHF_ACQUIRE_EXCHANGE_SHOP

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireFesta represents the MSG_MHF_ACQUIRE_FESTA

View File

@@ -5,13 +5,13 @@ import (
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireFestaIntermediatePrize represents the MSG_MHF_ACQUIRE_FESTA_INTERMEDIATE_PRIZE
type MsgMhfAcquireFestaIntermediatePrize struct {
AckHandle uint32
PrizeID uint32
PrizeID uint32
}
// Opcode returns the ID associated with this packet type.
@@ -22,7 +22,7 @@ func (m *MsgMhfAcquireFestaIntermediatePrize) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAcquireFestaIntermediatePrize) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.PrizeID = bf.ReadUint32()
m.PrizeID = bf.ReadUint32()
return nil
}

View File

@@ -1,17 +1,17 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireFestaPersonalPrize represents the MSG_MHF_ACQUIRE_FESTA_PERSONAL_PRIZE
type MsgMhfAcquireFestaPersonalPrize struct {
AckHandle uint32
PrizeID uint32
AckHandle uint32
PrizeID uint32
}
// Opcode returns the ID associated with this packet type.
@@ -21,9 +21,9 @@ func (m *MsgMhfAcquireFestaPersonalPrize) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAcquireFestaPersonalPrize) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.PrizeID = bf.ReadUint32()
return nil
m.AckHandle = bf.ReadUint32()
m.PrizeID = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.

View File

@@ -1,17 +1,17 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireGuildAdventure represents the MSG_MHF_ACQUIRE_GUILD_ADVENTURE
type MsgMhfAcquireGuildAdventure struct {
AckHandle uint32
ID uint32
AckHandle uint32
ID uint32
}
// Opcode returns the ID associated with this packet type.
@@ -21,9 +21,9 @@ func (m *MsgMhfAcquireGuildAdventure) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAcquireGuildAdventure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.ID = bf.ReadUint32()
return nil
m.AckHandle = bf.ReadUint32()
m.ID = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireGuildTresure represents the MSG_MHF_ACQUIRE_GUILD_TRESURE

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireGuildTresureSouvenir represents the MSG_MHF_ACQUIRE_GUILD_TRESURE_SOUVENIR

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireItem represents the MSG_MHF_ACQUIRE_ITEM

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireMonthlyItem represents the MSG_MHF_ACQUIRE_MONTHLY_ITEM

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireMonthlyReward represents the MSG_MHF_ACQUIRE_MONTHLY_REWARD

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireTitle represents the MSG_MHF_ACQUIRE_TITLE

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireTournament represents the MSG_MHF_ACQUIRE_TOURNAMENT

View File

@@ -1,30 +1,30 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAcquireUdItem represents the MSG_MHF_ACQUIRE_UD_ITEM
type MsgMhfAcquireUdItem struct {
AckHandle uint32
Unk0 uint8
// from gal
// daily = 0
// personal = 1
// personal rank = 2
// guild rank = 3
// gcp = 4
// from cat
// treasure achievement = 5
// personal achievement = 6
// guild achievement = 7
RewardType uint8
Unk2 uint8 // Number of uint32s to read?
Unk3 []byte
AckHandle uint32
Unk0 uint8
// from gal
// daily = 0
// personal = 1
// personal rank = 2
// guild rank = 3
// gcp = 4
// from cat
// treasure achievement = 5
// personal achievement = 6
// guild achievement = 7
RewardType uint8
Unk2 uint8 // Number of uint32s to read?
Unk3 []byte
}
// Opcode returns the ID associated with this packet type.
@@ -34,13 +34,13 @@ func (m *MsgMhfAcquireUdItem) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAcquireUdItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint8()
m.RewardType = bf.ReadUint8()
m.Unk2 = bf.ReadUint8()
for i := uint8(0); i < m.Unk2; i++ {
bf.ReadUint32()
}
m.Unk2 = bf.ReadUint8()
for i := uint8(0); i < m.Unk2; i++ {
bf.ReadUint32()
}
return nil
}

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddAchievement represents the MSG_MHF_ADD_ACHIEVEMENT

View File

@@ -1,18 +1,18 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddGuildMissionCount represents the MSG_MHF_ADD_GUILD_MISSION_COUNT
type MsgMhfAddGuildMissionCount struct {
AckHandle uint32
MissionID uint32
Count uint32
AckHandle uint32
MissionID uint32
Count uint32
}
// Opcode returns the ID associated with this packet type.
@@ -22,10 +22,10 @@ func (m *MsgMhfAddGuildMissionCount) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAddGuildMissionCount) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.MissionID = bf.ReadUint32()
m.Count = bf.ReadUint32()
return nil
m.AckHandle = bf.ReadUint32()
m.MissionID = bf.ReadUint32()
m.Count = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.

View File

@@ -1,17 +1,17 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddGuildWeeklyBonusExceptionalUser represents the MSG_MHF_ADD_GUILD_WEEKLY_BONUS_EXCEPTIONAL_USER
type MsgMhfAddGuildWeeklyBonusExceptionalUser struct {
AckHandle uint32
NumUsers uint8
AckHandle uint32
NumUsers uint8
}
// Opcode returns the ID associated with this packet type.
@@ -21,9 +21,9 @@ func (m *MsgMhfAddGuildWeeklyBonusExceptionalUser) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfAddGuildWeeklyBonusExceptionalUser) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.NumUsers = bf.ReadUint8()
return nil
m.AckHandle = bf.ReadUint32()
m.NumUsers = bf.ReadUint8()
return nil
}
// Build builds a binary packet from the current data.

View File

@@ -3,7 +3,7 @@ package mhfpacket
import (
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddKouryouPoint represents the MSG_MHF_ADD_KOURYOU_POINT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddRewardSongCount represents the MSG_MHF_ADD_REWARD_SONG_COUNT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddUdPoint represents the MSG_MHF_ADD_UD_POINT

View File

@@ -3,7 +3,7 @@ package mhfpacket
import (
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/common/byteframe"
"erupe-ce/utils/byteframe"
)
// MsgMhfAddUdTacticsPoint represents the MSG_MHF_ADD_UD_TACTICS_POINT

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAnnounce represents the MSG_MHF_ANNOUNCE

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfAnswerGuildScout represents the MSG_MHF_ANSWER_GUILD_SCOUT

View File

@@ -2,12 +2,12 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/bfutil"
"erupe-ce/common/stringsupport"
"erupe-ce/utils/bfutil"
"erupe-ce/utils/stringsupport"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfApplyBbsArticle represents the MSG_MHF_APPLY_BBS_ARTICLE

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfApplyCampaign represents the MSG_MHF_APPLY_CAMPAIGN

View File

@@ -2,10 +2,10 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
_config "erupe-ce/config"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfApplyDistItem represents the MSG_MHF_APPLY_DIST_ITEM

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfArrangeGuildMember represents the MSG_MHF_ARRANGE_GUILD_MEMBER

View File

@@ -1,17 +1,17 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCancelGuildMissionTarget represents the MSG_MHF_CANCEL_GUILD_MISSION_TARGET
type MsgMhfCancelGuildMissionTarget struct {
AckHandle uint32
MissionID uint32
AckHandle uint32
MissionID uint32
}
// Opcode returns the ID associated with this packet type.
@@ -21,9 +21,9 @@ func (m *MsgMhfCancelGuildMissionTarget) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfCancelGuildMissionTarget) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.MissionID = bf.ReadUint32()
return nil
m.AckHandle = bf.ReadUint32()
m.MissionID = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCancelGuildScout represents the MSG_MHF_CANCEL_GUILD_SCOUT

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCaravanMyRank represents the MSG_MHF_CARAVAN_MY_RANK

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCaravanMyScore represents the MSG_MHF_CARAVAN_MY_SCORE

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCaravanRanking represents the MSG_MHF_CARAVAN_RANKING

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfChargeFesta represents the MSG_MHF_CHARGE_FESTA

View File

@@ -1,18 +1,18 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfChargeGuildAdventure represents the MSG_MHF_CHARGE_GUILD_ADVENTURE
type MsgMhfChargeGuildAdventure struct {
AckHandle uint32
ID uint32
Amount uint32
AckHandle uint32
ID uint32
Amount uint32
}
// Opcode returns the ID associated with this packet type.
@@ -22,10 +22,10 @@ func (m *MsgMhfChargeGuildAdventure) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfChargeGuildAdventure) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.ID = bf.ReadUint32()
m.Amount = bf.ReadUint32()
return nil
m.AckHandle = bf.ReadUint32()
m.ID = bf.ReadUint32()
m.Amount = bf.ReadUint32()
return nil
}
// Build builds a binary packet from the current data.

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCheckDailyCafepoint represents the MSG_MHF_CHECK_DAILY_CAFEPOINT

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCheckMonthlyItem represents the MSG_MHF_CHECK_MONTHLY_ITEM

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCheckWeeklyStamp represents the MSG_MHF_CHECK_WEEKLY_STAMP

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfContractMercenary represents the MSG_MHF_CONTRACT_MERCENARY

View File

@@ -3,10 +3,10 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/common/stringsupport"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
"erupe-ce/utils/stringsupport"
)
// MsgMhfCreateGuild represents the MSG_MHF_CREATE_GUILD

View File

@@ -3,10 +3,10 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/common/stringsupport"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
"erupe-ce/utils/stringsupport"
)
// MsgMhfCreateJoint represents the MSG_MHF_CREATE_JOINT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfCreateMercenary represents the MSG_MHF_CREATE_MERCENARY

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfDebugPostValue represents the MSG_MHF_DEBUG_POST_VALUE

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfDisplayedAchievement represents the MSG_MHF_DISPLAYED_ACHIEVEMENT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnterTournamentQuest represents the MSG_MHF_ENTER_TOURNAMENT_QUEST

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEntryFesta represents the MSG_MHF_ENTRY_FESTA

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEntryRookieGuild represents the MSG_MHF_ENTRY_ROOKIE_GUILD

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEntryTournament represents the MSG_MHF_ENTRY_TOURNAMENT

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateAiroulist represents the MSG_MHF_ENUMERATE_AIROULIST

View File

@@ -1,9 +1,9 @@
package mhfpacket
import (
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateCampaign represents the MSG_MHF_ENUMERATE_CAMPAIGN

View File

@@ -2,10 +2,10 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
_config "erupe-ce/config"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateDistItem represents the MSG_MHF_ENUMERATE_DIST_ITEM

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateEvent represents the MSG_MHF_ENUMERATE_EVENT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateFestaIntermediatePrize represents the MSG_MHF_ENUMERATE_FESTA_INTERMEDIATE_PRIZE

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateFestaMember represents the MSG_MHF_ENUMERATE_FESTA_MEMBER

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateFestaPersonalPrize represents the MSG_MHF_ENUMERATE_FESTA_PERSONAL_PRIZE

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateGuacot represents the MSG_MHF_ENUMERATE_GUACOT

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
type EnumerateGuildType uint8

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateGuildItem represents the MSG_MHF_ENUMERATE_GUILD_ITEM

View File

@@ -2,9 +2,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateGuildMember represents the MSG_MHF_ENUMERATE_GUILD_MEMBER

View File

@@ -1,20 +1,20 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateGuildMessageBoard represents the MSG_MHF_ENUMERATE_GUILD_MESSAGE_BOARD
type MsgMhfEnumerateGuildMessageBoard struct{
AckHandle uint32
Unk0 uint32
MaxPosts uint32 // always 100, even on news (00000064)
// returning more than 4 news posts WILL softlock
BoardType uint32 // 0 => message, 1 => news
type MsgMhfEnumerateGuildMessageBoard struct {
AckHandle uint32
Unk0 uint32
MaxPosts uint32 // always 100, even on news (00000064)
// returning more than 4 news posts WILL softlock
BoardType uint32 // 0 => message, 1 => news
}
// Opcode returns the ID associated with this packet type.
@@ -24,10 +24,10 @@ func (m *MsgMhfEnumerateGuildMessageBoard) Opcode() network.PacketID {
// Parse parses the packet from binary
func (m *MsgMhfEnumerateGuildMessageBoard) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint32()
m.MaxPosts = bf.ReadUint32()
m.BoardType = bf.ReadUint32()
m.AckHandle = bf.ReadUint32()
m.Unk0 = bf.ReadUint32()
m.MaxPosts = bf.ReadUint32()
m.BoardType = bf.ReadUint32()
return nil
}

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateGuildTresure represents the MSG_MHF_ENUMERATE_GUILD_TRESURE

View File

@@ -2,11 +2,11 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/stringsupport"
"erupe-ce/utils/stringsupport"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateHouse represents the MSG_MHF_ENUMERATE_HOUSE

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateInvGuild represents the MSG_MHF_ENUMERATE_INV_GUILD

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateItem represents the MSG_MHF_ENUMERATE_ITEM

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateMercenaryLog represents the MSG_MHF_ENUMERATE_MERCENARY_LOG

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateOrder represents the MSG_MHF_ENUMERATE_ORDER

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumeratePrice represents the MSG_MHF_ENUMERATE_PRICE

View File

@@ -4,9 +4,9 @@ import (
"errors"
_config "erupe-ce/config"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateQuest represents the MSG_MHF_ENUMERATE_QUEST

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateRanking represents the MSG_MHF_ENUMERATE_RANKING

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateRengokuRanking represents the MSG_MHF_ENUMERATE_RENGOKU_RANKING

View File

@@ -4,9 +4,9 @@ import (
"errors"
_config "erupe-ce/config"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateShop represents the MSG_MHF_ENUMERATE_SHOP

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateTitle represents the MSG_MHF_ENUMERATE_TITLE

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateUnionItem represents the MSG_MHF_ENUMERATE_UNION_ITEM

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfEnumerateWarehouse represents the MSG_MHF_ENUMERATE_WAREHOUSE

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfExchangeFpoint2Item represents the MSG_MHF_EXCHANGE_FPOINT_2_ITEM

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfExchangeItem2Fpoint represents the MSG_MHF_EXCHANGE_ITEM_2_FPOINT

View File

@@ -1,15 +1,15 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfExchangeKouryouPoint represents the MSG_MHF_EXCHANGE_KOURYOU_POINT
type MsgMhfExchangeKouryouPoint struct{
type MsgMhfExchangeKouryouPoint struct {
AckHandle uint32
KouryouPoints uint32
}

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfExchangeWeeklyStamp represents the MSG_MHF_EXCHANGE_WEEKLY_STAMP

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGenerateUdGuildMap represents the MSG_MHF_GENERATE_UD_GUILD_MAP

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetAchievement represents the MSG_MHF_GET_ACHIEVEMENT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetAdditionalBeatReward represents the MSG_MHF_GET_ADDITIONAL_BEAT_REWARD

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBbsSnsStatus represents the MSG_MHF_GET_BBS_SNS_STATUS

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBbsUserStatus represents the MSG_MHF_GET_BBS_USER_STATUS

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBoostRight represents the MSG_MHF_GET_BOOST_RIGHT

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBoostTime represents the MSG_MHF_GET_BOOST_TIME

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBoostTimeLimit represents the MSG_MHF_GET_BOOST_TIME_LIMIT

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBoxGachaInfo represents the MSG_MHF_GET_BOX_GACHA_INFO

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"erupe-ce/common/byteframe"
"erupe-ce/network"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetBreakSeibatuLevelReward represents the MSG_MHF_GET_BREAK_SEIBATU_LEVEL_REWARD

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetCaAchievementHist represents the MSG_MHF_GET_CA_ACHIEVEMENT_HIST

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetCaUniqueID represents the MSG_MHF_GET_CA_UNIQUE_ID

View File

@@ -1,11 +1,11 @@
package mhfpacket
import (
"errors"
"errors"
"erupe-ce/network/clientctx"
"erupe-ce/network"
"erupe-ce/common/byteframe"
"erupe-ce/network/clientctx"
"erupe-ce/utils/byteframe"
)
// MsgMhfGetCafeDuration represents the MSG_MHF_GET_CAFE_DURATION

Some files were not shown because too many files have changed in this diff Show More