mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-02-04 09:15:08 +01:00
minor MhfInfoGuild changes
This commit is contained in:
@@ -971,14 +971,21 @@ func handleMsgMhfInfoGuild(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
bf.WriteUint8(0)
|
bf.WriteUint8(0)
|
||||||
bf.WriteUint8(0)
|
bf.WriteUint8(0)
|
||||||
|
|
||||||
bf.WriteBool(!guild.Recruiting)
|
flags := uint8(0)
|
||||||
|
if !guild.Recruiting {
|
||||||
|
flags |= 0x01
|
||||||
|
}
|
||||||
|
//if guild.Suspended {
|
||||||
|
// flags |= 0x02
|
||||||
|
//}
|
||||||
|
bf.WriteUint8(flags)
|
||||||
|
|
||||||
if characterGuildData == nil || characterGuildData.IsApplicant {
|
if characterGuildData == nil || characterGuildData.IsApplicant {
|
||||||
bf.WriteUint16(0x00)
|
bf.WriteUint16(0)
|
||||||
} else if guild.LeaderCharID == s.charID {
|
} else if guild.LeaderCharID == s.charID {
|
||||||
bf.WriteUint16(0x01)
|
bf.WriteUint16(1)
|
||||||
} else {
|
} else {
|
||||||
bf.WriteUint16(0x02)
|
bf.WriteUint16(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
bf.WriteUint32(uint32(guild.CreatedAt.Unix()))
|
bf.WriteUint32(uint32(guild.CreatedAt.Unix()))
|
||||||
@@ -1103,15 +1110,18 @@ func handleMsgMhfInfoGuild(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
type UnkGuildInfo struct {
|
type Activity struct {
|
||||||
Unk0 uint8
|
Pass uint8
|
||||||
Unk1 uint8
|
Unk1 uint8
|
||||||
Unk2 uint8
|
Unk2 uint8
|
||||||
}
|
}
|
||||||
unkGuildInfo := []UnkGuildInfo{}
|
activity := []Activity{
|
||||||
bf.WriteUint8(uint8(len(unkGuildInfo)))
|
// 1,0,0 = ok
|
||||||
for _, info := range unkGuildInfo {
|
// 0,0,0 = ng
|
||||||
bf.WriteUint8(info.Unk0)
|
}
|
||||||
|
bf.WriteUint8(uint8(len(activity)))
|
||||||
|
for _, info := range activity {
|
||||||
|
bf.WriteUint8(info.Pass)
|
||||||
bf.WriteUint8(info.Unk1)
|
bf.WriteUint8(info.Unk1)
|
||||||
bf.WriteUint8(info.Unk2)
|
bf.WriteUint8(info.Unk2)
|
||||||
}
|
}
|
||||||
@@ -1159,7 +1169,7 @@ func handleMsgMhfInfoGuild(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
|
|
||||||
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
doAckBufSucceed(s, pkt.AckHandle, bf.Data())
|
||||||
} else {
|
} else {
|
||||||
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 5))
|
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 4))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user