mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 08:25:09 +01:00
Merge branch 'main' into feature/diva
# Conflicts: # server/channelserver/handlers_quest.go
This commit is contained in:
@@ -1,15 +1,24 @@
|
||||
package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
import (
|
||||
"errors"
|
||||
"erupe-ce/common/bfutil"
|
||||
"erupe-ce/common/stringsupport"
|
||||
|
||||
"erupe-ce/network/clientctx"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
)
|
||||
|
||||
// MsgMhfApplyBbsArticle represents the MSG_MHF_APPLY_BBS_ARTICLE
|
||||
type MsgMhfApplyBbsArticle struct{}
|
||||
type MsgMhfApplyBbsArticle struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 []byte
|
||||
Name string
|
||||
Title string
|
||||
Description string
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfApplyBbsArticle) Opcode() network.PacketID {
|
||||
@@ -18,7 +27,13 @@ func (m *MsgMhfApplyBbsArticle) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfApplyBbsArticle) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadBytes(16)
|
||||
m.Name = stringsupport.SJISToUTF8(bfutil.UpToNull(bf.ReadBytes(32)))
|
||||
m.Title = stringsupport.SJISToUTF8(bfutil.UpToNull(bf.ReadBytes(128)))
|
||||
m.Description = stringsupport.SJISToUTF8(bfutil.UpToNull(bf.ReadBytes(256)))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -11,7 +11,8 @@ import (
|
||||
// MsgMhfCheckMonthlyItem represents the MSG_MHF_CHECK_MONTHLY_ITEM
|
||||
type MsgMhfCheckMonthlyItem struct {
|
||||
AckHandle uint32
|
||||
Unk uint32
|
||||
Type uint8
|
||||
Unk []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -22,7 +23,8 @@ func (m *MsgMhfCheckMonthlyItem) Opcode() network.PacketID {
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfCheckMonthlyItem) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk = bf.ReadUint32()
|
||||
m.Type = bf.ReadUint8()
|
||||
m.Unk = bf.ReadBytes(3)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -1,15 +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"
|
||||
)
|
||||
|
||||
// MsgMhfGetBbsSnsStatus represents the MSG_MHF_GET_BBS_SNS_STATUS
|
||||
type MsgMhfGetBbsSnsStatus struct{}
|
||||
type MsgMhfGetBbsSnsStatus struct {
|
||||
AckHandle uint32
|
||||
Unk []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetBbsSnsStatus) Opcode() network.PacketID {
|
||||
@@ -18,7 +21,9 @@ func (m *MsgMhfGetBbsSnsStatus) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetBbsSnsStatus) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk = bf.ReadBytes(12)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -1,15 +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"
|
||||
)
|
||||
|
||||
// MsgMhfGetBbsUserStatus represents the MSG_MHF_GET_BBS_USER_STATUS
|
||||
type MsgMhfGetBbsUserStatus struct{}
|
||||
type MsgMhfGetBbsUserStatus struct {
|
||||
AckHandle uint32
|
||||
Unk []byte
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
func (m *MsgMhfGetBbsUserStatus) Opcode() network.PacketID {
|
||||
@@ -18,7 +21,9 @@ func (m *MsgMhfGetBbsUserStatus) Opcode() network.PacketID {
|
||||
|
||||
// Parse parses the packet from binary
|
||||
func (m *MsgMhfGetBbsUserStatus) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
return errors.New("NOT IMPLEMENTED")
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk = bf.ReadBytes(12)
|
||||
return nil
|
||||
}
|
||||
|
||||
// Build builds a binary packet from the current data.
|
||||
|
||||
@@ -2,12 +2,12 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
ps "erupe-ce/common/pascalstring"
|
||||
"golang.org/x/exp/slices"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
ps "erupe-ce/common/pascalstring"
|
||||
"erupe-ce/network"
|
||||
"erupe-ce/network/clientctx"
|
||||
"golang.org/x/exp/slices"
|
||||
"math"
|
||||
)
|
||||
|
||||
/*
|
||||
@@ -77,18 +77,27 @@ func (m *MsgSysUpdateRight) Build(bf *byteframe.ByteFrame, ctx *clientctx.Client
|
||||
|
||||
func Courses() []Course {
|
||||
var courses = []Course{
|
||||
{[]string{"Trial", "TL"}, 1, 0x00000002},
|
||||
{[]string{"HunterLife", "HL"}, 2, 0x00000004},
|
||||
{[]string{"ExtraA", "Extra", "EX"}, 3, 0x00000008},
|
||||
{[]string{"ExtraB"}, 4, 0x00000010},
|
||||
{[]string{"Mobile"}, 5, 0x00000020},
|
||||
{[]string{"Premium"}, 6, 0x00000040},
|
||||
{[]string{"Pallone"}, 7, 0x00000080},
|
||||
{[]string{"Assist", "Legend", "Rasta"}, 8, 0x00000100}, // Legend
|
||||
{[]string{"Netcafe", "N", "Cafe"}, 9, 0x00000200},
|
||||
{[]string{"Hiden", "Secret"}, 10, 0x00000400}, // Secret
|
||||
{[]string{"HunterSupport", "HunterAid", "Support", "Royal", "Aid"}, 11, 0x00000800}, // Royal
|
||||
{[]string{"NetcafeBoost", "NBoost", "Boost"}, 12, 0x00001000},
|
||||
{Aliases: []string{"Trial", "TL"}, ID: 1},
|
||||
{Aliases: []string{"HunterLife", "HL"}, ID: 2},
|
||||
{Aliases: []string{"Extra", "ExtraA", "EX"}, ID: 3},
|
||||
{Aliases: []string{"ExtraB"}, ID: 4},
|
||||
{Aliases: []string{"Mobile"}, ID: 5},
|
||||
{Aliases: []string{"Premium"}, ID: 6},
|
||||
{Aliases: []string{"Pallone", "ExtraC"}, ID: 7},
|
||||
{Aliases: []string{"Assist", "Legend", "Rasta"}, ID: 8}, // Legend
|
||||
{Aliases: []string{"N"}, ID: 9},
|
||||
{Aliases: []string{"Hiden", "Secret"}, ID: 10}, // Secret
|
||||
{Aliases: []string{"HunterSupport", "HunterAid", "Support", "Aid", "Royal"}, ID: 11}, // Royal
|
||||
{Aliases: []string{"NBoost", "NetCafeBoost", "Boost"}, ID: 12},
|
||||
// 13-25 do nothing
|
||||
{Aliases: []string{"NetCafe", "Cafe", "InternetCafe"}, ID: 26},
|
||||
{Aliases: []string{"HLRenewing", "HLR", "HLRenewal", "HLRenew"}, ID: 27},
|
||||
{Aliases: []string{"EXRenewing", "EXR", "EXRenewal", "EXRenew"}, ID: 28},
|
||||
{Aliases: []string{"Free"}, ID: 29},
|
||||
// 30 = real netcafe bit
|
||||
}
|
||||
for i := range courses {
|
||||
courses[i].Value = uint32(math.Pow(2, float64(courses[i].ID)))
|
||||
}
|
||||
return courses
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user