mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
fix unneeded enumerations
This commit is contained in:
@@ -245,7 +245,11 @@ func handleMsgMhfInfoFesta(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
func handleMsgMhfStateFestaU(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfStateFestaU(s *Session, p mhfpacket.MHFPacket) {
|
||||||
pkt := p.(*mhfpacket.MsgMhfStateFestaU)
|
pkt := p.(*mhfpacket.MsgMhfStateFestaU)
|
||||||
guild, err := GetGuildInfoByCharacterId(s, s.charID)
|
guild, err := GetGuildInfoByCharacterId(s, s.charID)
|
||||||
if err != nil || guild == nil {
|
applicant := false
|
||||||
|
if guild != nil {
|
||||||
|
applicant, _ = guild.HasApplicationForCharID(s, s.charID)
|
||||||
|
}
|
||||||
|
if err != nil || guild == nil || applicant {
|
||||||
doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4))
|
doAckSimpleFail(s, pkt.AckHandle, make([]byte, 4))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -261,7 +265,10 @@ func handleMsgMhfStateFestaU(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
func handleMsgMhfStateFestaG(s *Session, p mhfpacket.MHFPacket) {
|
func handleMsgMhfStateFestaG(s *Session, p mhfpacket.MHFPacket) {
|
||||||
pkt := p.(*mhfpacket.MsgMhfStateFestaG)
|
pkt := p.(*mhfpacket.MsgMhfStateFestaG)
|
||||||
guild, err := GetGuildInfoByCharacterId(s, s.charID)
|
guild, err := GetGuildInfoByCharacterId(s, s.charID)
|
||||||
applicant, _ := guild.HasApplicationForCharID(s, s.charID)
|
applicant := false
|
||||||
|
if guild != nil {
|
||||||
|
applicant, _ = guild.HasApplicationForCharID(s, s.charID)
|
||||||
|
}
|
||||||
resp := byteframe.NewByteFrame()
|
resp := byteframe.NewByteFrame()
|
||||||
if err != nil || guild == nil || applicant {
|
if err != nil || guild == nil || applicant {
|
||||||
resp.WriteUint32(0)
|
resp.WriteUint32(0)
|
||||||
@@ -274,7 +281,7 @@ func handleMsgMhfStateFestaG(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
}
|
}
|
||||||
resp.WriteUint32(guild.Souls)
|
resp.WriteUint32(guild.Souls)
|
||||||
resp.WriteUint32(0) // unk
|
resp.WriteUint32(0) // unk
|
||||||
resp.WriteUint32(1) // unk, rank?
|
resp.WriteUint32(0) // unk, rank?
|
||||||
resp.WriteUint32(0) // unk
|
resp.WriteUint32(0) // unk
|
||||||
resp.WriteUint32(0) // unk
|
resp.WriteUint32(0) // unk
|
||||||
doAckBufSucceed(s, pkt.AckHandle, resp.Data())
|
doAckBufSucceed(s, pkt.AckHandle, resp.Data())
|
||||||
|
|||||||
@@ -1276,6 +1276,14 @@ func handleMsgMhfEnumerateGuildMember(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
guild, err = GetGuildInfoByCharacterId(s, s.charID)
|
guild, err = GetGuildInfoByCharacterId(s, s.charID)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if guild != nil {
|
||||||
|
isApplicant, _ := guild.HasApplicationForCharID(s, s.charID)
|
||||||
|
if isApplicant {
|
||||||
|
doAckBufSucceed(s, pkt.AckHandle, make([]byte, 4))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if guild == nil && s.prevGuildID > 0 {
|
if guild == nil && s.prevGuildID > 0 {
|
||||||
guild, err = GetGuildInfoByID(s, s.prevGuildID)
|
guild, err = GetGuildInfoByID(s, s.prevGuildID)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user