mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-16 17:05:03 +01:00
Cleaned up PresentBox and Fixed Op Issue for PD
This commit is contained in:
@@ -3,7 +3,6 @@ package channelserver
|
|||||||
import (
|
import (
|
||||||
"erupe-ce/common/mhfmon"
|
"erupe-ce/common/mhfmon"
|
||||||
"erupe-ce/common/stringsupport"
|
"erupe-ce/common/stringsupport"
|
||||||
_config "erupe-ce/config"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
@@ -1008,16 +1007,18 @@ func handleMsgMhfGetPaperData(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
// if pkt.Type 2 then unk2 6001 6011 PaperGiftData
|
// if pkt.Type 2 then unk2 6001 6011 PaperGiftData
|
||||||
// is pkt.Unk2 a index?
|
// is pkt.Unk2 a index?
|
||||||
|
|
||||||
paperMissions = PaperMission{
|
|
||||||
[]PaperMissionTimetable{{TimeMidnight(), TimeMidnight().Add(24 * time.Hour)}},
|
|
||||||
[]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}},
|
|
||||||
}
|
|
||||||
switch pkt.Unk2 {
|
switch pkt.Unk2 {
|
||||||
|
case 0:
|
||||||
|
paperMissions = PaperMission{
|
||||||
|
[]PaperMissionTimetable{{TimeMidnight(), TimeMidnight().Add(24 * time.Hour)}},
|
||||||
|
[]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:
|
case 4:
|
||||||
//Triggers on Tower Menu Load and on Tower Quest Load
|
//Triggers on Tower Menu Load and on Tower Quest Load
|
||||||
paperData = []PaperData{
|
paperData = []PaperData{
|
||||||
|
|||||||
@@ -408,36 +408,42 @@ func handleMsgMhfPresentBox(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
var data []*byteframe.ByteFrame
|
var data []*byteframe.ByteFrame
|
||||||
|
|
||||||
//PresentCommunicator
|
//PresentCommunicator
|
||||||
// possible the same types for seibatu work here.
|
|
||||||
// Special Values 7201+
|
|
||||||
// ON Request for PALLONE!
|
// ON Request for PALLONE!
|
||||||
//3301 3302 3303
|
//3301 3302 3303
|
||||||
// ON Request for TOWER!
|
// ON Request for TOWER!
|
||||||
|
//Unk0:[0] Unk1:[1] Unk2:[2] Unk3:[0] Unk4:[0] Unk5:[0] Unk6:[0]
|
||||||
//260003 260001
|
//260003 260001
|
||||||
presents := []PresentBox{{7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}, {7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7}}
|
//Unk0:[0] Unk1:[3] Unk2:[2] Unk3:[0] Unk4:[0] Unk5:[0] Unk6:[0]
|
||||||
for index, _ := range presents {
|
//260003 260001
|
||||||
|
|
||||||
|
//Gets called for Case 1 but not 2????
|
||||||
|
//Palone::PresentCommunicator::sort((void)) 0239E988
|
||||||
|
|
||||||
|
presents := []PresentBox{
|
||||||
|
|
||||||
|
{1, 3201, 1, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{2, 3202, 2, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{3, 3203, 3, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{4, 3204, 4, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{5, 3301, 5, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{6, 3302, 6, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{7, 3303, 7, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{6, 260001, 6, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
{7, 260003, 7, 12068, 1, 12068, 12068, 12068, 12068, 12068, 1},
|
||||||
|
}
|
||||||
|
for _, present := range presents {
|
||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
bf.WriteUint32(0)
|
bf.WriteUint32(present.Unk0) //Palone::PresentCommunicator::sort Index Maybe
|
||||||
bf.WriteInt32(0)
|
bf.WriteInt32(present.Unk1)
|
||||||
bf.WriteInt32(0) //compPresent__Q2_6Palone19PresentCommunicatorSFPC20RESPONSE_PRESENT_BOXT1 // v15 = v7[2]; if ( v15 > v14 )return 1; if ( v15 < v14 ) return 0; OR
|
bf.WriteInt32(present.Unk2)
|
||||||
// v12 = *(_DWORD *)(v9 + 8);
|
bf.WriteInt32(present.Unk3)
|
||||||
// v13 = v7[2];
|
bf.WriteInt32(present.Unk4)
|
||||||
// if ( v13 <= v12 )
|
bf.WriteInt32(present.Unk5)
|
||||||
// {
|
bf.WriteInt32(present.Unk6)
|
||||||
// if ( v13 < v12 )
|
bf.WriteInt32(present.Unk7)
|
||||||
// return 0;
|
bf.WriteInt32(present.Unk8)
|
||||||
// return *(_DWORD *)(v9 + 20) < v7[5];
|
bf.WriteInt32(present.Unk9)
|
||||||
// }
|
bf.WriteInt32(present.Unk10)
|
||||||
// return 1;
|
|
||||||
// }
|
|
||||||
bf.WriteInt32(0) //compPresent__Q2_6Palone19PresentCommunicatorSFPC20RESPONSE_PRESENT_BOXT1 // v17 = v7[3]; if ( v17 > v16 )return 1; if ( v17 < v16 ) return 0;
|
|
||||||
bf.WriteInt32(0)
|
|
||||||
bf.WriteInt32(0) //Link to [2]
|
|
||||||
bf.WriteInt32(0)
|
|
||||||
bf.WriteInt32(0)
|
|
||||||
bf.WriteInt32(7201) // is_over_present_box__Q2_6Palone19PresentCommunicatorSFPC20RESPONSE_PRESENT_BOX v1 = a1[8]; if ( v1 >= 7201 )
|
|
||||||
bf.WriteInt32(7)
|
|
||||||
bf.WriteInt32(int32(index)) //placed index here because its value of item to stop go having a moan
|
|
||||||
data = append(data, bf)
|
data = append(data, bf)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user