mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-17 09:24:50 +01:00
Clean up present box and added remaining tower items
This commit is contained in:
@@ -73,16 +73,16 @@ func handleMsgMhfGetBreakSeibatuLevelReward(s *Session, p mhfpacket.MHFPacket) {
|
||||
}
|
||||
|
||||
type WeeklySeibatuRankingReward0 struct {
|
||||
Index0 int32 //Place Start
|
||||
Index1 int32 //Place Finish
|
||||
Index2 uint32 // UNK
|
||||
Type int32 //Type //7201 Value //7202 ??? Points //7203 ??? Points Blue
|
||||
ID int32 //ID
|
||||
Value int32 // Value
|
||||
Index0 int32 //Place Start
|
||||
Index1 int32 //Place Finish
|
||||
Index2 uint32 // UNK
|
||||
DistributionType int32 //Type 7201:Item 7202:N Points 7203:Guild Contribution Points
|
||||
ItemID int32
|
||||
Amount int32
|
||||
}
|
||||
type WeeklySeibatuRankingReward1 struct {
|
||||
Unk0 int32
|
||||
ID int32
|
||||
ItemID int32
|
||||
Amount uint32
|
||||
PlaceFrom int32
|
||||
PlaceTo int32
|
||||
@@ -96,7 +96,7 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
|
||||
switch pkt.Operation {
|
||||
case 1:
|
||||
switch pkt.ID { // Seems to align with EarthStatus 1 and 2
|
||||
switch pkt.ID { // Seems to align with EarthStatus 1 and 2 for Conquest
|
||||
case 1:
|
||||
switch pkt.EarthMonster {
|
||||
case 116:
|
||||
@@ -200,7 +200,6 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
}
|
||||
//Conquest
|
||||
|
||||
case 2:
|
||||
switch pkt.EarthMonster {
|
||||
@@ -305,7 +304,6 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
{0, 2, 6, 1000, 1001},
|
||||
}
|
||||
}
|
||||
//Conquest
|
||||
|
||||
}
|
||||
case 3:
|
||||
@@ -370,33 +368,27 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
case 260001:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
|
||||
//Can only have 10 in each dist (It disapears otherwise)
|
||||
//Can only have 10 in each dist (It disapears otherwise) Looks like up to dist 4 is implemented
|
||||
//This is claimable for every Dure Kill, Make cliamable in bulk or mandatory claim per kill
|
||||
//{unk,unk,dist,seiabtuType,ItemID,Value}
|
||||
{0, 0, 1, 7201, 12068, 1},
|
||||
{0, 0, 1, 7201, 12069, 1},
|
||||
{0, 0, 1, 7201, 12070, 1},
|
||||
{0, 0, 1, 7201, 12071, 1},
|
||||
{0, 0, 1, 7201, 12072, 1},
|
||||
{0, 0, 1, 7201, 12073, 1},
|
||||
{0, 0, 1, 7201, 12074, 1},
|
||||
{0, 0, 1, 7201, 12075, 1},
|
||||
{0, 0, 1, 7201, 12076, 1},
|
||||
{0, 0, 1, 7201, 12077, 1},
|
||||
{0, 0, 1, 7201, 11463, 1},
|
||||
{0, 0, 1, 7201, 11464, 1},
|
||||
{0, 0, 1, 7201, 11163, 1},
|
||||
{0, 0, 1, 7201, 11159, 5},
|
||||
{0, 0, 1, 7201, 11160, 5},
|
||||
{0, 0, 1, 7201, 11161, 5},
|
||||
|
||||
{0, 0, 2, 7201, 12068, 1},
|
||||
{0, 0, 2, 7201, 12069, 1},
|
||||
{0, 0, 2, 7201, 12070, 1},
|
||||
{0, 0, 2, 7201, 12071, 1},
|
||||
{0, 0, 2, 7201, 12072, 1},
|
||||
{0, 0, 2, 7201, 12073, 1},
|
||||
{0, 0, 2, 7201, 12074, 1},
|
||||
{0, 0, 2, 7201, 12075, 1},
|
||||
{0, 0, 2, 7201, 12076, 1},
|
||||
{0, 0, 2, 7201, 12077, 1},
|
||||
{0, 0, 2, 7201, 12506, 1},
|
||||
{0, 0, 2, 7201, 10355, 1},
|
||||
{0, 0, 2, 7201, 11163, 1},
|
||||
{0, 0, 2, 7201, 11159, 5},
|
||||
{0, 0, 2, 7201, 11160, 5},
|
||||
{0, 0, 2, 7201, 11161, 5},
|
||||
}
|
||||
case 260003:
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
//Adjust Floors done in database to make blue ?? Possible value here for dist
|
||||
//Adjust Floors done in database to make blue
|
||||
//This is claimable for every Floor Climbed across dist 1 and 2
|
||||
//{Floor,unk,unk,seiabtuType,ItemID,Value}
|
||||
|
||||
{1, 0, 0, 7201, 11158, 1},
|
||||
@@ -573,7 +565,6 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
}
|
||||
default: //Covers all Pallone Requests... for now
|
||||
weeklySeibatuRankingRewards = []WeeklySeibatuRankingReward0{
|
||||
// To do figure out values 3-5 its some sort of item structure
|
||||
//1st
|
||||
{1, 0, 0, 7202, 10, 10000},
|
||||
{1, 1, 0, 7201, 10, 30},
|
||||
@@ -597,7 +588,7 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
for _, seibatuData := range weeklySeibatuRankingRewardsWeird {
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteInt32(seibatuData.Unk0)
|
||||
bf.WriteInt32(seibatuData.ID)
|
||||
bf.WriteInt32(seibatuData.ItemID)
|
||||
bf.WriteUint32(seibatuData.Amount)
|
||||
bf.WriteInt32(seibatuData.PlaceFrom)
|
||||
bf.WriteInt32(seibatuData.PlaceTo)
|
||||
@@ -610,9 +601,9 @@ func handleMsgMhfGetWeeklySeibatuRankingReward(s *Session, p mhfpacket.MHFPacket
|
||||
bf.WriteInt32(seibatuData.Index0)
|
||||
bf.WriteInt32(seibatuData.Index1)
|
||||
bf.WriteUint32(seibatuData.Index2)
|
||||
bf.WriteInt32(seibatuData.Type)
|
||||
bf.WriteInt32(seibatuData.ID)
|
||||
bf.WriteInt32(seibatuData.Value)
|
||||
bf.WriteInt32(seibatuData.DistributionType)
|
||||
bf.WriteInt32(seibatuData.ItemID)
|
||||
bf.WriteInt32(seibatuData.Amount)
|
||||
data = append(data, bf)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -390,17 +390,17 @@ func handleMsgMhfPostTenrouirai(s *Session, p mhfpacket.MHFPacket) {
|
||||
}
|
||||
|
||||
type PresentBox struct {
|
||||
Unk0 uint32 // Populates Unk7 in second call
|
||||
PresentType int32
|
||||
Unk2 int32
|
||||
Unk3 int32
|
||||
Unk4 int32
|
||||
Unk5 int32
|
||||
Unk6 int32
|
||||
Unk7 int32
|
||||
SeiabtuType int32 //7201:Item 7202:N Points 7203:Guild Contribution Points
|
||||
Item int32
|
||||
Amount int32
|
||||
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) {
|
||||
@@ -408,48 +408,69 @@ func handleMsgMhfPresentBox(s *Session, p mhfpacket.MHFPacket) {
|
||||
var data []*byteframe.ByteFrame
|
||||
var presents []PresentBox
|
||||
//On Open Operation 1 and 3
|
||||
//On Accept Operation 1 and 2 (Stop player from reclaiming)
|
||||
if pkt.Operation == 1 || pkt.Operation == 2 {
|
||||
//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 {
|
||||
//Placed it in a dynamic array for now
|
||||
//Empty Array shows the No Items to claim message!
|
||||
//Gift Type in [0] and [1] works...[1] Controlls what gets shown [0] is for second request Unk7 Population...
|
||||
|
||||
presents = []PresentBox{
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1},
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1},
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1},
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12893, 1},
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7201, 12895, 8},
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7202, 12893, 1},
|
||||
{presentType, int32(presentType), 0, 0, 0, 0, 0, 0, 7203, 12895, 8},
|
||||
{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},
|
||||
}
|
||||
}
|
||||
|
||||
for _, present := range presents {
|
||||
bf := byteframe.NewByteFrame()
|
||||
bf.WriteUint32(present.Unk0) //Palone::PresentCommunicator::sort Index Maybe
|
||||
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.SeiabtuType)
|
||||
bf.WriteInt32(present.Item)
|
||||
bf.WriteInt32(present.Amount)
|
||||
data = append(data, bf)
|
||||
}
|
||||
case 2:
|
||||
// When Operation is 2, populate presents for claiming items
|
||||
|
||||
doAckEarthSucceed(s, pkt.AckHandle, data)
|
||||
} else if pkt.Operation == 3 {
|
||||
//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())
|
||||
} else {
|
||||
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 {
|
||||
|
||||
Reference in New Issue
Block a user