diff --git a/network/mhfpacket/msg_mhf_get_paper_data.go b/network/mhfpacket/msg_mhf_get_paper_data.go index 28d331af3..d999a6e1e 100644 --- a/network/mhfpacket/msg_mhf_get_paper_data.go +++ b/network/mhfpacket/msg_mhf_get_paper_data.go @@ -1,20 +1,21 @@ package mhfpacket -import ( - "errors" +import ( + "errors" + "fmt" - "erupe-ce/network/clientctx" - "erupe-ce/network" "erupe-ce/common/byteframe" + "erupe-ce/network" + "erupe-ce/network/clientctx" ) // MsgMhfGetPaperData represents the MSG_MHF_GET_PAPER_DATA type MsgMhfGetPaperData struct { // Communicator type, multi-format. This might be valid for only one type. AckHandle uint32 - Unk0 uint32 + Type uint32 Unk1 uint32 - Unk2 uint32 + ID uint32 } // Opcode returns the ID associated with this packet type. @@ -25,9 +26,10 @@ func (m *MsgMhfGetPaperData) Opcode() network.PacketID { // Parse parses the packet from binary func (m *MsgMhfGetPaperData) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { m.AckHandle = bf.ReadUint32() - m.Unk0 = bf.ReadUint32() + m.Type = bf.ReadUint32() m.Unk1 = bf.ReadUint32() - m.Unk2 = bf.ReadUint32() + m.ID = bf.ReadUint32() + fmt.Printf("MsgMhfGetPaperData: Type:[%d] Unk1:[%d] ID:[%d] \n\n", m.Type, m.Unk1, m.ID) return nil } diff --git a/network/mhfpacket/msg_mhf_get_tiny_bin.go b/network/mhfpacket/msg_mhf_get_tiny_bin.go index 4db9b05b9..21b5888f3 100644 --- a/network/mhfpacket/msg_mhf_get_tiny_bin.go +++ b/network/mhfpacket/msg_mhf_get_tiny_bin.go @@ -2,6 +2,7 @@ package mhfpacket import ( "errors" + "fmt" "erupe-ce/common/byteframe" "erupe-ce/network" @@ -28,6 +29,7 @@ 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 } diff --git a/network/mhfpacket/msg_mhf_post_tiny_bin.go b/network/mhfpacket/msg_mhf_post_tiny_bin.go index dd464d18d..07912a8dc 100644 --- a/network/mhfpacket/msg_mhf_post_tiny_bin.go +++ b/network/mhfpacket/msg_mhf_post_tiny_bin.go @@ -2,6 +2,7 @@ package mhfpacket import ( "errors" + "fmt" "erupe-ce/common/byteframe" "erupe-ce/network" @@ -31,6 +32,7 @@ func (m *MsgMhfPostTinyBin) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Client m.Unk2 = bf.ReadUint8() m.Unk3 = bf.ReadUint8() m.Data = bf.ReadBytes(uint(bf.ReadUint16())) + fmt.Printf("MsgMhfPostTinyBin: Unk0:[%d] Unk1:[%d] Unk2:[%d] Unk3:[%d] \n\n", m.Unk0, m.Unk1, m.Unk2, m.Unk3) return nil } diff --git a/network/mhfpacket/msg_mhf_post_tower_info.go b/network/mhfpacket/msg_mhf_post_tower_info.go index 3808777e5..cc3dd6342 100644 --- a/network/mhfpacket/msg_mhf_post_tower_info.go +++ b/network/mhfpacket/msg_mhf_post_tower_info.go @@ -20,7 +20,8 @@ type MsgMhfPostTowerInfo struct { Unk6 int32 Unk7 int32 Block1 int32 - Unk9 int64 + TimeTaken int32 + CID int32 } // Opcode returns the ID associated with this packet type. @@ -40,7 +41,8 @@ func (m *MsgMhfPostTowerInfo) Parse(bf *byteframe.ByteFrame, ctx *clientctx.Clie m.Unk6 = bf.ReadInt32() m.Unk7 = bf.ReadInt32() m.Block1 = bf.ReadInt32() - m.Unk9 = bf.ReadInt64() + m.TimeTaken = bf.ReadInt32() + m.CID = bf.ReadInt32() return nil } diff --git a/network/mhfpacket/msg_mhf_present_box.go b/network/mhfpacket/msg_mhf_present_box.go index d0064799c..428e11b58 100644 --- a/network/mhfpacket/msg_mhf_present_box.go +++ b/network/mhfpacket/msg_mhf_present_box.go @@ -2,6 +2,7 @@ package mhfpacket import ( "errors" + "fmt" "erupe-ce/common/byteframe" "erupe-ce/network" @@ -10,15 +11,15 @@ import ( // MsgMhfPresentBox represents the MSG_MHF_PRESENT_BOX type MsgMhfPresentBox struct { - AckHandle uint32 - Unk0 uint32 - Unk1 uint32 - Unk2 uint32 - Unk3 uint32 - Unk4 uint32 - Unk5 uint32 - Unk6 uint32 - Unk7 []uint32 + AckHandle uint32 + Unk0 uint32 + Operation uint32 + PresentCount uint32 + Unk3 uint32 + Unk4 uint32 + Unk5 uint32 + Unk6 uint32 + PresentType []uint32 } // Opcode returns the ID associated with this packet type. @@ -30,14 +31,19 @@ func (m *MsgMhfPresentBox) Opcode() network.PacketID { func (m *MsgMhfPresentBox) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error { m.AckHandle = bf.ReadUint32() m.Unk0 = bf.ReadUint32() - m.Unk1 = bf.ReadUint32() - m.Unk2 = bf.ReadUint32() + m.Operation = bf.ReadUint32() + m.PresentCount = bf.ReadUint32() m.Unk3 = bf.ReadUint32() m.Unk4 = bf.ReadUint32() m.Unk5 = bf.ReadUint32() m.Unk6 = bf.ReadUint32() - for i := uint32(0); i < m.Unk2; i++ { - m.Unk7 = append(m.Unk7, bf.ReadUint32()) + for i := uint32(0); i < m.PresentCount; i++ { + m.PresentType = append(m.PresentType, bf.ReadUint32()) + } + fmt.Printf("MsgMhfPresentBox: Unk0:[%d] Unk1:[%d] Unk2:[%d] Unk3:[%d] Unk4:[%d] Unk5:[%d] Unk6:[%d] \n\n", m.Unk0, m.Operation, m.PresentCount, m.Unk3, m.Unk4, m.Unk5, m.Unk6) + for _, mdata := range m.PresentType { + fmt.Printf("MsgMhfPresentBox: PresentType: [%d] \n", mdata) + } return nil } diff --git a/schemas/bundled-schema/PaperGifts.sql b/schemas/bundled-schema/PaperGifts.sql new file mode 100644 index 000000000..e0c3d0dbc --- /dev/null +++ b/schemas/bundled-schema/PaperGifts.sql @@ -0,0 +1,752 @@ +BEGIN; + +INSERT INTO public.paper_data_gifts (gift_id, item_id, unk0,unk1,unk2) VALUES + + (6001,11159, 1, 1, 5000), + (6001,11160, 1, 1, 3350), + (6001,11161, 1, 1, 1500), + (6001,11162, 1, 1, 100), + (6001,11163, 1, 1, 50), + (6002,11159, 2, 1, 1800), + (6002,11160, 2, 1, 1200), + (6002,11161, 2, 1, 500), + (6002,11162, 1, 1, 50), + (6002,11037, 1, 1, 150), + (6002,11038, 1, 1, 150), + (6002,11044, 1, 1, 150), + (6002,11057, 1, 1, 150), + (6002,11059, 1, 1, 150), + (6002,11079, 1, 1, 150), + (6002,11098, 1, 1, 150), + (6002,11104, 1, 1, 150), + (6002,11117, 1, 1, 150), + (6002,11128, 1, 1, 150), + (6002,11133, 1, 1, 150), + (6002,11137, 1, 1, 150), + (6002,11143, 1, 1, 150), + (6002,11132, 1, 1, 150), + (6002,11039, 1, 1, 150), + (6002,11040, 1, 1, 150), + (6002,11049, 1, 1, 150), + (6002,11061, 1, 1, 150), + (6002,11063, 1, 1, 150), + (6002,11077, 1, 1, 150), + (6002,11099, 1, 1, 150), + (6002,11105, 1, 1, 150), + (6002,11129, 1, 1, 150), + (6002,11130, 1, 1, 150), + (6002,11131, 1, 1, 150), + (6002,11139, 1, 1, 150), + (6002,11145, 1, 1, 150), + (6002,11096, 1, 1, 150), + (6002,11041, 1, 1, 150), + (6002,11047, 1, 1, 150), + (6002,11054, 1, 1, 150), + (6002,11065, 1, 1, 150), + (6002,11068, 1, 1, 150), + (6002,11075, 1, 1, 150), + (6002,11100, 1, 1, 150), + (6002,11106, 1, 1, 150), + (6002,11119, 1, 1, 150), + (6002,11135, 1, 1, 150), + (6002,11136, 1, 1, 150), + (6002,11138, 1, 1, 150), + (6002,11088, 1, 1, 150), + (6002,10370, 1, 1, 150), + (6002,10368, 1, 1, 150), + (6010,11159, 1, 1, 3700), + (6010,11160, 1, 1, 2900), + (6010,11161, 1, 1, 1300), + (6010,11453, 1, 1, 250), + (6010,11454, 1, 1, 250), + (6010,12055, 1, 1, 250), + (6010,12065, 1, 1, 250), + (6010,12058, 1, 1, 250), + (6010,12068, 1, 1, 250), + (6010,11774, 1, 1, 200), + (6010,11773, 1, 1, 400), + (6011,11159, 1, 1, 3700), + (6011,11160, 1, 1, 2900), + (6011,11161, 1, 1, 1300), + (6011,11453, 1, 1, 250), + (6011,11454, 1, 1, 250), + (6011,12055, 1, 1, 250), + (6011,12065, 1, 1, 250), + (6011,12058, 1, 1, 250), + (6011,12068, 1, 1, 250), + (6011,11774, 1, 1, 200), + (6011,11773, 1, 1, 400), + (6012,11159, 2, 1, 3500), + (6012,11160, 2, 1, 2900), + (6012,11161, 2, 1, 1300), + (6012,12508, 1, 1, 400), + (6012,11453, 1, 1, 200), + (6012,11454, 1, 1, 200), + (6012,12055, 1, 1, 200), + (6012,12065, 1, 1, 200), + (6012,12058, 1, 1, 200), + (6012,12068, 1, 1, 200), + (6012,11775, 1, 1, 400), + (6012,11776, 1, 1, 200), + (6012,11777, 1, 1, 100), + (7001,11037, 1, 1, 290), + (7001,11038, 1, 1, 270), + (7001,11044, 1, 1, 270), + (7001,11057, 1, 1, 290), + (7001,11059, 1, 1, 290), + (7001,11079, 1, 1, 290), + (7001,11098, 1, 1, 280), + (7001,11104, 1, 1, 300), + (7001,11117, 1, 1, 280), + (7001,11128, 1, 1, 290), + (7001,11133, 1, 1, 290), + (7001,11137, 1, 1, 300), + (7001,11143, 1, 1, 290), + (7001,11132, 1, 1, 270), + (7001,11042, 1, 1, 47), + (7001,11045, 1, 1, 47), + (7001,11064, 1, 1, 47), + (7001,11062, 1, 1, 47), + (7001,11070, 1, 1, 48), + (7001,11101, 1, 1, 47), + (7001,11108, 1, 1, 47), + (7001,11109, 1, 1, 47), + (7001,11120, 1, 1, 47), + (7001,11122, 1, 1, 47), + (7001,11134, 1, 1, 47), + (7001,11141, 1, 1, 47), + (7001,11084, 1, 1, 47), + (7001,11087, 1, 1, 47), + (7001,11094, 1, 1, 47), + (7001,10374, 1, 1, 47), + (7001,10375, 1, 1, 47), + (7001,11051, 1, 1, 17), + (7001,11071, 1, 1, 16), + (7001,11076, 1, 1, 16), + (7001,11102, 1, 1, 17), + (7001,11124, 1, 1, 17), + (7001,11090, 1, 1, 17), + (7001,11159, 1, 1, 1200), + (7001,11159, 2, 1, 650), + (7001,11160, 1, 1, 800), + (7001,11160, 2, 1, 300), + (7001,11161, 1, 1, 100), + (7001,11161, 2, 1, 50), + (7001,11164, 1, 1, 100), + (7001,11162, 1, 1, 100), + (7001,11163, 1, 1, 100), + (7001,11158, 1, 1, 300), + (7001,11463, 1, 1, 300), + (7001,11356, 1, 1, 300), + (7001,11464, 1, 1, 300), + (7001,11357, 1, 1, 500), + (7001,11039, 1, 2, 300), + (7001,11040, 1, 2, 270), + (7001,11049, 1, 2, 300), + (7001,11061, 1, 2, 290), + (7001,11063, 1, 2, 290), + (7001,11077, 1, 2, 290), + (7001,11099, 1, 2, 280), + (7001,11105, 1, 2, 300), + (7001,11129, 1, 2, 250), + (7001,11130, 1, 2, 300), + (7001,11131, 1, 2, 280), + (7001,11139, 1, 2, 290), + (7001,11145, 1, 2, 260), + (7001,11096, 1, 2, 300), + (7001,11046, 1, 2, 47), + (7001,11066, 1, 2, 47), + (7001,11067, 1, 2, 47), + (7001,11072, 1, 2, 47), + (7001,11082, 1, 2, 47), + (7001,11103, 1, 2, 47), + (7001,11110, 1, 2, 47), + (7001,11112, 1, 2, 47), + (7001,11114, 1, 2, 47), + (7001,11115, 1, 2, 47), + (7001,11121, 1, 2, 47), + (7001,11144, 1, 2, 48), + (7001,11085, 1, 2, 47), + (7001,11089, 1, 2, 47), + (7001,11091, 1, 2, 47), + (7001,10376, 1, 2, 47), + (7001,10377, 1, 2, 47), + (7001,11127, 1, 2, 17), + (7001,11069, 1, 2, 17), + (7001,11142, 1, 2, 17), + (7001,11078, 1, 2, 17), + (7001,11056, 1, 2, 16), + (7001,11092, 1, 2, 16), + (7001,11159, 1, 2, 1200), + (7001,11159, 2, 2, 650), + (7001,11160, 1, 2, 800), + (7001,11160, 2, 2, 300), + (7001,11161, 1, 2, 100), + (7001,11161, 2, 2, 50), + (7001,11164, 1, 2, 100), + (7001,11162, 1, 2, 100), + (7001,11163, 1, 2, 100), + (7001,11158, 1, 2, 300), + (7001,11463, 1, 2, 300), + (7001,11356, 1, 2, 300), + (7001,11464, 1, 2, 300), + (7001,11357, 1, 2, 500), + (7001,11041, 1, 3, 266), + (7001,11047, 1, 3, 266), + (7001,11054, 1, 3, 266), + (7001,11065, 1, 3, 266), + (7001,11068, 1, 3, 266), + (7001,11075, 1, 3, 266), + (7001,11100, 1, 3, 266), + (7001,11106, 1, 3, 266), + (7001,11119, 1, 3, 266), + (7001,11135, 1, 3, 268), + (7001,11136, 1, 3, 268), + (7001,11138, 1, 3, 268), + (7001,11088, 1, 3, 268), + (7001,10370, 1, 3, 266), + (7001,10368, 1, 3, 268), + (7001,11043, 1, 3, 50), + (7001,11048, 1, 3, 50), + (7001,11050, 1, 3, 50), + (7001,11058, 1, 3, 50), + (7001,11060, 1, 3, 50), + (7001,11074, 1, 3, 50), + (7001,11107, 1, 3, 50), + (7001,11111, 1, 3, 50), + (7001,11113, 1, 3, 50), + (7001,11118, 1, 3, 50), + (7001,11126, 1, 3, 50), + (7001,11140, 1, 3, 50), + (7001,11086, 1, 3, 50), + (7001,11095, 1, 3, 50), + (7001,11055, 1, 3, 50), + (7001,10378, 1, 3, 50), + (7001,11052, 1, 3, 15), + (7001,11073, 1, 3, 15), + (7001,11146, 1, 3, 15), + (7001,11116, 1, 3, 15), + (7001,11123, 1, 3, 15), + (7001,11097, 1, 3, 15), + (7001,10367, 1, 3, 15), + (7001,10371, 1, 3, 15), + (7001,10373, 1, 3, 15), + (7001,10778, 1, 3, 375), + (7001,11209, 1, 3, 375), + (7001,10813, 1, 3, 375), + (7001,11389, 1, 3, 375), + (7001,11159, 1, 3, 1000), + (7001,11159, 2, 3, 250), + (7001,11160, 1, 3, 700), + (7001,11160, 2, 3, 175), + (7001,11161, 1, 3, 300), + (7001,11161, 2, 3, 75), + (7001,11465, 1, 3, 53), + (7001,11466, 1, 3, 27), + (7001,11467, 1, 3, 266), + (7001,11468, 1, 3, 533), + (7001,11469, 1, 3, 186), + (7002,11037, 1, 1, 100), + (7002,11038, 1, 1, 100), + (7002,11044, 1, 1, 100), + (7002,11057, 1, 1, 100), + (7002,11059, 1, 1, 100), + (7002,11079, 1, 1, 100), + (7002,11098, 1, 1, 100), + (7002,11104, 1, 1, 100), + (7002,11117, 1, 1, 100), + (7002,11128, 1, 1, 100), + (7002,11133, 1, 1, 100), + (7002,11137, 1, 1, 100), + (7002,11143, 1, 1, 100), + (7002,11132, 1, 1, 100), + (7002,11042, 1, 1, 60), + (7002,11045, 1, 1, 60), + (7002,11064, 1, 1, 60), + (7002,11062, 1, 1, 60), + (7002,11070, 1, 1, 60), + (7002,11101, 1, 1, 60), + (7002,11108, 1, 1, 60), + (7002,11109, 1, 1, 60), + (7002,11120, 1, 1, 60), + (7002,11122, 1, 1, 60), + (7002,11134, 1, 1, 60), + (7002,11141, 1, 1, 60), + (7002,11084, 1, 1, 60), + (7002,11087, 1, 1, 60), + (7002,11094, 1, 1, 60), + (7002,10374, 1, 1, 60), + (7002,10375, 1, 1, 60), + (7002,11051, 1, 1, 20), + (7002,11071, 1, 1, 20), + (7002,11076, 1, 1, 20), + (7002,11102, 1, 1, 20), + (7002,11124, 1, 1, 20), + (7002,11090, 1, 1, 20), + (7002,11164, 1, 1, 400), + (7002,11162, 1, 1, 200), + (7002,11163, 1, 1, 200), + (7002,11463, 1, 1, 100), + (7002,11464, 1, 1, 150), + (7002,10355, 1, 1, 150), + (7002,12506, 1, 1, 200), + (7002,12507, 1, 1, 300), + (7002,12508, 1, 1, 900), + (7002,13629, 1, 1, 350), + (7002,13628, 1, 1, 200), + (7002,11356, 1, 1, 100), + (7002,11357, 1, 1, 150), + (7002,12014, 1, 1, 250), + (7002,12016, 1, 1, 400), + (7002,12015, 1, 1, 410), + (7002,11159, 2, 1, 500), + (7002,11159, 4, 1, 500), + (7002,11159, 6, 1, 500), + (7002,11160, 2, 1, 400), + (7002,11160, 4, 1, 400), + (7002,11160, 6, 1, 400), + (7002,11161, 2, 1, 100), + (7002,11161, 4, 1, 100), + (7002,11161, 6, 1, 100), + (7002,11039, 1, 2, 100), + (7002,11040, 1, 2, 100), + (7002,11049, 1, 2, 100), + (7002,11061, 1, 2, 100), + (7002,11063, 1, 2, 100), + (7002,11077, 1, 2, 100), + (7002,11099, 1, 2, 100), + (7002,11105, 1, 2, 100), + (7002,11129, 1, 2, 100), + (7002,11130, 1, 2, 100), + (7002,11131, 1, 2, 100), + (7002,11139, 1, 2, 100), + (7002,11145, 1, 2, 100), + (7002,11096, 1, 2, 100), + (7002,11046, 1, 2, 60), + (7002,11066, 1, 2, 60), + (7002,11067, 1, 2, 60), + (7002,11072, 1, 2, 60), + (7002,11082, 1, 2, 60), + (7002,11103, 1, 2, 60), + (7002,11110, 1, 2, 60), + (7002,11112, 1, 2, 60), + (7002,11114, 1, 2, 60), + (7002,11115, 1, 2, 60), + (7002,11121, 1, 2, 60), + (7002,11144, 1, 2, 60), + (7002,11085, 1, 2, 60), + (7002,11089, 1, 2, 60), + (7002,11091, 1, 2, 60), + (7002,10376, 1, 2, 60), + (7002,10377, 1, 2, 60), + (7002,11127, 1, 2, 20), + (7002,11069, 1, 2, 20), + (7002,11142, 1, 2, 20), + (7002,11078, 1, 2, 20), + (7002,11056, 1, 2, 20), + (7002,11092, 1, 2, 20), + (7002,11164, 1, 2, 400), + (7002,11162, 1, 2, 200), + (7002,11163, 1, 2, 200), + (7002,11463, 1, 2, 250), + (7002,11464, 1, 2, 350), + (7002,12506, 1, 2, 150), + (7002,12507, 1, 2, 200), + (7002,12508, 1, 2, 350), + (7002,13629, 1, 2, 250), + (7002,13628, 1, 2, 200), + (7002,10355, 1, 2, 400), + (7002,11158, 1, 2, 100), + (7002,11356, 1, 2, 100), + (7002,11357, 1, 2, 100), + (7002,12014, 1, 2, 300), + (7002,12016, 1, 2, 450), + (7002,12015, 1, 2, 460), + (7002,11159, 2, 2, 500), + (7002,11159, 4, 2, 500), + (7002,11159, 6, 2, 500), + (7002,11160, 2, 2, 400), + (7002,11160, 4, 2, 400), + (7002,11160, 6, 2, 400), + (7002,11161, 2, 2, 100), + (7002,11161, 4, 2, 100), + (7002,11161, 6, 2, 100), + (7002,11041, 1, 3, 120), + (7002,11047, 1, 3, 120), + (7002,11054, 1, 3, 120), + (7002,11065, 1, 3, 120), + (7002,11068, 1, 3, 120), + (7002,11075, 1, 3, 120), + (7002,11100, 1, 3, 120), + (7002,11106, 1, 3, 120), + (7002,11119, 1, 3, 120), + (7002,11135, 1, 3, 120), + (7002,11136, 1, 3, 120), + (7002,11138, 1, 3, 120), + (7002,11088, 1, 3, 120), + (7002,10370, 1, 3, 120), + (7002,10368, 1, 3, 120), + (7002,11043, 1, 3, 65), + (7002,11048, 1, 3, 65), + (7002,11050, 1, 3, 65), + (7002,11058, 1, 3, 65), + (7002,11060, 1, 3, 65), + (7002,11074, 1, 3, 65), + (7002,11107, 1, 3, 65), + (7002,11111, 1, 3, 65), + (7002,11113, 1, 3, 65), + (7002,11118, 1, 3, 65), + (7002,11126, 1, 3, 65), + (7002,11140, 1, 3, 65), + (7002,11086, 1, 3, 65), + (7002,11095, 1, 3, 65), + (7002,11055, 1, 3, 65), + (7002,10378, 1, 3, 65), + (7002,11052, 1, 3, 15), + (7002,11073, 1, 3, 15), + (7002,11146, 1, 3, 15), + (7002,11116, 1, 3, 15), + (7002,11123, 1, 3, 15), + (7002,11097, 1, 3, 15), + (7002,10367, 1, 3, 15), + (7002,10371, 1, 3, 15), + (7002,10373, 1, 3, 15), + (7002,10778, 3, 3, 490), + (7002,11209, 3, 3, 490), + (7002,10813, 3, 3, 490), + (7002,11389, 3, 3, 490), + (7002,12046, 3, 3, 500), + (7002,12503, 3, 3, 500), + (7002,11159, 2, 3, 500), + (7002,11159, 4, 3, 500), + (7002,11159, 6, 3, 500), + (7002,11160, 2, 3, 400), + (7002,11160, 4, 3, 400), + (7002,11160, 6, 3, 400), + (7002,11161, 2, 3, 100), + (7002,11161, 4, 3, 100), + (7002,11161, 6, 3, 100), + (7002,11465, 1, 3, 53), + (7002,11466, 1, 3, 27), + (7002,11467, 1, 3, 266), + (7002,11468, 1, 3, 533), + (7002,11469, 1, 3, 186), + (7011,11037, 1, 1, 290), + (7011,11038, 1, 1, 270), + (7011,11044, 1, 1, 270), + (7011,11057, 1, 1, 290), + (7011,11059, 1, 1, 290), + (7011,11079, 1, 1, 290), + (7011,11098, 1, 1, 280), + (7011,11104, 1, 1, 300), + (7011,11117, 1, 1, 280), + (7011,11128, 1, 1, 290), + (7011,11133, 1, 1, 290), + (7011,11137, 1, 1, 300), + (7011,11143, 1, 1, 290), + (7011,11132, 1, 1, 270), + (7011,11042, 1, 1, 47), + (7011,11045, 1, 1, 47), + (7011,11064, 1, 1, 47), + (7011,11062, 1, 1, 47), + (7011,11070, 1, 1, 48), + (7011,11101, 1, 1, 47), + (7011,11108, 1, 1, 47), + (7011,11109, 1, 1, 47), + (7011,11120, 1, 1, 47), + (7011,11122, 1, 1, 47), + (7011,11134, 1, 1, 47), + (7011,11141, 1, 1, 47), + (7011,11084, 1, 1, 47), + (7011,11087, 1, 1, 47), + (7011,11094, 1, 1, 47), + (7011,10374, 1, 1, 47), + (7011,10375, 1, 1, 47), + (7011,11051, 1, 1, 17), + (7011,11071, 1, 1, 16), + (7011,11076, 1, 1, 16), + (7011,11102, 1, 1, 17), + (7011,11124, 1, 1, 17), + (7011,11090, 1, 1, 17), + (7011,11159, 1, 1, 1200), + (7011,11159, 2, 1, 650), + (7011,11160, 1, 1, 800), + (7011,11160, 2, 1, 300), + (7011,11161, 1, 1, 100), + (7011,11161, 2, 1, 50), + (7011,11164, 1, 1, 100), + (7011,11162, 1, 1, 100), + (7011,11163, 1, 1, 100), + (7011,11158, 1, 1, 300), + (7011,11463, 1, 1, 300), + (7011,11356, 1, 1, 300), + (7011,11464, 1, 1, 300), + (7011,11357, 1, 1, 500), + (7011,11039, 1, 2, 300), + (7011,11040, 1, 2, 270), + (7011,11049, 1, 2, 300), + (7011,11061, 1, 2, 290), + (7011,11063, 1, 2, 290), + (7011,11077, 1, 2, 290), + (7011,11099, 1, 2, 280), + (7011,11105, 1, 2, 300), + (7011,11129, 1, 2, 250), + (7011,11130, 1, 2, 300), + (7011,11131, 1, 2, 280), + (7011,11139, 1, 2, 290), + (7011,11145, 1, 2, 260), + (7011,11096, 1, 2, 300), + (7011,11046, 1, 2, 47), + (7011,11066, 1, 2, 47), + (7011,11067, 1, 2, 47), + (7011,11072, 1, 2, 47), + (7011,11082, 1, 2, 47), + (7011,11103, 1, 2, 47), + (7011,11110, 1, 2, 47), + (7011,11112, 1, 2, 47), + (7011,11114, 1, 2, 47), + (7011,11115, 1, 2, 47), + (7011,11121, 1, 2, 47), + (7011,11144, 1, 2, 48), + (7011,11085, 1, 2, 47), + (7011,11089, 1, 2, 47), + (7011,11091, 1, 2, 47), + (7011,10376, 1, 2, 47), + (7011,10377, 1, 2, 47), + (7011,11127, 1, 2, 17), + (7011,11069, 1, 2, 17), + (7011,11142, 1, 2, 17), + (7011,11078, 1, 2, 17), + (7011,11056, 1, 2, 16), + (7011,11092, 1, 2, 16), + (7011,11159, 1, 2, 1200), + (7011,11159, 2, 2, 650), + (7011,11160, 1, 2, 800), + (7011,11160, 2, 2, 300), + (7011,11161, 1, 2, 100), + (7011,11161, 2, 2, 50), + (7011,11164, 1, 2, 100), + (7011,11162, 1, 2, 100), + (7011,11163, 1, 2, 100), + (7011,11158, 1, 2, 300), + (7011,11463, 1, 2, 300), + (7011,11356, 1, 2, 300), + (7011,11464, 1, 2, 300), + (7011,11357, 1, 2, 500), + (7011,11041, 1, 3, 266), + (7011,11047, 1, 3, 266), + (7011,11054, 1, 3, 266), + (7011,11065, 1, 3, 266), + (7011,11068, 1, 3, 266), + (7011,11075, 1, 3, 266), + (7011,11100, 1, 3, 266), + (7011,11106, 1, 3, 266), + (7011,11119, 1, 3, 266), + (7011,11135, 1, 3, 268), + (7011,11136, 1, 3, 268), + (7011,11138, 1, 3, 268), + (7011,11088, 1, 3, 268), + (7011,10370, 1, 3, 266), + (7011,10368, 1, 3, 268), + (7011,11043, 1, 3, 50), + (7011,11048, 1, 3, 50), + (7011,11050, 1, 3, 50), + (7011,11058, 1, 3, 50), + (7011,11060, 1, 3, 50), + (7011,11074, 1, 3, 50), + (7011,11107, 1, 3, 50), + (7011,11111, 1, 3, 50), + (7011,11113, 1, 3, 50), + (7011,11118, 1, 3, 50), + (7011,11126, 1, 3, 50), + (7011,11140, 1, 3, 50), + (7011,11086, 1, 3, 50), + (7011,11095, 1, 3, 50), + (7011,11055, 1, 3, 50), + (7011,10378, 1, 3, 50), + (7011,11052, 1, 3, 15), + (7011,11073, 1, 3, 15), + (7011,11146, 1, 3, 15), + (7011,11116, 1, 3, 15), + (7011,11123, 1, 3, 15), + (7011,11097, 1, 3, 15), + (7011,10367, 1, 3, 15), + (7011,10371, 1, 3, 15), + (7011,10373, 1, 3, 15), + (7011,10778, 1, 3, 375), + (7011,11209, 1, 3, 375), + (7011,10813, 1, 3, 375), + (7011,11389, 1, 3, 375), + (7011,11159, 1, 3, 1000), + (7011,11159, 2, 3, 250), + (7011,11160, 1, 3, 700), + (7011,11160, 2, 3, 175), + (7011,11161, 1, 3, 300), + (7011,11161, 2, 3, 75), + (7011,11465, 1, 3, 53), + (7011,11466, 1, 3, 27), + (7011,11467, 1, 3, 266), + (7011,11468, 1, 3, 533), + (7011,11469, 1, 3, 186), + (7012,11037, 1, 1, 290), + (7012,11038, 1, 1, 270), + (7012,11044, 1, 1, 270), + (7012,11057, 1, 1, 290), + (7012,11059, 1, 1, 290), + (7012,11079, 1, 1, 290), + (7012,11098, 1, 1, 280), + (7012,11104, 1, 1, 300), + (7012,11117, 1, 1, 280), + (7012,11128, 1, 1, 290), + (7012,11133, 1, 1, 290), + (7012,11137, 1, 1, 300), + (7012,11143, 1, 1, 290), + (7012,11132, 1, 1, 270), + (7012,11042, 1, 1, 47), + (7012,11045, 1, 1, 47), + (7012,11064, 1, 1, 47), + (7012,11062, 1, 1, 47), + (7012,11070, 1, 1, 48), + (7012,11101, 1, 1, 47), + (7012,11108, 1, 1, 47), + (7012,11109, 1, 1, 47), + (7012,11120, 1, 1, 47), + (7012,11122, 1, 1, 47), + (7012,11134, 1, 1, 47), + (7012,11141, 1, 1, 47), + (7012,11084, 1, 1, 47), + (7012,11087, 1, 1, 47), + (7012,11094, 1, 1, 47), + (7012,10374, 1, 1, 47), + (7012,10375, 1, 1, 47), + (7012,11051, 1, 1, 17), + (7012,11071, 1, 1, 16), + (7012,11076, 1, 1, 16), + (7012,11102, 1, 1, 17), + (7012,11124, 1, 1, 17), + (7012,11090, 1, 1, 17), + (7012,11159, 1, 1, 1200), + (7012,11159, 2, 1, 650), + (7012,11160, 1, 1, 800), + (7012,11160, 2, 1, 300), + (7012,11161, 1, 1, 100), + (7012,11161, 2, 1, 50), + (7012,11164, 1, 1, 100), + (7012,11162, 1, 1, 100), + (7012,11163, 1, 1, 100), + (7012,11158, 1, 1, 300), + (7012,11463, 1, 1, 300), + (7012,11356, 1, 1, 300), + (7012,11464, 1, 1, 300), + (7012,11357, 1, 1, 500), + (7012,11039, 1, 2, 300), + (7012,11040, 1, 2, 270), + (7012,11049, 1, 2, 300), + (7012,11061, 1, 2, 290), + (7012,11063, 1, 2, 290), + (7012,11077, 1, 2, 290), + (7012,11099, 1, 2, 280), + (7012,11105, 1, 2, 300), + (7012,11129, 1, 2, 250), + (7012,11130, 1, 2, 300), + (7012,11131, 1, 2, 280), + (7012,11139, 1, 2, 290), + (7012,11145, 1, 2, 260), + (7012,11096, 1, 2, 300), + (7012,11046, 1, 2, 47), + (7012,11066, 1, 2, 47), + (7012,11067, 1, 2, 47), + (7012,11072, 1, 2, 47), + (7012,11082, 1, 2, 47), + (7012,11103, 1, 2, 47), + (7012,11110, 1, 2, 47), + (7012,11112, 1, 2, 47), + (7012,11114, 1, 2, 47), + (7012,11115, 1, 2, 47), + (7012,11121, 1, 2, 47), + (7012,11144, 1, 2, 48), + (7012,11085, 1, 2, 47), + (7012,11089, 1, 2, 47), + (7012,11091, 1, 2, 47), + (7012,10376, 1, 2, 47), + (7012,10377, 1, 2, 47), + (7012,11127, 1, 2, 17), + (7012,11069, 1, 2, 17), + (7012,11142, 1, 2, 17), + (7012,11078, 1, 2, 17), + (7012,11056, 1, 2, 16), + (7012,11092, 1, 2, 16), + (7012,11159, 1, 2, 1200), + (7012,11159, 2, 2, 650), + (7012,11160, 1, 2, 800), + (7012,11160, 2, 2, 300), + (7012,11161, 1, 2, 100), + (7012,11161, 2, 2, 50), + (7012,11164, 1, 2, 100), + (7012,11162, 1, 2, 100), + (7012,11163, 1, 2, 100), + (7012,11158, 1, 2, 300), + (7012,11463, 1, 2, 300), + (7012,11356, 1, 2, 300), + (7012,11464, 1, 2, 300), + (7012,11357, 1, 2, 500), + (7012,11041, 1, 3, 266), + (7012,11047, 1, 3, 266), + (7012,11054, 1, 3, 266), + (7012,11065, 1, 3, 266), + (7012,11068, 1, 3, 266), + (7012,11075, 1, 3, 266), + (7012,11100, 1, 3, 266), + (7012,11106, 1, 3, 266), + (7012,11119, 1, 3, 266), + (7012,11135, 1, 3, 268), + (7012,11136, 1, 3, 268), + (7012,11138, 1, 3, 268), + (7012,11088, 1, 3, 268), + (7012,10370, 1, 3, 266), + (7012,10368, 1, 3, 268), + (7012,11043, 1, 3, 50), + (7012,11048, 1, 3, 50), + (7012,11050, 1, 3, 50), + (7012,11058, 1, 3, 50), + (7012,11060, 1, 3, 50), + (7012,11074, 1, 3, 50), + (7012,11107, 1, 3, 50), + (7012,11111, 1, 3, 50), + (7012,11113, 1, 3, 50), + (7012,11118, 1, 3, 50), + (7012,11126, 1, 3, 50), + (7012,11140, 1, 3, 50), + (7012,11086, 1, 3, 50), + (7012,11095, 1, 3, 50), + (7012,11055, 1, 3, 50), + (7012,10378, 1, 3, 50), + (7012,11052, 1, 3, 15), + (7012,11073, 1, 3, 15), + (7012,11146, 1, 3, 15), + (7012,11116, 1, 3, 15), + (7012,11123, 1, 3, 15), + (7012,11097, 1, 3, 15), + (7012,10367, 1, 3, 15), + (7012,10371, 1, 3, 15), + (7012,10373, 1, 3, 15), + (7012,10778, 1, 3, 375), + (7012,11209, 1, 3, 375), + (7012,10813, 1, 3, 375), + (7012,11389, 1, 3, 375), + (7012,11159, 1, 3, 1000), + (7012,11159, 2, 3, 250), + (7012,11160, 1, 3, 700), + (7012,11160, 2, 3, 175), + (7012,11161, 1, 3, 300), + (7012,11161, 2, 3, 75), + (7012,11465, 1, 3, 53), + (7012,11466, 1, 3, 27), + (7012,11467, 1, 3, 266), + (7012,11468, 1, 3, 533), + (7012,11469, 1, 3, 186); + + + +END; + diff --git a/schemas/patch-schema/24-paperdata.sql b/schemas/patch-schema/24-paperdata.sql new file mode 100644 index 000000000..39c3fb06f --- /dev/null +++ b/schemas/patch-schema/24-paperdata.sql @@ -0,0 +1,23 @@ +BEGIN; + +CREATE TABLE IF NOT EXISTS paper_data_gifts ( + id serial PRIMARY KEY, + gift_id integer, + item_id integer, + unk0 integer, + unk1 integer, + chance integer +); + +CREATE TABLE IF NOT EXISTS paper_data ( + id serial PRIMARY KEY, + paper_type integer, + paper_id integer, + option1 integer, + option2 integer, + option3 integer, + option4 integer, + option5 integer +); + +END; \ No newline at end of file diff --git a/server/channelserver/handlers_data.go b/server/channelserver/handlers_data.go index fd41e1366..ebb06002c 100644 --- a/server/channelserver/handlers_data.go +++ b/server/channelserver/handlers_data.go @@ -14,6 +14,7 @@ import ( "erupe-ce/network/mhfpacket" "erupe-ce/server/channelserver/compression/deltacomp" "erupe-ce/server/channelserver/compression/nullcomp" + "go.uber.org/zap" ) @@ -192,770 +193,6 @@ func handleMsgMhfLoadScenarioData(s *Session, p mhfpacket.MHFPacket) { doAckBufSucceed(s, pkt.AckHandle, bf.Data()) } -var paperGiftData = map[uint32][]PaperGift{ - 6001: { - {11159, 1, 1, 5000}, - {11160, 1, 1, 3350}, - {11161, 1, 1, 1500}, - {11162, 1, 1, 100}, - {11163, 1, 1, 50}, - }, - 6002: { - {11159, 2, 1, 1800}, - {11160, 2, 1, 1200}, - {11161, 2, 1, 500}, - {11162, 1, 1, 50}, - {11037, 1, 1, 150}, - {11038, 1, 1, 150}, - {11044, 1, 1, 150}, - {11057, 1, 1, 150}, - {11059, 1, 1, 150}, - {11079, 1, 1, 150}, - {11098, 1, 1, 150}, - {11104, 1, 1, 150}, - {11117, 1, 1, 150}, - {11128, 1, 1, 150}, - {11133, 1, 1, 150}, - {11137, 1, 1, 150}, - {11143, 1, 1, 150}, - {11132, 1, 1, 150}, - {11039, 1, 1, 150}, - {11040, 1, 1, 150}, - {11049, 1, 1, 150}, - {11061, 1, 1, 150}, - {11063, 1, 1, 150}, - {11077, 1, 1, 150}, - {11099, 1, 1, 150}, - {11105, 1, 1, 150}, - {11129, 1, 1, 150}, - {11130, 1, 1, 150}, - {11131, 1, 1, 150}, - {11139, 1, 1, 150}, - {11145, 1, 1, 150}, - {11096, 1, 1, 150}, - {11041, 1, 1, 150}, - {11047, 1, 1, 150}, - {11054, 1, 1, 150}, - {11065, 1, 1, 150}, - {11068, 1, 1, 150}, - {11075, 1, 1, 150}, - {11100, 1, 1, 150}, - {11106, 1, 1, 150}, - {11119, 1, 1, 150}, - {11135, 1, 1, 150}, - {11136, 1, 1, 150}, - {11138, 1, 1, 150}, - {11088, 1, 1, 150}, - {10370, 1, 1, 150}, - {10368, 1, 1, 150}, - }, - 6010: { - {11159, 1, 1, 3700}, - {11160, 1, 1, 2900}, - {11161, 1, 1, 1300}, - {11453, 1, 1, 250}, - {11454, 1, 1, 250}, - {12055, 1, 1, 250}, - {12065, 1, 1, 250}, - {12058, 1, 1, 250}, - {12068, 1, 1, 250}, - {11774, 1, 1, 200}, - {11773, 1, 1, 400}, - }, - 6011: { - {11159, 1, 1, 3700}, - {11160, 1, 1, 2900}, - {11161, 1, 1, 1300}, - {11453, 1, 1, 250}, - {11454, 1, 1, 250}, - {12055, 1, 1, 250}, - {12065, 1, 1, 250}, - {12058, 1, 1, 250}, - {12068, 1, 1, 250}, - {11774, 1, 1, 200}, - {11773, 1, 1, 400}, - }, - 6012: { - {11159, 2, 1, 3500}, - {11160, 2, 1, 2900}, - {11161, 2, 1, 1300}, - {12508, 1, 1, 400}, - {11453, 1, 1, 200}, - {11454, 1, 1, 200}, - {12055, 1, 1, 200}, - {12065, 1, 1, 200}, - {12058, 1, 1, 200}, - {12068, 1, 1, 200}, - {11775, 1, 1, 400}, - {11776, 1, 1, 200}, - {11777, 1, 1, 100}, - }, - 7001: { - {11037, 1, 1, 290}, - {11038, 1, 1, 270}, - {11044, 1, 1, 270}, - {11057, 1, 1, 290}, - {11059, 1, 1, 290}, - {11079, 1, 1, 290}, - {11098, 1, 1, 280}, - {11104, 1, 1, 300}, - {11117, 1, 1, 280}, - {11128, 1, 1, 290}, - {11133, 1, 1, 290}, - {11137, 1, 1, 300}, - {11143, 1, 1, 290}, - {11132, 1, 1, 270}, - {11042, 1, 1, 47}, - {11045, 1, 1, 47}, - {11064, 1, 1, 47}, - {11062, 1, 1, 47}, - {11070, 1, 1, 48}, - {11101, 1, 1, 47}, - {11108, 1, 1, 47}, - {11109, 1, 1, 47}, - {11120, 1, 1, 47}, - {11122, 1, 1, 47}, - {11134, 1, 1, 47}, - {11141, 1, 1, 47}, - {11084, 1, 1, 47}, - {11087, 1, 1, 47}, - {11094, 1, 1, 47}, - {10374, 1, 1, 47}, - {10375, 1, 1, 47}, - {11051, 1, 1, 17}, - {11071, 1, 1, 16}, - {11076, 1, 1, 16}, - {11102, 1, 1, 17}, - {11124, 1, 1, 17}, - {11090, 1, 1, 17}, - {11159, 1, 1, 1200}, - {11159, 2, 1, 650}, - {11160, 1, 1, 800}, - {11160, 2, 1, 300}, - {11161, 1, 1, 100}, - {11161, 2, 1, 50}, - {11164, 1, 1, 100}, - {11162, 1, 1, 100}, - {11163, 1, 1, 100}, - {11158, 1, 1, 300}, - {11463, 1, 1, 300}, - {11356, 1, 1, 300}, - {11464, 1, 1, 300}, - {11357, 1, 1, 500}, - {11039, 1, 2, 300}, - {11040, 1, 2, 270}, - {11049, 1, 2, 300}, - {11061, 1, 2, 290}, - {11063, 1, 2, 290}, - {11077, 1, 2, 290}, - {11099, 1, 2, 280}, - {11105, 1, 2, 300}, - {11129, 1, 2, 250}, - {11130, 1, 2, 300}, - {11131, 1, 2, 280}, - {11139, 1, 2, 290}, - {11145, 1, 2, 260}, - {11096, 1, 2, 300}, - {11046, 1, 2, 47}, - {11066, 1, 2, 47}, - {11067, 1, 2, 47}, - {11072, 1, 2, 47}, - {11082, 1, 2, 47}, - {11103, 1, 2, 47}, - {11110, 1, 2, 47}, - {11112, 1, 2, 47}, - {11114, 1, 2, 47}, - {11115, 1, 2, 47}, - {11121, 1, 2, 47}, - {11144, 1, 2, 48}, - {11085, 1, 2, 47}, - {11089, 1, 2, 47}, - {11091, 1, 2, 47}, - {10376, 1, 2, 47}, - {10377, 1, 2, 47}, - {11127, 1, 2, 17}, - {11069, 1, 2, 17}, - {11142, 1, 2, 17}, - {11078, 1, 2, 17}, - {11056, 1, 2, 16}, - {11092, 1, 2, 16}, - {11159, 1, 2, 1200}, - {11159, 2, 2, 650}, - {11160, 1, 2, 800}, - {11160, 2, 2, 300}, - {11161, 1, 2, 100}, - {11161, 2, 2, 50}, - {11164, 1, 2, 100}, - {11162, 1, 2, 100}, - {11163, 1, 2, 100}, - {11158, 1, 2, 300}, - {11463, 1, 2, 300}, - {11356, 1, 2, 300}, - {11464, 1, 2, 300}, - {11357, 1, 2, 500}, - {11041, 1, 3, 266}, - {11047, 1, 3, 266}, - {11054, 1, 3, 266}, - {11065, 1, 3, 266}, - {11068, 1, 3, 266}, - {11075, 1, 3, 266}, - {11100, 1, 3, 266}, - {11106, 1, 3, 266}, - {11119, 1, 3, 266}, - {11135, 1, 3, 268}, - {11136, 1, 3, 268}, - {11138, 1, 3, 268}, - {11088, 1, 3, 268}, - {10370, 1, 3, 266}, - {10368, 1, 3, 268}, - {11043, 1, 3, 50}, - {11048, 1, 3, 50}, - {11050, 1, 3, 50}, - {11058, 1, 3, 50}, - {11060, 1, 3, 50}, - {11074, 1, 3, 50}, - {11107, 1, 3, 50}, - {11111, 1, 3, 50}, - {11113, 1, 3, 50}, - {11118, 1, 3, 50}, - {11126, 1, 3, 50}, - {11140, 1, 3, 50}, - {11086, 1, 3, 50}, - {11095, 1, 3, 50}, - {11055, 1, 3, 50}, - {10378, 1, 3, 50}, - {11052, 1, 3, 15}, - {11073, 1, 3, 15}, - {11146, 1, 3, 15}, - {11116, 1, 3, 15}, - {11123, 1, 3, 15}, - {11097, 1, 3, 15}, - {10367, 1, 3, 15}, - {10371, 1, 3, 15}, - {10373, 1, 3, 15}, - {10778, 1, 3, 375}, - {11209, 1, 3, 375}, - {10813, 1, 3, 375}, - {11389, 1, 3, 375}, - {11159, 1, 3, 1000}, - {11159, 2, 3, 250}, - {11160, 1, 3, 700}, - {11160, 2, 3, 175}, - {11161, 1, 3, 300}, - {11161, 2, 3, 75}, - {11465, 1, 3, 53}, - {11466, 1, 3, 27}, - {11467, 1, 3, 266}, - {11468, 1, 3, 533}, - {11469, 1, 3, 186}, - }, - 7002: { - {11037, 1, 1, 100}, - {11038, 1, 1, 100}, - {11044, 1, 1, 100}, - {11057, 1, 1, 100}, - {11059, 1, 1, 100}, - {11079, 1, 1, 100}, - {11098, 1, 1, 100}, - {11104, 1, 1, 100}, - {11117, 1, 1, 100}, - {11128, 1, 1, 100}, - {11133, 1, 1, 100}, - {11137, 1, 1, 100}, - {11143, 1, 1, 100}, - {11132, 1, 1, 100}, - {11042, 1, 1, 60}, - {11045, 1, 1, 60}, - {11064, 1, 1, 60}, - {11062, 1, 1, 60}, - {11070, 1, 1, 60}, - {11101, 1, 1, 60}, - {11108, 1, 1, 60}, - {11109, 1, 1, 60}, - {11120, 1, 1, 60}, - {11122, 1, 1, 60}, - {11134, 1, 1, 60}, - {11141, 1, 1, 60}, - {11084, 1, 1, 60}, - {11087, 1, 1, 60}, - {11094, 1, 1, 60}, - {10374, 1, 1, 60}, - {10375, 1, 1, 60}, - {11051, 1, 1, 20}, - {11071, 1, 1, 20}, - {11076, 1, 1, 20}, - {11102, 1, 1, 20}, - {11124, 1, 1, 20}, - {11090, 1, 1, 20}, - {11164, 1, 1, 400}, - {11162, 1, 1, 200}, - {11163, 1, 1, 200}, - {11463, 1, 1, 100}, - {11464, 1, 1, 150}, - {10355, 1, 1, 150}, - {12506, 1, 1, 200}, - {12507, 1, 1, 300}, - {12508, 1, 1, 900}, - {13629, 1, 1, 350}, - {13628, 1, 1, 200}, - {11356, 1, 1, 100}, - {11357, 1, 1, 150}, - {12014, 1, 1, 250}, - {12016, 1, 1, 400}, - {12015, 1, 1, 410}, - {11159, 2, 1, 500}, - {11159, 4, 1, 500}, - {11159, 6, 1, 500}, - {11160, 2, 1, 400}, - {11160, 4, 1, 400}, - {11160, 6, 1, 400}, - {11161, 2, 1, 100}, - {11161, 4, 1, 100}, - {11161, 6, 1, 100}, - {11039, 1, 2, 100}, - {11040, 1, 2, 100}, - {11049, 1, 2, 100}, - {11061, 1, 2, 100}, - {11063, 1, 2, 100}, - {11077, 1, 2, 100}, - {11099, 1, 2, 100}, - {11105, 1, 2, 100}, - {11129, 1, 2, 100}, - {11130, 1, 2, 100}, - {11131, 1, 2, 100}, - {11139, 1, 2, 100}, - {11145, 1, 2, 100}, - {11096, 1, 2, 100}, - {11046, 1, 2, 60}, - {11066, 1, 2, 60}, - {11067, 1, 2, 60}, - {11072, 1, 2, 60}, - {11082, 1, 2, 60}, - {11103, 1, 2, 60}, - {11110, 1, 2, 60}, - {11112, 1, 2, 60}, - {11114, 1, 2, 60}, - {11115, 1, 2, 60}, - {11121, 1, 2, 60}, - {11144, 1, 2, 60}, - {11085, 1, 2, 60}, - {11089, 1, 2, 60}, - {11091, 1, 2, 60}, - {10376, 1, 2, 60}, - {10377, 1, 2, 60}, - {11127, 1, 2, 20}, - {11069, 1, 2, 20}, - {11142, 1, 2, 20}, - {11078, 1, 2, 20}, - {11056, 1, 2, 20}, - {11092, 1, 2, 20}, - {11164, 1, 2, 400}, - {11162, 1, 2, 200}, - {11163, 1, 2, 200}, - {11463, 1, 2, 250}, - {11464, 1, 2, 350}, - {12506, 1, 2, 150}, - {12507, 1, 2, 200}, - {12508, 1, 2, 350}, - {13629, 1, 2, 250}, - {13628, 1, 2, 200}, - {10355, 1, 2, 400}, - {11158, 1, 2, 100}, - {11356, 1, 2, 100}, - {11357, 1, 2, 100}, - {12014, 1, 2, 300}, - {12016, 1, 2, 450}, - {12015, 1, 2, 460}, - {11159, 2, 2, 500}, - {11159, 4, 2, 500}, - {11159, 6, 2, 500}, - {11160, 2, 2, 400}, - {11160, 4, 2, 400}, - {11160, 6, 2, 400}, - {11161, 2, 2, 100}, - {11161, 4, 2, 100}, - {11161, 6, 2, 100}, - {11041, 1, 3, 120}, - {11047, 1, 3, 120}, - {11054, 1, 3, 120}, - {11065, 1, 3, 120}, - {11068, 1, 3, 120}, - {11075, 1, 3, 120}, - {11100, 1, 3, 120}, - {11106, 1, 3, 120}, - {11119, 1, 3, 120}, - {11135, 1, 3, 120}, - {11136, 1, 3, 120}, - {11138, 1, 3, 120}, - {11088, 1, 3, 120}, - {10370, 1, 3, 120}, - {10368, 1, 3, 120}, - {11043, 1, 3, 65}, - {11048, 1, 3, 65}, - {11050, 1, 3, 65}, - {11058, 1, 3, 65}, - {11060, 1, 3, 65}, - {11074, 1, 3, 65}, - {11107, 1, 3, 65}, - {11111, 1, 3, 65}, - {11113, 1, 3, 65}, - {11118, 1, 3, 65}, - {11126, 1, 3, 65}, - {11140, 1, 3, 65}, - {11086, 1, 3, 65}, - {11095, 1, 3, 65}, - {11055, 1, 3, 65}, - {10378, 1, 3, 65}, - {11052, 1, 3, 15}, - {11073, 1, 3, 15}, - {11146, 1, 3, 15}, - {11116, 1, 3, 15}, - {11123, 1, 3, 15}, - {11097, 1, 3, 15}, - {10367, 1, 3, 15}, - {10371, 1, 3, 15}, - {10373, 1, 3, 15}, - {10778, 3, 3, 490}, - {11209, 3, 3, 490}, - {10813, 3, 3, 490}, - {11389, 3, 3, 490}, - {12046, 3, 3, 500}, - {12503, 3, 3, 500}, - {11159, 2, 3, 500}, - {11159, 4, 3, 500}, - {11159, 6, 3, 500}, - {11160, 2, 3, 400}, - {11160, 4, 3, 400}, - {11160, 6, 3, 400}, - {11161, 2, 3, 100}, - {11161, 4, 3, 100}, - {11161, 6, 3, 100}, - {11465, 1, 3, 53}, - {11466, 1, 3, 27}, - {11467, 1, 3, 266}, - {11468, 1, 3, 533}, - {11469, 1, 3, 186}, - }, - 7011: { - {11037, 1, 1, 290}, - {11038, 1, 1, 270}, - {11044, 1, 1, 270}, - {11057, 1, 1, 290}, - {11059, 1, 1, 290}, - {11079, 1, 1, 290}, - {11098, 1, 1, 280}, - {11104, 1, 1, 300}, - {11117, 1, 1, 280}, - {11128, 1, 1, 290}, - {11133, 1, 1, 290}, - {11137, 1, 1, 300}, - {11143, 1, 1, 290}, - {11132, 1, 1, 270}, - {11042, 1, 1, 47}, - {11045, 1, 1, 47}, - {11064, 1, 1, 47}, - {11062, 1, 1, 47}, - {11070, 1, 1, 48}, - {11101, 1, 1, 47}, - {11108, 1, 1, 47}, - {11109, 1, 1, 47}, - {11120, 1, 1, 47}, - {11122, 1, 1, 47}, - {11134, 1, 1, 47}, - {11141, 1, 1, 47}, - {11084, 1, 1, 47}, - {11087, 1, 1, 47}, - {11094, 1, 1, 47}, - {10374, 1, 1, 47}, - {10375, 1, 1, 47}, - {11051, 1, 1, 17}, - {11071, 1, 1, 16}, - {11076, 1, 1, 16}, - {11102, 1, 1, 17}, - {11124, 1, 1, 17}, - {11090, 1, 1, 17}, - {11159, 1, 1, 1200}, - {11159, 2, 1, 650}, - {11160, 1, 1, 800}, - {11160, 2, 1, 300}, - {11161, 1, 1, 100}, - {11161, 2, 1, 50}, - {11164, 1, 1, 100}, - {11162, 1, 1, 100}, - {11163, 1, 1, 100}, - {11158, 1, 1, 300}, - {11463, 1, 1, 300}, - {11356, 1, 1, 300}, - {11464, 1, 1, 300}, - {11357, 1, 1, 500}, - {11039, 1, 2, 300}, - {11040, 1, 2, 270}, - {11049, 1, 2, 300}, - {11061, 1, 2, 290}, - {11063, 1, 2, 290}, - {11077, 1, 2, 290}, - {11099, 1, 2, 280}, - {11105, 1, 2, 300}, - {11129, 1, 2, 250}, - {11130, 1, 2, 300}, - {11131, 1, 2, 280}, - {11139, 1, 2, 290}, - {11145, 1, 2, 260}, - {11096, 1, 2, 300}, - {11046, 1, 2, 47}, - {11066, 1, 2, 47}, - {11067, 1, 2, 47}, - {11072, 1, 2, 47}, - {11082, 1, 2, 47}, - {11103, 1, 2, 47}, - {11110, 1, 2, 47}, - {11112, 1, 2, 47}, - {11114, 1, 2, 47}, - {11115, 1, 2, 47}, - {11121, 1, 2, 47}, - {11144, 1, 2, 48}, - {11085, 1, 2, 47}, - {11089, 1, 2, 47}, - {11091, 1, 2, 47}, - {10376, 1, 2, 47}, - {10377, 1, 2, 47}, - {11127, 1, 2, 17}, - {11069, 1, 2, 17}, - {11142, 1, 2, 17}, - {11078, 1, 2, 17}, - {11056, 1, 2, 16}, - {11092, 1, 2, 16}, - {11159, 1, 2, 1200}, - {11159, 2, 2, 650}, - {11160, 1, 2, 800}, - {11160, 2, 2, 300}, - {11161, 1, 2, 100}, - {11161, 2, 2, 50}, - {11164, 1, 2, 100}, - {11162, 1, 2, 100}, - {11163, 1, 2, 100}, - {11158, 1, 2, 300}, - {11463, 1, 2, 300}, - {11356, 1, 2, 300}, - {11464, 1, 2, 300}, - {11357, 1, 2, 500}, - {11041, 1, 3, 266}, - {11047, 1, 3, 266}, - {11054, 1, 3, 266}, - {11065, 1, 3, 266}, - {11068, 1, 3, 266}, - {11075, 1, 3, 266}, - {11100, 1, 3, 266}, - {11106, 1, 3, 266}, - {11119, 1, 3, 266}, - {11135, 1, 3, 268}, - {11136, 1, 3, 268}, - {11138, 1, 3, 268}, - {11088, 1, 3, 268}, - {10370, 1, 3, 266}, - {10368, 1, 3, 268}, - {11043, 1, 3, 50}, - {11048, 1, 3, 50}, - {11050, 1, 3, 50}, - {11058, 1, 3, 50}, - {11060, 1, 3, 50}, - {11074, 1, 3, 50}, - {11107, 1, 3, 50}, - {11111, 1, 3, 50}, - {11113, 1, 3, 50}, - {11118, 1, 3, 50}, - {11126, 1, 3, 50}, - {11140, 1, 3, 50}, - {11086, 1, 3, 50}, - {11095, 1, 3, 50}, - {11055, 1, 3, 50}, - {10378, 1, 3, 50}, - {11052, 1, 3, 15}, - {11073, 1, 3, 15}, - {11146, 1, 3, 15}, - {11116, 1, 3, 15}, - {11123, 1, 3, 15}, - {11097, 1, 3, 15}, - {10367, 1, 3, 15}, - {10371, 1, 3, 15}, - {10373, 1, 3, 15}, - {10778, 1, 3, 375}, - {11209, 1, 3, 375}, - {10813, 1, 3, 375}, - {11389, 1, 3, 375}, - {11159, 1, 3, 1000}, - {11159, 2, 3, 250}, - {11160, 1, 3, 700}, - {11160, 2, 3, 175}, - {11161, 1, 3, 300}, - {11161, 2, 3, 75}, - {11465, 1, 3, 53}, - {11466, 1, 3, 27}, - {11467, 1, 3, 266}, - {11468, 1, 3, 533}, - {11469, 1, 3, 186}, - }, - 7012: { - {11037, 1, 1, 290}, - {11038, 1, 1, 270}, - {11044, 1, 1, 270}, - {11057, 1, 1, 290}, - {11059, 1, 1, 290}, - {11079, 1, 1, 290}, - {11098, 1, 1, 280}, - {11104, 1, 1, 300}, - {11117, 1, 1, 280}, - {11128, 1, 1, 290}, - {11133, 1, 1, 290}, - {11137, 1, 1, 300}, - {11143, 1, 1, 290}, - {11132, 1, 1, 270}, - {11042, 1, 1, 47}, - {11045, 1, 1, 47}, - {11064, 1, 1, 47}, - {11062, 1, 1, 47}, - {11070, 1, 1, 48}, - {11101, 1, 1, 47}, - {11108, 1, 1, 47}, - {11109, 1, 1, 47}, - {11120, 1, 1, 47}, - {11122, 1, 1, 47}, - {11134, 1, 1, 47}, - {11141, 1, 1, 47}, - {11084, 1, 1, 47}, - {11087, 1, 1, 47}, - {11094, 1, 1, 47}, - {10374, 1, 1, 47}, - {10375, 1, 1, 47}, - {11051, 1, 1, 17}, - {11071, 1, 1, 16}, - {11076, 1, 1, 16}, - {11102, 1, 1, 17}, - {11124, 1, 1, 17}, - {11090, 1, 1, 17}, - {11159, 1, 1, 1200}, - {11159, 2, 1, 650}, - {11160, 1, 1, 800}, - {11160, 2, 1, 300}, - {11161, 1, 1, 100}, - {11161, 2, 1, 50}, - {11164, 1, 1, 100}, - {11162, 1, 1, 100}, - {11163, 1, 1, 100}, - {11158, 1, 1, 300}, - {11463, 1, 1, 300}, - {11356, 1, 1, 300}, - {11464, 1, 1, 300}, - {11357, 1, 1, 500}, - {11039, 1, 2, 300}, - {11040, 1, 2, 270}, - {11049, 1, 2, 300}, - {11061, 1, 2, 290}, - {11063, 1, 2, 290}, - {11077, 1, 2, 290}, - {11099, 1, 2, 280}, - {11105, 1, 2, 300}, - {11129, 1, 2, 250}, - {11130, 1, 2, 300}, - {11131, 1, 2, 280}, - {11139, 1, 2, 290}, - {11145, 1, 2, 260}, - {11096, 1, 2, 300}, - {11046, 1, 2, 47}, - {11066, 1, 2, 47}, - {11067, 1, 2, 47}, - {11072, 1, 2, 47}, - {11082, 1, 2, 47}, - {11103, 1, 2, 47}, - {11110, 1, 2, 47}, - {11112, 1, 2, 47}, - {11114, 1, 2, 47}, - {11115, 1, 2, 47}, - {11121, 1, 2, 47}, - {11144, 1, 2, 48}, - {11085, 1, 2, 47}, - {11089, 1, 2, 47}, - {11091, 1, 2, 47}, - {10376, 1, 2, 47}, - {10377, 1, 2, 47}, - {11127, 1, 2, 17}, - {11069, 1, 2, 17}, - {11142, 1, 2, 17}, - {11078, 1, 2, 17}, - {11056, 1, 2, 16}, - {11092, 1, 2, 16}, - {11159, 1, 2, 1200}, - {11159, 2, 2, 650}, - {11160, 1, 2, 800}, - {11160, 2, 2, 300}, - {11161, 1, 2, 100}, - {11161, 2, 2, 50}, - {11164, 1, 2, 100}, - {11162, 1, 2, 100}, - {11163, 1, 2, 100}, - {11158, 1, 2, 300}, - {11463, 1, 2, 300}, - {11356, 1, 2, 300}, - {11464, 1, 2, 300}, - {11357, 1, 2, 500}, - {11041, 1, 3, 266}, - {11047, 1, 3, 266}, - {11054, 1, 3, 266}, - {11065, 1, 3, 266}, - {11068, 1, 3, 266}, - {11075, 1, 3, 266}, - {11100, 1, 3, 266}, - {11106, 1, 3, 266}, - {11119, 1, 3, 266}, - {11135, 1, 3, 268}, - {11136, 1, 3, 268}, - {11138, 1, 3, 268}, - {11088, 1, 3, 268}, - {10370, 1, 3, 266}, - {10368, 1, 3, 268}, - {11043, 1, 3, 50}, - {11048, 1, 3, 50}, - {11050, 1, 3, 50}, - {11058, 1, 3, 50}, - {11060, 1, 3, 50}, - {11074, 1, 3, 50}, - {11107, 1, 3, 50}, - {11111, 1, 3, 50}, - {11113, 1, 3, 50}, - {11118, 1, 3, 50}, - {11126, 1, 3, 50}, - {11140, 1, 3, 50}, - {11086, 1, 3, 50}, - {11095, 1, 3, 50}, - {11055, 1, 3, 50}, - {10378, 1, 3, 50}, - {11052, 1, 3, 15}, - {11073, 1, 3, 15}, - {11146, 1, 3, 15}, - {11116, 1, 3, 15}, - {11123, 1, 3, 15}, - {11097, 1, 3, 15}, - {10367, 1, 3, 15}, - {10371, 1, 3, 15}, - {10373, 1, 3, 15}, - {10778, 1, 3, 375}, - {11209, 1, 3, 375}, - {10813, 1, 3, 375}, - {11389, 1, 3, 375}, - {11159, 1, 3, 1000}, - {11159, 2, 3, 250}, - {11160, 1, 3, 700}, - {11160, 2, 3, 175}, - {11161, 1, 3, 300}, - {11161, 2, 3, 75}, - {11465, 1, 3, 53}, - {11466, 1, 3, 27}, - {11467, 1, 3, 266}, - {11468, 1, 3, 533}, - {11469, 1, 3, 186}, - }, -} - type PaperMissionTimetable struct { Start time.Time End time.Time @@ -964,7 +201,7 @@ type PaperMissionTimetable struct { type PaperMissionData struct { Unk0 uint8 Unk1 uint8 - Unk2 int16 + Target int16 Reward1ID uint16 Reward1Quantity uint8 Reward2ID uint16 @@ -977,40 +214,80 @@ type PaperMission struct { } type PaperData struct { - Unk0 uint16 - Unk1 int16 - Unk2 int16 - Unk3 int16 - Unk4 int16 - Unk5 int16 - Unk6 int16 + ID uint16 + Ward int16 + Option1 int16 + Option2 int16 + Option3 int16 + Option4 int16 + Option5 int16 } type PaperGift struct { - Unk0 uint16 - Unk1 uint8 - Unk2 uint8 - Unk3 uint16 + ItemID uint16 + Unk1 uint8 + Unk2 uint8 + Chance uint16 } func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) { pkt := p.(*mhfpacket.MsgMhfGetPaperData) var data []*byteframe.ByteFrame - var paperData []PaperData var paperMissions PaperMission - var paperGift []PaperGift - switch pkt.Unk2 { + // pkt.Type + // if pkt.Type 3 then Unk2==0 PaperMissionData + // if pkt.Type 0 then unk2 4, 5 or 6 PaperData + // if pkt.Type 2 then unk2 6001 6011 PaperGiftData + // is pkt.Unk2 a index? + + switch pkt.ID { case 0: + //PaperMissionData Target + // 1: Total Floors + // 2: TRP Acquired + // 3: Treasure Chests + // 4: Old Tresure Chests + // 5: Defeat Large Monster + // 6: Dist 1 Dure Slays + // 7: Dist 2 Dure Slays + // 8: Dist 3 Dure Slays + // 9: Dist 4 Dure Slays + paperMissions = PaperMission{ []PaperMissionTimetable{{TimeMidnight(), TimeMidnight().Add(24 * time.Hour)}}, - []PaperMissionData{}, + []PaperMissionData{{1, 1, 50, 7, 10, 8, 11}, + {1, 2, 100, 7, 12, 8, 13}, + {1, 3, 150, 7, 14, 8, 15}, + {1, 4, 200, 7, 16, 8, 17}, + {1, 5, 250, 7, 18, 8, 19}, + {1, 6, 300, 7, 21, 8, 21}}, + } + + case 4: + //Triggers on Tower Menu Load and on Tower Quest Load + paperData = []PaperData{ + + //Seen Monsters (id,on off, 0, 0, 0, 0, 0) + //Value is based on 2001 for monsters + {1011, 1, 0, 0, 0, 0, 0}, + {1011, 2, 0, 0, 0, 0, 0}, + //Seen Items (id,on off, 0, 0, 0, 0, 0) + //Value is based in 6001 for items + {1012, 1, 0, 0, 0, 0, 0}, + {1012, 2, 0, 0, 0, 0, 0}, + + //Its possible that these also controll the annoucement banners and chat messages ... + // Functions to look at... + //tower_announce_move() -> disp_tower_announce() + // sendTowerVenomChatMsg() } case 5: + //On load into MezePorta paperData = []PaperData{ // getTowerQuestTowerLevel - {1001, 1, 0, 0, 0, 0, 0}, + {1001, 1, 1, 0, 0, 0, 0}, {1001, 2, 0, 0, 0, 0, 0}, // iniTQT {1003, 1, 100, 100, 200, 100, 0}, @@ -1021,58 +298,61 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) { {1007, 1, 0, 0, 0, 0, 0}, {1008, 200, 400, 3000, 400, 3000, 0}, // getPaperDataSetParam1 / Dure Goal - {1010, 1, 4000, 0, 0, 0, 0}, - {1010, 2, 4000, 0, 0, 0, 0}, + {1010, 1, 100, 0, 0, 0, 0}, + {1010, 2, 100, 0, 0, 0, 0}, // update_disp_flag / getPaperDataSetParam1 {1011, 1, 6000, 15000, 20000, 25000, 30000}, {1011, 2, 6000, 15000, 20000, 25000, 30000}, {1012, 1, 8000, 17500, 22500, 27500, 31000}, {1012, 2, 8000, 17500, 22500, 27500, 31000}, // setServerZako - {1015, 1, 16, 16, 16, 0, 0}, - {1015, 2, 16, 16, 16, 0, 0}, + {1015, 1, mhfmon.Velociprey, mhfmon.Velociprey, mhfmon.Velociprey, 0, 0}, + {1015, 2, mhfmon.Velociprey, mhfmon.Velociprey, mhfmon.Velociprey, 0, 0}, // createTowerFloorRandomNumberArray {1101, 1, 2016, 500, 0, 0, 0}, {1101, 2, 2016, 500, 0, 0, 0}, // HRP/SRP/GRP/GSRP/TRP reward {1103, 1, 0, 0, 3000, 0, 3000}, {1103, 2, 0, 0, 3000, 0, 3000}, - // getTowerNextVenomLevel + // getTowerNextVenomLevel {ID, Block, MinFloor, MaxFloor, Frequency, Unk, Unk} {1104, 1, 10, 9999, 40, 0, 0}, {1104, 2, 10, 9999, 40, 0, 0}, {1105, 1, 10, 500, 0, 0, 0}, {1105, 2, 10, 500, 0, 0, 0}, - // setServerBoss - {2001, 1, mhfmon.Gravios, 58, 0, 6, 700}, - {2001, 1, mhfmon.Gypceros, 58, 0, 3, 200}, - {2001, 1, mhfmon.Basarios, 58, 0, 7, 250}, + // setServerBoss {ID, Block, Monster, Unk, Unk, Index, Points} {2001, 1, mhfmon.Velocidrome, 58, 0, 1, 100}, - {2001, 1, mhfmon.Rajang, 58, 0, 8, 1000}, - {2001, 1, mhfmon.ShogunCeanataur, 58, 0, 9, 500}, {2001, 1, mhfmon.Bulldrome, 58, 0, 2, 150}, + {2001, 1, mhfmon.Gypceros, 58, 0, 3, 200}, {2001, 1, mhfmon.Hypnocatrice, 58, 0, 4, 200}, {2001, 1, mhfmon.Lavasioth, 58, 0, 5, 500}, + {2001, 1, mhfmon.Gravios, 58, 0, 6, 700}, + {2001, 1, mhfmon.Basarios, 58, 0, 7, 250}, + {2001, 1, mhfmon.Rajang, 58, 0, 8, 1000}, + {2001, 1, mhfmon.ShogunCeanataur, 58, 0, 9, 500}, {2001, 1, mhfmon.Tigrex, 58, 0, 10, 800}, {2001, 1, mhfmon.Espinas, 58, 0, 11, 900}, {2001, 1, mhfmon.Pariapuria, 58, 0, 12, 600}, - {2001, 2, mhfmon.Gravios, 60, 0, 6, 700}, - {2001, 2, mhfmon.Gypceros, 60, 0, 3, 200}, - {2001, 2, mhfmon.Basarios, 60, 0, 7, 350}, + {2001, 2, mhfmon.Velocidrome, 60, 0, 1, 100}, - {2001, 2, mhfmon.PurpleGypceros, 60, 0, 13, 200}, - {2001, 2, mhfmon.YianGaruga, 60, 0, 15, 600}, - {2001, 2, mhfmon.Rajang, 60, 0, 8, 1000}, {2001, 2, mhfmon.ShogunCeanataur, 60, 0, 2, 500}, - {2001, 2, mhfmon.Bulldrome, 60, 0, 9, 150}, + {2001, 2, mhfmon.Gypceros, 60, 0, 3, 200}, {2001, 2, mhfmon.Hypnocatrice, 60, 0, 4, 200}, {2001, 2, mhfmon.Lavasioth, 60, 0, 5, 500}, + + {2001, 2, mhfmon.Gravios, 60, 0, 6, 700}, + {2001, 2, mhfmon.Basarios, 60, 0, 7, 350}, + {2001, 2, mhfmon.Rajang, 60, 0, 8, 1000}, + {2001, 2, mhfmon.Bulldrome, 60, 0, 9, 150}, {2001, 2, mhfmon.Tigrex, 60, 0, 10, 800}, {2001, 2, mhfmon.Espinas, 60, 0, 11, 900}, - {2001, 2, mhfmon.BurningEspinas, 60, 0, 14, 900}, {2001, 2, mhfmon.Pariapuria, 60, 0, 12, 600}, + {2001, 2, mhfmon.PurpleGypceros, 60, 0, 13, 200}, + {2001, 2, mhfmon.BurningEspinas, 60, 0, 14, 900}, + {2001, 2, mhfmon.YianGaruga, 60, 0, 15, 600}, {2001, 2, mhfmon.Dyuragaua, 60, 0, 16, 1000}, } case 6: + //Loads on Tower Quest load paperData = []PaperData{ // updateClearTowerFloor {1002, 100, 0, 0, 0, 0, 0}, @@ -1506,28 +786,55 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) { {4202, 2, 0, 11469, 1, 1400, 1}, } default: - if pkt.Unk2 < 1000 { - s.logger.Info("PaperData request for unknown type", zap.Uint32("Unk2", pkt.Unk2)) + if pkt.ID < 1000 { + s.logger.Info("PaperData request for unknown type", zap.Uint32("Unk2", pkt.ID)) } + } - if pkt.Unk2 > 1000 { - _, ok := paperGiftData[pkt.Unk2] - if ok { - paperGift = paperGiftData[pkt.Unk2] - } else { - s.logger.Info("PaperGift request for unknown type", zap.Uint32("Unk2", pkt.Unk2)) - } - for _, gift := range paperGift { + switch pkt.Type { + + case 0: + for _, pdata := range paperData { bf := byteframe.NewByteFrame() - bf.WriteUint16(gift.Unk0) - bf.WriteUint8(gift.Unk1) - bf.WriteUint8(gift.Unk2) - bf.WriteUint16(gift.Unk3) + bf.WriteUint16(pdata.ID) + bf.WriteInt16(pdata.Ward) + bf.WriteInt16(pdata.Option1) + bf.WriteInt16(pdata.Option2) + bf.WriteInt16(pdata.Option3) + bf.WriteInt16(pdata.Option4) + bf.WriteInt16(pdata.Option5) data = append(data, bf) } doAckEarthSucceed(s, pkt.AckHandle, data) - } else if pkt.Unk2 == 0 { + case 2: + var paperGifts []PaperGift + var paperGift PaperGift + paperGiftData, err := s.server.db.Queryx("SELECT item_id, unk0, unk1, chance FROM paper_data_gifts WHERE gift_id = $1", pkt.ID) + if err != nil { + paperGiftData.Close() + s.logger.Info("PaperGift request for unknown type", zap.Uint32("ID", pkt.ID)) + + } + + for paperGiftData.Next() { + err = paperGiftData.Scan(&paperGift.ItemID, &paperGift.Unk1, &paperGift.Unk2, &paperGift.Chance) + if err != nil { + continue + } + paperGifts = append(paperGifts, paperGift) + } + for _, gift := range paperGifts { + bf := byteframe.NewByteFrame() + bf.WriteUint16(gift.ItemID) + bf.WriteUint8(gift.Unk1) + bf.WriteUint8(gift.Unk2) + bf.WriteUint16(gift.Chance) + data = append(data, bf) + } + doAckEarthSucceed(s, pkt.AckHandle, data) + + case 3: bf := byteframe.NewByteFrame() bf.WriteUint16(uint16(len(paperMissions.Timetables))) bf.WriteUint16(uint16(len(paperMissions.Data))) @@ -1538,26 +845,16 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) { for _, mdata := range paperMissions.Data { bf.WriteUint8(mdata.Unk0) bf.WriteUint8(mdata.Unk1) - bf.WriteInt16(mdata.Unk2) + bf.WriteInt16(mdata.Target) bf.WriteUint16(mdata.Reward1ID) bf.WriteUint8(mdata.Reward1Quantity) bf.WriteUint16(mdata.Reward2ID) bf.WriteUint8(mdata.Reward2Quantity) } doAckBufSucceed(s, pkt.AckHandle, bf.Data()) - } else { - for _, pdata := range paperData { - bf := byteframe.NewByteFrame() - bf.WriteUint16(pdata.Unk0) - bf.WriteInt16(pdata.Unk1) - bf.WriteInt16(pdata.Unk2) - bf.WriteInt16(pdata.Unk3) - bf.WriteInt16(pdata.Unk4) - bf.WriteInt16(pdata.Unk5) - bf.WriteInt16(pdata.Unk6) - data = append(data, bf) - } - doAckEarthSucceed(s, pkt.AckHandle, data) + default: + s.logger.Info("PaperData request for unknown type", zap.Uint32("Type", pkt.Type)) + } } diff --git a/server/channelserver/handlers_tower.go b/server/channelserver/handlers_tower.go index 8f32a7882..f9055a2e9 100644 --- a/server/channelserver/handlers_tower.go +++ b/server/channelserver/handlers_tower.go @@ -3,10 +3,11 @@ package channelserver import ( _config "erupe-ce/config" "fmt" - "go.uber.org/zap" "strings" "time" + "go.uber.org/zap" + "erupe-ce/common/byteframe" "erupe-ce/common/stringsupport" "erupe-ce/network/mhfpacket" @@ -23,8 +24,15 @@ type TowerInfoSkill struct { } type TowerInfoHistory struct { - Unk0 []int16 // 5 - Unk1 []int16 // 5 + Unk0 TowerHistory // 5 + Unk1 TowerHistory // 5 +} +type TowerHistory struct { + Unk0 int16 + Unk1 int16 + Unk2 int16 + Unk3 int16 + Unk4 int16 } type TowerInfoLevel struct { @@ -51,12 +59,25 @@ func handleMsgMhfGetTowerInfo(s *Session, p mhfpacket.MHFPacket) { History []TowerInfoHistory Level []TowerInfoLevel } - + history1 := TowerHistory{ + Unk0: 1, + Unk1: 2, + Unk2: 3, + Unk3: 4, + Unk4: 5, + } + history2 := TowerHistory{ + Unk0: 1, + Unk1: 2, + Unk2: 3, + Unk3: 4, + Unk4: 5, + } towerInfo := TowerInfo{ TRP: []TowerInfoTRP{{0, 0}}, Skill: []TowerInfoSkill{{0, make([]int16, 64)}}, - History: []TowerInfoHistory{{make([]int16, 5), make([]int16, 5)}}, - Level: []TowerInfoLevel{{0, 0, 0, 0}, {0, 0, 0, 0}}, + History: []TowerInfoHistory{{history1, history2}}, + Level: []TowerInfoLevel{{0, 5, 5, 5}, {0, 5, 5, 5}}, } var tempSkills string @@ -94,12 +115,17 @@ func handleMsgMhfGetTowerInfo(s *Session, p mhfpacket.MHFPacket) { case 4: for _, history := range towerInfo.History { bf := byteframe.NewByteFrame() - for i := range history.Unk0 { - bf.WriteInt16(history.Unk0[i]) - } - for i := range history.Unk1 { - bf.WriteInt16(history.Unk1[i]) - } + bf.WriteInt16(history.Unk0.Unk0) + bf.WriteInt16(history.Unk0.Unk1) + bf.WriteInt16(history.Unk0.Unk2) + bf.WriteInt16(history.Unk0.Unk3) + bf.WriteInt16(history.Unk0.Unk4) + + bf.WriteInt16(history.Unk1.Unk0) + bf.WriteInt16(history.Unk1.Unk1) + bf.WriteInt16(history.Unk1.Unk2) + bf.WriteInt16(history.Unk1.Unk3) + bf.WriteInt16(history.Unk1.Unk4) data = append(data, bf) } case 3, 5: @@ -130,7 +156,8 @@ func handleMsgMhfPostTowerInfo(s *Session, p mhfpacket.MHFPacket) { zap.Int32("Unk6", pkt.Unk6), zap.Int32("Unk7", pkt.Unk7), zap.Int32("Block1", pkt.Block1), - zap.Int64("Unk9", pkt.Unk9), + zap.Int32("TimeTaken", pkt.TimeTaken), + zap.Int32("CID", pkt.CID), ) } @@ -388,23 +415,88 @@ func handleMsgMhfPostTenrouirai(s *Session, p mhfpacket.MHFPacket) { } } +type PresentBox struct { + ItemClaimIndex uint32 + PresentType int32 + Unk2 int32 + Unk3 int32 + Unk4 int32 + Unk5 int32 + Unk6 int32 + Unk7 int32 + DistributionType int32 //Same as Siabatu Distribution Type 7201:Item 7202:N Points 7203:Guild Contribution Points + ItemID int32 + Amount int32 +} + func handleMsgMhfPresentBox(s *Session, p mhfpacket.MHFPacket) { pkt := p.(*mhfpacket.MsgMhfPresentBox) var data []*byteframe.ByteFrame - /* - bf.WriteUint32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - bf.WriteInt32(0) - */ + var presents []PresentBox + //On Open Operation 1 and 3 + //On Accept Operation 1 and 2 (Stop player from reclaiming I assume (Needs a database flag) + switch pkt.Operation { + case 1: + // When Operation is 1, populate presents based on PresentType in packet + + //Placed it in a dynamic array for now + //Empty Array shows the No Items to claim message! + for _, presentType := range pkt.PresentType { + + presents = []PresentBox{ + {1, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {2, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {3, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {4, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {5, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12895, 8}, + {6, int32(presentType), 0, 0, 0, 0, 0, 0, 7202, 12893, 1}, + {7, int32(presentType), 0, 0, 0, 0, 0, 0, 7203, 12895, 8}, + } + + } + case 2: + // When Operation is 2, populate presents for claiming items + + //ItemClaimIndex in Option 1 of the Present Box Call populates pkt.PresentType which triggers this packet notice PresentType is Populated with ItemClaimIndex for a 1 to 1 Relationship + presents = []PresentBox{ + {0, 1, 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {0, 2, 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {0, 3, 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {0, 4, 0, 0, 0, 0, 0, 0, 7201, 12893, 1}, + {0, 5, 0, 0, 0, 0, 0, 0, 7201, 12895, 8}, + {0, 6, 0, 0, 0, 0, 0, 0, 7202, 12893, 1}, + {0, 7, 0, 0, 0, 0, 0, 0, 7203, 12895, 8}, + } + case 3: + // When Operation is 3, send an empty byte frame (Possibly a better response here) + bf := byteframe.NewByteFrame() + doAckBufSucceed(s, pkt.AckHandle, bf.Data()) + return + default: + s.logger.Info("request for unknown type", zap.Uint32("Unk1", pkt.Operation)) + + } + + // Construct and send the response data based on the presents + for _, present := range presents { + bf := byteframe.NewByteFrame() + bf.WriteUint32(present.ItemClaimIndex) + bf.WriteInt32(present.PresentType) + bf.WriteInt32(present.Unk2) + bf.WriteInt32(present.Unk3) + bf.WriteInt32(present.Unk4) + bf.WriteInt32(present.Unk5) + bf.WriteInt32(present.Unk6) + bf.WriteInt32(present.Unk7) + bf.WriteInt32(present.DistributionType) + bf.WriteInt32(present.ItemID) + bf.WriteInt32(present.Amount) + data = append(data, bf) + } + + // Send the accumulated data doAckEarthSucceed(s, pkt.AckHandle, data) + } type GemInfo struct {