mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-15 00:15:08 +01:00
Added some conquest packets and caplink paths
This commit is contained in:
10
config.json
10
config.json
@@ -22,9 +22,9 @@
|
||||
"CommandPrefix": "!",
|
||||
"AutoCreateAccount": true,
|
||||
"DefaultCourses": [1, 23, 24],
|
||||
"EarthStatus": 21,
|
||||
"EarthID": 0,
|
||||
"EarthMonsters": [0, 0, 0, 0],
|
||||
"EarthStatus": 2,
|
||||
"EarthID": 1,
|
||||
"EarthMonsters": [116, 107, 2, 36],
|
||||
"SaveDumps": {
|
||||
"Enabled": true,
|
||||
"RawEnabled": false,
|
||||
@@ -47,8 +47,8 @@
|
||||
"CapLink": {
|
||||
"Values": [51728, 20000, 51729, 1, 20000],
|
||||
"Key": "",
|
||||
"Host": "",
|
||||
"Port": 80
|
||||
"Host": "127.0.0.1",
|
||||
"Port": 8080
|
||||
}
|
||||
},
|
||||
"GameplayOptions": {
|
||||
|
||||
@@ -2,6 +2,7 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
@@ -10,9 +11,9 @@ import (
|
||||
|
||||
// MsgMhfGetBreakSeibatuLevelReward represents the MSG_MHF_GET_BREAK_SEIBATU_LEVEL_REWARD
|
||||
type MsgMhfGetBreakSeibatuLevelReward struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 int32
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
EarthMonster int32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +25,8 @@ func (m *MsgMhfGetBreakSeibatuLevelReward) Opcode() network.PacketID {
|
||||
func (m *MsgMhfGetBreakSeibatuLevelReward) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadInt32()
|
||||
m.EarthMonster = bf.ReadInt32()
|
||||
fmt.Printf("MsgMhfGetBreakSeibatuLevelReward: Unk0:[%d] EarthMonster:[%d] \n\n", m.Unk0, m.EarthMonster)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
@@ -10,12 +11,12 @@ import (
|
||||
|
||||
// MsgMhfGetFixedSeibatuRankingTable represents the MSG_MHF_GET_FIXED_SEIBATU_RANKING_TABLE
|
||||
type MsgMhfGetFixedSeibatuRankingTable struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 int32
|
||||
Unk2 int32
|
||||
Unk3 int32
|
||||
Unk4 int32
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 int32
|
||||
EarthMonster int32
|
||||
Unk3 int32
|
||||
Unk4 int32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -28,9 +29,11 @@ func (m *MsgMhfGetFixedSeibatuRankingTable) Parse(bf *byteframe.ByteFrame, ctx *
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadInt32()
|
||||
m.Unk2 = bf.ReadInt32()
|
||||
m.EarthMonster = bf.ReadInt32()
|
||||
m.Unk3 = bf.ReadInt32()
|
||||
m.Unk4 = bf.ReadInt32()
|
||||
fmt.Printf("MsgMhfGetFixedSeibatuRankingTable: Unk0:[%d] Unk1:[%d] EarthMonster:[%d] Unk3:[%d] Unk4:[%d]\n\n", m.Unk0, m.Unk1, m.EarthMonster, m.Unk3, m.Unk4)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
@@ -28,6 +29,8 @@ func (m *MsgMhfGetTinyBin) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientC
|
||||
m.Unk0 = bf.ReadUint8()
|
||||
m.Unk1 = bf.ReadUint8()
|
||||
m.Unk2 = bf.ReadUint8()
|
||||
fmt.Printf("MsgMhfGetTinyBin: Unk0:[%d] Unk1:[%d] Unk2:[%d] \n\n", m.Unk0, m.Unk1, m.Unk2)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ import (
|
||||
|
||||
// MsgMhfGetWeeklySeibatuRankingReward represents the MSG_MHF_GET_WEEKLY_SEIBATU_RANKING_REWARD
|
||||
type MsgMhfGetWeeklySeibatuRankingReward struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Operation uint32
|
||||
ID uint32
|
||||
Unk3 uint32
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Operation uint32
|
||||
ID uint32
|
||||
EarthMonster uint32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -29,8 +29,8 @@ func (m *MsgMhfGetWeeklySeibatuRankingReward) Parse(bf *byteframe.ByteFrame, ctx
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Operation = bf.ReadUint32()
|
||||
m.ID = bf.ReadUint32()
|
||||
m.Unk3 = bf.ReadUint32()
|
||||
fmt.Printf("MsgMhfGetWeeklySeibatuRankingReward: Unk0:[%d] Operation:[%d] ID:[%d] Unk3:[%d]\n\n", m.Unk0, m.Operation, m.ID, m.Unk3)
|
||||
m.EarthMonster = bf.ReadUint32()
|
||||
fmt.Printf("MsgMhfGetWeeklySeibatuRankingReward: Unk0:[%d] Operation:[%d] ID:[%d] EarthMonster:[%d]\n\n", m.Unk0, m.Operation, m.ID, m.EarthMonster)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package mhfpacket
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/network"
|
||||
@@ -10,9 +11,9 @@ import (
|
||||
|
||||
// MsgMhfReadLastWeekBeatRanking represents the MSG_MHF_READ_LAST_WEEK_BEAT_RANKING
|
||||
type MsgMhfReadLastWeekBeatRanking struct {
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
Unk1 int32
|
||||
AckHandle uint32
|
||||
Unk0 uint32
|
||||
EarthMonster int32
|
||||
}
|
||||
|
||||
// Opcode returns the ID associated with this packet type.
|
||||
@@ -24,7 +25,10 @@ func (m *MsgMhfReadLastWeekBeatRanking) Opcode() network.PacketID {
|
||||
func (m *MsgMhfReadLastWeekBeatRanking) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||
m.AckHandle = bf.ReadUint32()
|
||||
m.Unk0 = bf.ReadUint32()
|
||||
m.Unk1 = bf.ReadInt32()
|
||||
m.EarthMonster = bf.ReadInt32()
|
||||
|
||||
fmt.Printf("MsgMhfGetFixedSeibatuRankingTable: Unk0:[%d] EarthMonster:[%d] \n\n", m.Unk0, m.EarthMonster)
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@@ -61,6 +61,24 @@ func (s *APIServer) Start() error {
|
||||
r.HandleFunc("/api/ss/bbs/upload.php", s.ScreenShot)
|
||||
r.HandleFunc("/api/ss/bbs/{id}", s.ScreenShotGet)
|
||||
r.HandleFunc("/v1/crypt/commonkey/rsa", s.CapLinkCrypt)
|
||||
//Captured Links from messing around with caplink (wii u doesnt use crypt handle)
|
||||
//Captured so the poor soul who has to reverse this has something to go off..
|
||||
//CA:: is a search term for a function related...
|
||||
// r.HandleFunc("/v1/profile&unique_id=", s.CapLink) //CRASH!
|
||||
// r.HandleFunc("/v1/profile/content/list&unique_id=", s.CapLink) //CRASH!
|
||||
// r.HandleFunc("/v1/friend/request/send/list", s.CapLink)
|
||||
// r.HandleFunc("/v1/friend/request/receive/list", s.CapLink)
|
||||
// r.HandleFunc("/v1/friend/list", s.CapLink)
|
||||
// r.HandleFunc("/v1/friend/tag/content/list", s.CapLink)
|
||||
// r.HandleFunc("/v1/chat/group/list", s.CapLink)
|
||||
// r.HandleFunc("/v1/content/invite/list", s.CapLink)
|
||||
// r.HandleFunc("/v1/point/get ", s.CapLink)
|
||||
// r.HandleFunc("/v1/point/item/list&target=3", s.CapLink)
|
||||
// r.HandleFunc("/v1/user/search/list&keyword_type=0&keyword=STRING", s.CapLink)
|
||||
// r.HandleFunc("/v1/user/search/list&keyword_type=1&keyword=STRING", s.CapLink)
|
||||
// r.HandleFunc("/v1/user/search/list&keyword_type=2&keyword=STRING", s.CapLink)
|
||||
//Cup Icon Triggers MSG_MHF_APPLY_DIST_ITEM -> MSG_MHF_ENUMERATE_DIST_ITEM
|
||||
|
||||
r.Use(s.loggingMiddleware)
|
||||
|
||||
handler := handlers.CORS(handlers.AllowedHeaders([]string{"Content-Type"}))(r)
|
||||
|
||||
@@ -1097,7 +1097,8 @@ func handleMsgMhfGetEarthStatus(s *Session, p mhfpacket.MHFPacket) {
|
||||
bf.WriteInt32(s.server.erupeConfig.EarthStatus)
|
||||
bf.WriteInt32(s.server.erupeConfig.EarthID)
|
||||
for i, m := range s.server.erupeConfig.EarthMonsters {
|
||||
if _config.ErupeConfig.RealClientMode <= _config.G9 {
|
||||
//Changed from G9 to G8 to get conquest working in g9.1
|
||||
if _config.ErupeConfig.RealClientMode <= _config.G8 {
|
||||
if i == 3 {
|
||||
break
|
||||
}
|
||||
|
||||
@@ -96,7 +96,9 @@ func handleMsgMhfGetRyoudama(s *Session, p mhfpacket.MHFPacket) {
|
||||
func handleMsgMhfPostRyoudama(s *Session, p mhfpacket.MHFPacket) {}
|
||||
|
||||
func handleMsgMhfGetTinyBin(s *Session, p mhfpacket.MHFPacket) {
|
||||
//Works for Tower but not Conquest
|
||||
|
||||
//Conquest: Unk0 0 Unk1 2 Unk2 1
|
||||
type TinyBinItem struct {
|
||||
ItemId uint16
|
||||
Amount uint8
|
||||
|
||||
@@ -2,20 +2,77 @@ package channelserver
|
||||
|
||||
import (
|
||||
"erupe-ce/common/byteframe"
|
||||
"erupe-ce/common/stringsupport"
|
||||
"erupe-ce/network/mhfpacket"
|
||||
)
|
||||
|
||||
func handleMsgMhfGetBreakSeibatuLevelReward(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfGetBreakSeibatuLevelReward)
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||
type BreakSeibatuLevelReward struct {
|
||||
Item int32
|
||||
Value int32
|
||||
Level int32
|
||||
Unk int32
|
||||
}
|
||||
|
||||
type WeeklySeibatuRankingReward struct {
|
||||
func handleMsgMhfGetBreakSeibatuLevelReward(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfGetBreakSeibatuLevelReward)
|
||||
var data []*byteframe.ByteFrame
|
||||
var weeklySeibatuRankingRewards []BreakSeibatuLevelReward
|
||||
|
||||
switch pkt.EarthMonster {
|
||||
case 116:
|
||||
weeklySeibatuRankingRewards = []BreakSeibatuLevelReward{
|
||||
{8, 3, 2, 0},
|
||||
{8, 3, 2, 0},
|
||||
{8, 3, 2, 0},
|
||||
{8, 3, 3, 0},
|
||||
{8, 3, 3, 0},
|
||||
{8, 3, 3, 0},
|
||||
{8, 3, 3, 0}}
|
||||
case 107:
|
||||
weeklySeibatuRankingRewards = []BreakSeibatuLevelReward{
|
||||
{4, 3, 1, 0},
|
||||
{4, 3, 2, 0},
|
||||
{4, 3, 3, 0},
|
||||
{4, 3, 4, 0},
|
||||
{4, 3, 5, 0}}
|
||||
case 2:
|
||||
weeklySeibatuRankingRewards = []BreakSeibatuLevelReward{
|
||||
{5, 3, 1, 0},
|
||||
{5, 3, 2, 0},
|
||||
{5, 3, 3, 0},
|
||||
{5, 3, 4, 0},
|
||||
{5, 3, 5, 0}}
|
||||
|
||||
case 36:
|
||||
weeklySeibatuRankingRewards = []BreakSeibatuLevelReward{
|
||||
{7, 3, 1, 0},
|
||||
{7, 3, 2, 0},
|
||||
{7, 3, 3, 0},
|
||||
{7, 3, 4, 0},
|
||||
{7, 3, 5, 0}}
|
||||
|
||||
default:
|
||||
weeklySeibatuRankingRewards = []BreakSeibatuLevelReward{
|
||||
{1, 3, 1, 0},
|
||||
{1, 3, 2, 0},
|
||||
{1, 3, 3, 0},
|
||||
{1, 3, 4, 0},
|
||||
{1, 3, 5, 0}}
|
||||
}
|
||||
|
||||
for _, seibatuData := range weeklySeibatuRankingRewards {
|
||||
bf := byteframe.NewByteFrame()
|
||||
|
||||
bf.WriteInt32(seibatuData.Item) // Item
|
||||
bf.WriteInt32(seibatuData.Value) // Value
|
||||
bf.WriteInt32(seibatuData.Level) //Level
|
||||
bf.WriteInt32(seibatuData.Unk)
|
||||
data = append(data, bf)
|
||||
}
|
||||
doAckEarthSucceed(s, pkt.AckHandle, data)
|
||||
}
|
||||
|
||||
type WeeklySeibatuRankingReward0 struct {
|
||||
Index0 int32 //Place Start
|
||||
Index1 int32 //Place Finish
|
||||
Index2 uint32 // UNK
|
||||
@@ -23,14 +80,236 @@ type WeeklySeibatuRankingReward struct {
|
||||
ID int32 //ID
|
||||
Value int32 // Value
|
||||
}
|
||||
type WeeklySeibatuRankingReward1 struct {
|
||||
Unk0 int32
|
||||
ID int32
|
||||
Amount uint32
|
||||
PlaceFrom int32
|
||||
PlaceTo int32
|
||||
}
|
||||
|
||||
func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfGetWeeklySeibatuRankingReward)
|
||||
var data []*byteframe.ByteFrame
|
||||
var weeklySeibatuRankingRewards []WeeklySeibatuRankingReward
|
||||
var weeklySeibatuRankingRewards []WeeklySeibatuRankingReward0
|
||||
var weeklySeibatuRankingRewardsWeird []WeeklySeibatuRankingReward1
|
||||
|
||||
switch pkt.Operation {
|
||||
case 1:
|
||||
switch pkt.ID { // Seems to align with EarthStatus 1 and 2
|
||||
case 1:
|
||||
switch pkt.EarthMonster {
|
||||
case 116:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
case 107:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
case 2:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
case 36:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
}
|
||||
//Conquest
|
||||
|
||||
case 2:
|
||||
switch pkt.EarthMonster {
|
||||
case 116:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
case 107:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
case 2:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
case 36:
|
||||
weeklySeibatuRankingRewardsWeird = []WeeklySeibatuRankingReward1{
|
||||
{0, 2, 3, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 6, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 15, 1, 100},
|
||||
{0, 2, 25, 1, 100},
|
||||
|
||||
{0, 2, 2, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 4, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 9, 101, 1000},
|
||||
{0, 2, 30, 101, 1000},
|
||||
|
||||
{0, 2, 2, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 4, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
}
|
||||
//Conquest
|
||||
|
||||
}
|
||||
case 3:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
|
||||
//Unk0
|
||||
//Unk1
|
||||
@@ -72,24 +351,24 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
//243401 = Route 1
|
||||
//I have a sneaky suspicion that the above massive array is feeding into this somehow....
|
||||
case 240031:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
{1, 1, 1, 7201, 12068, 1}}
|
||||
case 240041:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
{0, 0, 1, 7201, 12068, 1}}
|
||||
case 240042:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
{0, 0, 2, 7201, 12068, 1}}
|
||||
case 240051:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
{0, 0, 1, 7201, 12068, 1}}
|
||||
case 240052:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
{1, 1, 1, 7201, 12068, 1},
|
||||
}
|
||||
//Tower 260001 260003
|
||||
case 260001:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
|
||||
//Can only have 10 in each dist (It disapears otherwise)
|
||||
//{unk,unk,dist,seiabtuType,ItemID,Value}
|
||||
@@ -138,7 +417,7 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
{0, 0, 4, 7201, 12077, 1},
|
||||
}
|
||||
case 260003:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
//Adjust Floors done in database to make blue ?? Possible value here for dist
|
||||
//{Floor,unk,unk,seiabtuType,ItemID,Value}
|
||||
|
||||
@@ -165,7 +444,7 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
{18, 0, 0, 7201, 12073, 1},
|
||||
}
|
||||
default: //Covers all Pallone Requests... for now
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward{
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
// To do figure out values 3-5 its some sort of item structure
|
||||
//1st
|
||||
{1, 0, 0, 7202, 10, 10000},
|
||||
@@ -186,25 +465,117 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
}
|
||||
|
||||
}
|
||||
for _, seibatuData := range weeklySeibatuRankingRewards {
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteInt32(seibatuData.Index0)
|
||||
bf.WriteInt32(seibatuData.Index1)
|
||||
bf.WriteUint32(seibatuData.Index2)
|
||||
bf.WriteInt32(seibatuData.Type)
|
||||
bf.WriteInt32(seibatuData.ID)
|
||||
bf.WriteInt32(seibatuData.Value)
|
||||
data = append(data, bf)
|
||||
if pkt.Operation == 1 {
|
||||
for _, seibatuData := range weeklySeibatuRankingRewardsWeird {
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteInt32(seibatuData.Unk0)
|
||||
bf.WriteInt32(seibatuData.ID)
|
||||
bf.WriteUint32(seibatuData.Amount)
|
||||
bf.WriteInt32(seibatuData.PlaceFrom)
|
||||
bf.WriteInt32(seibatuData.PlaceTo)
|
||||
data = append(data, bf)
|
||||
}
|
||||
} else {
|
||||
for _, seibatuData := range weeklySeibatuRankingRewards {
|
||||
bf := byteframe.NewByteFrame()
|
||||
|
||||
bf.WriteInt32(seibatuData.Index0)
|
||||
bf.WriteInt32(seibatuData.Index1)
|
||||
bf.WriteUint32(seibatuData.Index2)
|
||||
bf.WriteInt32(seibatuData.Type)
|
||||
bf.WriteInt32(seibatuData.ID)
|
||||
bf.WriteInt32(seibatuData.Value)
|
||||
data = append(data, bf)
|
||||
}
|
||||
}
|
||||
|
||||
doAckEarthSucceed(s, pkt.AckHandle, data)
|
||||
}
|
||||
|
||||
type FixedSeibatuRankingTable struct {
|
||||
Rank int32
|
||||
Level int32
|
||||
UnkArray string
|
||||
}
|
||||
|
||||
func handleMsgMhfGetFixedSeibatuRankingTable(s *Session, p mhfpacket.MHFPacket) {
|
||||
pkt := p.(*mhfpacket.MsgMhfGetFixedSeibatuRankingTable)
|
||||
var fixedSeibatuRankingTable []FixedSeibatuRankingTable
|
||||
//Interestingly doesn't trigger the pkt on EarthStatus 1 But menu option is there is this Seibatu instead?
|
||||
switch pkt.EarthMonster {
|
||||
|
||||
case 116:
|
||||
fixedSeibatuRankingTable = []FixedSeibatuRankingTable{
|
||||
{1, 1, "Hunter 1"},
|
||||
{2, 1, "Hunter 2"},
|
||||
{3, 1, "Hunter 3"},
|
||||
{4, 1, "Hunter 4"},
|
||||
{5, 1, "Hunter 5"},
|
||||
{6, 1, "Hunter 6"},
|
||||
{7, 1, "Hunter 7"},
|
||||
{8, 1, "Hunter 8"},
|
||||
{9, 1, "Hunter 9"},
|
||||
}
|
||||
case 107:
|
||||
fixedSeibatuRankingTable = []FixedSeibatuRankingTable{
|
||||
{1, 2, "Hunter 1"},
|
||||
{2, 2, "Hunter 2"},
|
||||
{3, 2, "Hunter 3"},
|
||||
{4, 2, "Hunter 4"},
|
||||
{5, 2, "Hunter 5"},
|
||||
{6, 2, "Hunter 6"},
|
||||
{7, 2, "Hunter 7"},
|
||||
{8, 2, "Hunter 8"},
|
||||
{9, 2, "Hunter 9"},
|
||||
}
|
||||
case 2:
|
||||
fixedSeibatuRankingTable = []FixedSeibatuRankingTable{
|
||||
{1, 3, "Hunter 1"},
|
||||
{2, 3, "Hunter 2"},
|
||||
{3, 3, "Hunter 3"},
|
||||
{4, 3, "Hunter 4"},
|
||||
{5, 3, "Hunter 5"},
|
||||
{6, 3, "Hunter 6"},
|
||||
{7, 3, "Hunter 7"},
|
||||
{8, 3, "Hunter 8"},
|
||||
{9, 3, "Hunter 9"},
|
||||
}
|
||||
case 36:
|
||||
fixedSeibatuRankingTable = []FixedSeibatuRankingTable{
|
||||
{1, 4, "Hunter 1"},
|
||||
{2, 4, "Hunter 2"},
|
||||
{3, 4, "Hunter 3"},
|
||||
{4, 4, "Hunter 4"},
|
||||
{5, 4, "Hunter 5"},
|
||||
{6, 4, "Hunter 6"},
|
||||
{7, 4, "Hunter 7"},
|
||||
{8, 4, "Hunter 8"},
|
||||
{9, 4, "Hunter 9"},
|
||||
}
|
||||
default:
|
||||
fixedSeibatuRankingTable = []FixedSeibatuRankingTable{
|
||||
{1, 1, "Hunter 1"},
|
||||
{2, 1, "Hunter 2"},
|
||||
{3, 1, "Hunter 3"},
|
||||
{4, 1, "Hunter 4"},
|
||||
{5, 1, "Hunter 5"},
|
||||
{6, 1, "Hunter 6"},
|
||||
{7, 1, "Hunter 7"},
|
||||
{8, 1, "Hunter 8"},
|
||||
{9, 1, "Hunter 9"},
|
||||
}
|
||||
}
|
||||
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteBytes(make([]byte, 32))
|
||||
|
||||
for _, seibatuData := range fixedSeibatuRankingTable {
|
||||
|
||||
bf.WriteInt32(seibatuData.Rank)
|
||||
bf.WriteInt32(seibatuData.Level)
|
||||
bf.WriteBytes(stringsupport.PaddedString(seibatuData.UnkArray, 32, true))
|
||||
|
||||
}
|
||||
|
||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||
}
|
||||
|
||||
@@ -216,22 +587,24 @@ func handleMsgMhfReadBeatLevel(s *Session, p mhfpacket.MHFPacket) {
|
||||
resp := byteframe.NewByteFrame()
|
||||
for i := 0; i < int(pkt.ValidIDCount); i++ {
|
||||
resp.WriteUint32(pkt.IDs[i])
|
||||
resp.WriteUint32(1)
|
||||
resp.WriteUint32(1)
|
||||
resp.WriteUint32(1)
|
||||
resp.WriteUint32(0)
|
||||
resp.WriteUint32(0)
|
||||
resp.WriteUint32(0)
|
||||
}
|
||||
|
||||
doAckBufSucceed(s, pkt.AckHandle, resp.Data())
|
||||
}
|
||||
|
||||
func handleMsgMhfReadLastWeekBeatRanking(s *Session, p mhfpacket.MHFPacket) {
|
||||
//Controls the monster headings for the other menus
|
||||
pkt := p.(*mhfpacket.MsgMhfReadLastWeekBeatRanking)
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
bf.WriteInt32(0)
|
||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||
resp := byteframe.NewByteFrame()
|
||||
resp.WriteUint32(uint32(pkt.EarthMonster))
|
||||
resp.WriteUint32(0)
|
||||
resp.WriteUint32(0)
|
||||
resp.WriteUint32(0)
|
||||
|
||||
doAckBufSucceed(s, pkt.AckHandle, resp.Data())
|
||||
}
|
||||
|
||||
func handleMsgMhfUpdateBeatLevel(s *Session, p mhfpacket.MHFPacket) {
|
||||
|
||||
Reference in New Issue
Block a user