mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 16:04:38 +01:00
fix G1 compatibility
This commit is contained in:
@@ -32,7 +32,9 @@ func (m *MsgMhfStampcardStamp) Opcode() network.PacketID {
|
|||||||
func (m *MsgMhfStampcardStamp) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
func (m *MsgMhfStampcardStamp) Parse(bf *byteframe.ByteFrame, ctx *clientctx.ClientContext) error {
|
||||||
m.AckHandle = bf.ReadUint32()
|
m.AckHandle = bf.ReadUint32()
|
||||||
m.HR = bf.ReadUint16()
|
m.HR = bf.ReadUint16()
|
||||||
|
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
||||||
m.GR = bf.ReadUint16()
|
m.GR = bf.ReadUint16()
|
||||||
|
}
|
||||||
m.Stamps = bf.ReadUint16()
|
m.Stamps = bf.ReadUint16()
|
||||||
bf.ReadUint16() // Zeroed
|
bf.ReadUint16() // Zeroed
|
||||||
if _config.ErupeConfig.RealClientMode > _config.Z1 {
|
if _config.ErupeConfig.RealClientMode > _config.Z1 {
|
||||||
|
|||||||
@@ -1049,9 +1049,11 @@ func handleMsgMhfStampcardStamp(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
pkt := p.(*mhfpacket.MsgMhfStampcardStamp)
|
pkt := p.(*mhfpacket.MsgMhfStampcardStamp)
|
||||||
bf := byteframe.NewByteFrame()
|
bf := byteframe.NewByteFrame()
|
||||||
bf.WriteUint16(pkt.HR)
|
bf.WriteUint16(pkt.HR)
|
||||||
bf.WriteUint16(pkt.GR)
|
|
||||||
var stamps uint16
|
var stamps uint16
|
||||||
_ = s.server.db.QueryRow(`SELECT stampcard FROM characters WHERE id = $1`, s.charID).Scan(&stamps)
|
_ = s.server.db.QueryRow(`SELECT stampcard FROM characters WHERE id = $1`, s.charID).Scan(&stamps)
|
||||||
|
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
||||||
|
bf.WriteUint16(pkt.GR)
|
||||||
|
}
|
||||||
bf.WriteUint16(stamps)
|
bf.WriteUint16(stamps)
|
||||||
stamps += pkt.Stamps
|
stamps += pkt.Stamps
|
||||||
bf.WriteUint16(stamps)
|
bf.WriteUint16(stamps)
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ func getPointers() map[SavePointer]int {
|
|||||||
pointers[pHR] = 94550
|
pointers[pHR] = 94550
|
||||||
pointers[pGRP] = 94556
|
pointers[pGRP] = 94556
|
||||||
pointers[pHouseData] = 94561
|
pointers[pHouseData] = 94561
|
||||||
pointers[pBookshelfData] = 103928
|
pointers[pBookshelfData] = 89118 // TODO: fix bookshelf data pointer
|
||||||
pointers[pGalleryData] = 104064
|
pointers[pGalleryData] = 104064
|
||||||
pointers[pGardenData] = 106424
|
pointers[pGardenData] = 106424
|
||||||
pointers[pRP] = 106614
|
pointers[pRP] = 106614
|
||||||
@@ -93,7 +93,7 @@ func getPointers() map[SavePointer]int {
|
|||||||
pointers[pToreData] = 62228
|
pointers[pToreData] = 62228
|
||||||
pointers[pHR] = 62550
|
pointers[pHR] = 62550
|
||||||
pointers[pHouseData] = 62561
|
pointers[pHouseData] = 62561
|
||||||
pointers[pBookshelfData] = 57118 // This pointer only half works
|
pointers[pBookshelfData] = 57118 // TODO: fix bookshelf data pointer
|
||||||
pointers[pGalleryData] = 72064
|
pointers[pGalleryData] = 72064
|
||||||
pointers[pGardenData] = 74424
|
pointers[pGardenData] = 74424
|
||||||
pointers[pRP] = 74614
|
pointers[pRP] = 74614
|
||||||
@@ -104,7 +104,7 @@ func getPointers() map[SavePointer]int {
|
|||||||
pointers[pToreData] = 14228
|
pointers[pToreData] = 14228
|
||||||
pointers[pHR] = 14550
|
pointers[pHR] = 14550
|
||||||
pointers[pHouseData] = 14561
|
pointers[pHouseData] = 14561
|
||||||
pointers[pBookshelfData] = 9118 // Probably same here
|
pointers[pBookshelfData] = 9118 // TODO: fix bookshelf data pointer
|
||||||
pointers[pGalleryData] = 24064
|
pointers[pGalleryData] = 24064
|
||||||
pointers[pGardenData] = 26424
|
pointers[pGardenData] = 26424
|
||||||
pointers[pRP] = 26614
|
pointers[pRP] = 26614
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ func makeEventQuest(s *Session, rows *sql.Rows) ([]byte, error) {
|
|||||||
bf.WriteBool(true)
|
bf.WriteBool(true)
|
||||||
}
|
}
|
||||||
bf.WriteUint16(0) // Unk
|
bf.WriteUint16(0) // Unk
|
||||||
if _config.ErupeConfig.RealClientMode >= _config.G1 {
|
if _config.ErupeConfig.RealClientMode >= _config.G2 {
|
||||||
bf.WriteUint32(mark)
|
bf.WriteUint32(mark)
|
||||||
}
|
}
|
||||||
bf.WriteUint16(0) // Unk
|
bf.WriteUint16(0) // Unk
|
||||||
@@ -578,7 +578,7 @@ func handleMsgMhfEnumerateQuest(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
tuneValues = temp
|
tuneValues = temp
|
||||||
|
|
||||||
tuneLimit := 770
|
tuneLimit := 770
|
||||||
if _config.ErupeConfig.RealClientMode <= _config.F5 {
|
if _config.ErupeConfig.RealClientMode <= _config.G1 {
|
||||||
tuneLimit = 256
|
tuneLimit = 256
|
||||||
} else if _config.ErupeConfig.RealClientMode <= _config.G3 {
|
} else if _config.ErupeConfig.RealClientMode <= _config.G3 {
|
||||||
tuneLimit = 283
|
tuneLimit = 283
|
||||||
|
|||||||
Reference in New Issue
Block a user