Merge branch 'main' into main

This commit is contained in:
wish
2022-05-04 08:03:41 +10:00
committed by GitHub
4 changed files with 147 additions and 132 deletions

View File

@@ -9,7 +9,8 @@ CREATE DOMAIN uint16 AS integer
CREATE TABLE users (
id serial NOT NULL PRIMARY KEY,
username text UNIQUE NOT NULL,
password text NOT NULL
password text NOT NULL,
item_box bytea
);
CREATE TABLE characters (

View File

@@ -3,9 +3,9 @@ package mhfpacket
import (
"errors"
"github.com/Solenataris/Erupe/network/clientctx"
"github.com/Solenataris/Erupe/network"
"github.com/Andoryuuta/byteframe"
"github.com/Solenataris/Erupe/network"
"github.com/Solenataris/Erupe/network/clientctx"
)
// MsgMhfEnumerateUnionItem represents the MSG_MHF_ENUMERATE_UNION_ITEM

View File

@@ -3,11 +3,18 @@ package mhfpacket
import (
"errors"
"github.com/Solenataris/Erupe/network/clientctx"
"github.com/Solenataris/Erupe/network"
"github.com/Andoryuuta/byteframe"
"github.com/Solenataris/Erupe/network"
"github.com/Solenataris/Erupe/network/clientctx"
)
type Item struct {
Unk0 uint32
ItemId uint16
Amount uint16
Unk1 uint32
}
// MsgMhfUpdateUnionItem represents the MSG_MHF_UPDATE_UNION_ITEM
type MsgMhfUpdateUnionItem struct {
AckHandle uint32

View File

@@ -2,12 +2,14 @@ package channelserver
import (
"bytes"
"encoding/binary"
"encoding/hex"
"encoding/binary"
"fmt"
"io/ioutil"
"math/bits"
"math/rand"
"fmt"
"time"
"github.com/Andoryuuta/byteframe"
@@ -405,6 +407,11 @@ func handleMsgMhfAcquireTitle(s *Session, p mhfpacket.MHFPacket) {}
func handleMsgMhfEnumerateTitle(s *Session, p mhfpacket.MHFPacket) {}
type Item struct {
ItemId uint16
Amount uint16
}
func handleMsgMhfEnumerateUnionItem(s *Session, p mhfpacket.MHFPacket) {
pkt := p.(*mhfpacket.MsgMhfEnumerateUnionItem)
var boxContents []byte