mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
various Tower changes
This commit is contained in:
@@ -15,12 +15,12 @@ type MsgMhfPostTenrouirai struct {
|
|||||||
Unk1 uint8
|
Unk1 uint8
|
||||||
GuildID uint32
|
GuildID uint32
|
||||||
Unk3 uint8
|
Unk3 uint8
|
||||||
Unk4 uint16
|
Floors uint16
|
||||||
Unk5 uint16
|
Antiques uint16
|
||||||
Unk6 uint16
|
Chests uint16
|
||||||
Unk7 uint16
|
Cats uint16
|
||||||
Unk8 uint16
|
TRP uint16
|
||||||
Unk9 uint16
|
Slays uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
// Opcode returns the ID associated with this packet type.
|
// Opcode returns the ID associated with this packet type.
|
||||||
@@ -35,12 +35,12 @@ func (m *MsgMhfPostTenrouirai) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Cli
|
|||||||
m.Unk1 = bf.ReadUint8()
|
m.Unk1 = bf.ReadUint8()
|
||||||
m.GuildID = bf.ReadUint32()
|
m.GuildID = bf.ReadUint32()
|
||||||
m.Unk3 = bf.ReadUint8()
|
m.Unk3 = bf.ReadUint8()
|
||||||
m.Unk4 = bf.ReadUint16()
|
m.Floors = bf.ReadUint16()
|
||||||
m.Unk5 = bf.ReadUint16()
|
m.Antiques = bf.ReadUint16()
|
||||||
m.Unk6 = bf.ReadUint16()
|
m.Chests = bf.ReadUint16()
|
||||||
m.Unk7 = bf.ReadUint16()
|
m.Cats = bf.ReadUint16()
|
||||||
m.Unk8 = bf.ReadUint16()
|
m.TRP = bf.ReadUint16()
|
||||||
m.Unk9 = bf.ReadUint16()
|
m.Slays = bf.ReadUint16()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
var totalCount, returnedCount uint16
|
var totalCount, returnedCount uint16
|
||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
bf.WriteUint16(0)
|
bf.WriteUint16(0)
|
||||||
err := filepath.Walk(fmt.Sprintf("%s/events/", s.server.erupeConfig.BinPath), func(path string, info os.FileInfo, err error) error {
|
filepath.Walk(fmt.Sprintf("%s/events/", s.server.erupeConfig.BinPath), func(path string, info os.FileInfo, err error) error {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
} else if info.IsDir() {
|
} else if info.IsDir() {
|
||||||
@@ -107,10 +107,6 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
})
|
})
|
||||||
if err != nil {
|
|
||||||
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 18))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
type tuneValue struct {
|
type tuneValue struct {
|
||||||
ID uint16
|
ID uint16
|
||||||
@@ -144,8 +140,13 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
{ID: 1028, Value: 100},
|
{ID: 1028, Value: 100},
|
||||||
{ID: 1030, Value: 8},
|
{ID: 1030, Value: 8},
|
||||||
{ID: 1031, Value: 100},
|
{ID: 1031, Value: 100},
|
||||||
{ID: 1032, Value: 0}, // isValid_partner
|
{ID: 1032, Value: 0}, // isValid_partner
|
||||||
|
{ID: 1044, Value: 200}, // get_rate_tload_time_out
|
||||||
|
{ID: 1045, Value: 0}, // get_rate_tower_treasure_preset
|
||||||
{ID: 1046, Value: 99},
|
{ID: 1046, Value: 99},
|
||||||
|
{ID: 1048, Value: 0}, // get_rate_tower_log_disable
|
||||||
|
{ID: 1049, Value: 10}, // get_rate_tower_gem_max
|
||||||
|
{ID: 1050, Value: 1}, // get_rate_tower_gem_set
|
||||||
{ID: 1051, Value: 200},
|
{ID: 1051, Value: 200},
|
||||||
{ID: 1052, Value: 200},
|
{ID: 1052, Value: 200},
|
||||||
{ID: 1063, Value: 50000},
|
{ID: 1063, Value: 50000},
|
||||||
|
|||||||
@@ -136,10 +136,10 @@ type TenrouiraiCharScore struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type TenrouiraiProgress struct {
|
type TenrouiraiProgress struct {
|
||||||
Unk0 uint8
|
Completed uint8
|
||||||
Unk1 uint16
|
Mission1 uint16
|
||||||
Unk2 uint16
|
Mission2 uint16
|
||||||
Unk3 uint16
|
Mission3 uint16
|
||||||
}
|
}
|
||||||
|
|
||||||
type TenrouiraiTicket struct {
|
type TenrouiraiTicket struct {
|
||||||
@@ -149,9 +149,15 @@ type TenrouiraiTicket struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type TenrouiraiData struct {
|
type TenrouiraiData struct {
|
||||||
Unk0 uint8
|
Zone uint8
|
||||||
Unk1 uint8
|
Mission uint8
|
||||||
Unk2 uint16
|
// 1 = Floors climbed
|
||||||
|
// 2 = Collect antiques
|
||||||
|
// 3 = Open chests
|
||||||
|
// 4 = Cats saved
|
||||||
|
// 5 = TRP acquisition
|
||||||
|
// 6 = Monster slays
|
||||||
|
Goal uint16
|
||||||
Unk3 uint16
|
Unk3 uint16
|
||||||
Unk4 uint8
|
Unk4 uint8
|
||||||
Unk5 uint8
|
Unk5 uint8
|
||||||
@@ -173,6 +179,9 @@ func handleMsgMhfGetTenrouirai(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
var data []*byteframe.ByteFrame
|
var data []*byteframe.ByteFrame
|
||||||
|
|
||||||
tenrouirai := Tenrouirai{
|
tenrouirai := Tenrouirai{
|
||||||
|
Progress: []TenrouiraiProgress{
|
||||||
|
{1, 0, 0, 0},
|
||||||
|
},
|
||||||
Data: []TenrouiraiData{
|
Data: []TenrouiraiData{
|
||||||
{1, 1, 80, 0, 2, 2, 1, 1, 2, 2},
|
{1, 1, 80, 0, 2, 2, 1, 1, 2, 2},
|
||||||
{1, 4, 16, 0, 2, 2, 1, 1, 2, 2},
|
{1, 4, 16, 0, 2, 2, 1, 1, 2, 2},
|
||||||
@@ -211,12 +220,12 @@ func handleMsgMhfGetTenrouirai(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch pkt.Unk1 {
|
switch pkt.Unk1 {
|
||||||
case 4:
|
case 1:
|
||||||
for _, tdata := range tenrouirai.Data {
|
for _, tdata := range tenrouirai.Data {
|
||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
bf.WriteUint8(tdata.Unk0)
|
bf.WriteUint8(tdata.Zone)
|
||||||
bf.WriteUint8(tdata.Unk1)
|
bf.WriteUint8(tdata.Mission)
|
||||||
bf.WriteUint16(tdata.Unk2)
|
bf.WriteUint16(tdata.Goal)
|
||||||
bf.WriteUint16(tdata.Unk3)
|
bf.WriteUint16(tdata.Unk3)
|
||||||
bf.WriteUint8(tdata.Unk4)
|
bf.WriteUint8(tdata.Unk4)
|
||||||
bf.WriteUint8(tdata.Unk5)
|
bf.WriteUint8(tdata.Unk5)
|
||||||
@@ -226,6 +235,15 @@ func handleMsgMhfGetTenrouirai(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
bf.WriteUint8(tdata.Unk9)
|
bf.WriteUint8(tdata.Unk9)
|
||||||
data = append(data, bf)
|
data = append(data, bf)
|
||||||
}
|
}
|
||||||
|
case 4:
|
||||||
|
for _, progress := range tenrouirai.Progress {
|
||||||
|
bf := byteframe.NewByteFrame()
|
||||||
|
bf.WriteUint8(progress.Completed)
|
||||||
|
bf.WriteUint16(progress.Mission1)
|
||||||
|
bf.WriteUint16(progress.Mission2)
|
||||||
|
bf.WriteUint16(progress.Mission3)
|
||||||
|
data = append(data, bf)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
doAckEarthSucceed(s, pkt.AckHandle, data)
|
doAckEarthSucceed(s, pkt.AckHandle, data)
|
||||||
@@ -241,12 +259,12 @@ func handleMsgMhfPostTenrouirai(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
zap.Uint8("Unk1", pkt.Unk1),
|
zap.Uint8("Unk1", pkt.Unk1),
|
||||||
zap.Uint32("GuildID", pkt.GuildID),
|
zap.Uint32("GuildID", pkt.GuildID),
|
||||||
zap.Uint8("Unk3", pkt.Unk3),
|
zap.Uint8("Unk3", pkt.Unk3),
|
||||||
zap.Uint16("Unk4", pkt.Unk4),
|
zap.Uint16("Floors", pkt.Floors),
|
||||||
zap.Uint16("Unk5", pkt.Unk5),
|
zap.Uint16("Antiques", pkt.Antiques),
|
||||||
zap.Uint16("Unk6", pkt.Unk6),
|
zap.Uint16("Chests", pkt.Chests),
|
||||||
zap.Uint16("Unk7", pkt.Unk7),
|
zap.Uint16("Cats", pkt.Cats),
|
||||||
zap.Uint16("Unk8", pkt.Unk8),
|
zap.Uint16("TRP", pkt.TRP),
|
||||||
zap.Uint16("Unk9", pkt.Unk9),
|
zap.Uint16("Slays", pkt.Slays),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user