mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-02-05 09:42:56 +01:00
further decoding and guild fix
This commit is contained in:
@@ -198,7 +198,28 @@ func handleMsgMhfInfoFesta(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
bf.WriteBool(false)
|
bf.WriteBool(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
d, _ := hex.DecodeString("0001D4C001F4000411B6648100010001152A81F589A497A793C196B18B528E6D926381F52A0011B6648100020001152A81F589A497A793C196B18B528E6D926381F52A000C952CE10003000109E54BE54E89B38F970029FDCE04000400001381818D84836C8352819993A294B091D1818100000811B6648100010001152A81F589A497A793C196B18B528E6D926381F52A0011B6648100020001152A81F589A497A793C196B18B528E6D926381F52A0011B6648100030001152A81F589A497A793C196B18B528E6D926381F52A0011B6648100040001152A81F589A497A793C196B18B528E6D926381F52A0011B6648100050001152A81F589A497A793C196B18B528E6D926381F52A0011B6648100060001152A81F589A497A793C196B18B528E6D926381F52A000C952CE10007000109E54BE54E89B38F9700000000000008000001000000000100001388000007D0000003E800000064012C00C8009600640032")
|
bf.WriteUint16(0x0001)
|
||||||
|
bf.WriteUint32(0xD4C001F4)
|
||||||
|
|
||||||
|
categoryWinners := uint16(0) // NYI
|
||||||
|
bf.WriteUint16(categoryWinners)
|
||||||
|
for i := uint16(0); i < categoryWinners; i++ {
|
||||||
|
bf.WriteUint32(0) // Guild ID
|
||||||
|
bf.WriteUint16(i + 1) // Category ID
|
||||||
|
bf.WriteUint16(0) // Festa Team
|
||||||
|
ps.Uint8(bf, "", true) // Guild Name
|
||||||
|
}
|
||||||
|
|
||||||
|
dailyWinners := uint16(0) // NYI
|
||||||
|
bf.WriteUint16(dailyWinners)
|
||||||
|
for i := uint16(0); i < dailyWinners; i++ {
|
||||||
|
bf.WriteUint32(0) // Guild ID
|
||||||
|
bf.WriteUint16(i + 1) // Category ID
|
||||||
|
bf.WriteUint16(0) // Festa Team
|
||||||
|
ps.Uint8(bf, "", true) // Guild Name
|
||||||
|
}
|
||||||
|
|
||||||
|
d, _ := hex.DecodeString("000000000000000100001388000007D0000003E800000064012C00C8009600640032")
|
||||||
bf.WriteBytes(d)
|
bf.WriteBytes(d)
|
||||||
ps.Uint16(bf, "", false)
|
ps.Uint16(bf, "", false)
|
||||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||||
|
|||||||
@@ -163,8 +163,8 @@ SELECT
|
|||||||
|
|
||||||
func (guild *Guild) Save(s *Session) error {
|
func (guild *Guild) Save(s *Session) error {
|
||||||
_, err := s.server.db.Exec(`
|
_, err := s.server.db.Exec(`
|
||||||
UPDATE guilds SET main_motto=$2, sub_motto=$3, comment=$4, pugi_name_1=$5, pugi_name_2=$6, pugi_name_3=$7, festival_colour=$8, icon=$9 WHERE id=$1
|
UPDATE guilds SET main_motto=$2, sub_motto=$3, comment=$4, pugi_name_1=$5, pugi_name_2=$6, pugi_name_3=$7, icon=$8 WHERE id=$1
|
||||||
`, guild.ID, guild.MainMotto, guild.SubMotto, guild.Comment, guild.PugiName1, guild.PugiName2, guild.PugiName3, guild.FestivalColour, guild.Icon)
|
`, guild.ID, guild.MainMotto, guild.SubMotto, guild.Comment, guild.PugiName1, guild.PugiName2, guild.PugiName3, guild.Icon)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.logger.Error("failed to update guild data", zap.Error(err), zap.Uint32("guildID", guild.ID))
|
s.logger.Error("failed to update guild data", zap.Error(err), zap.Uint32("guildID", guild.ID))
|
||||||
|
|||||||
Reference in New Issue
Block a user