mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-14 07:55:33 +01:00
cast binary fixes
This commit is contained in:
@@ -118,7 +118,7 @@ func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
// Send to the proper recipients.
|
// Send to the proper recipients.
|
||||||
switch pkt.BroadcastType {
|
switch pkt.BroadcastType {
|
||||||
case BroadcastTypeWorld:
|
case BroadcastTypeWorld:
|
||||||
s.server.WorldcastMHF(resp, s)
|
s.server.WorldcastMHF(resp, s, nil)
|
||||||
case BroadcastTypeStage:
|
case BroadcastTypeStage:
|
||||||
if isDiceCommand {
|
if isDiceCommand {
|
||||||
s.stage.BroadcastMHF(resp, nil) // send dice result back to caller
|
s.stage.BroadcastMHF(resp, nil) // send dice result back to caller
|
||||||
@@ -129,8 +129,7 @@ func handleMsgSysCastBinary(s *Session, p mhfpacket.MHFPacket) {
|
|||||||
if pkt.MessageType == 1 {
|
if pkt.MessageType == 1 {
|
||||||
raviSema := getRaviSemaphore(s)
|
raviSema := getRaviSemaphore(s)
|
||||||
if raviSema != "" {
|
if raviSema != "" {
|
||||||
sema := s.server.semaphore[raviSema]
|
s.server.BroadcastMHF(resp, s)
|
||||||
(*sema).BroadcastMHF(resp, s)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
s.server.BroadcastMHF(resp, s)
|
s.server.BroadcastMHF(resp, s)
|
||||||
|
|||||||
@@ -295,8 +295,11 @@ func (s *Server) BroadcastMHF(pkt mhfpacket.MHFPacket, ignoredSession *Session)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) WorldcastMHF(pkt mhfpacket.MHFPacket, ignoredSession *Session) {
|
func (s *Server) WorldcastMHF(pkt mhfpacket.MHFPacket, ignoredSession *Session, ignoredChannel *Server) {
|
||||||
for _, c := range s.Channels {
|
for _, c := range s.Channels {
|
||||||
|
if c == ignoredChannel {
|
||||||
|
continue
|
||||||
|
}
|
||||||
for _, session := range c.sessions {
|
for _, session := range c.sessions {
|
||||||
if session == ignoredSession {
|
if session == ignoredSession {
|
||||||
continue
|
continue
|
||||||
@@ -357,7 +360,7 @@ func (s *Server) BroadcastRaviente(ip uint32, port uint16, stage []byte, _type u
|
|||||||
BroadcastType: BroadcastTypeServer,
|
BroadcastType: BroadcastTypeServer,
|
||||||
MessageType: BinaryMessageTypeChat,
|
MessageType: BinaryMessageTypeChat,
|
||||||
RawDataPayload: bf.Data(),
|
RawDataPayload: bf.Data(),
|
||||||
}, nil)
|
}, nil, s)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Server) DiscordChannelSend(charName string, content string) {
|
func (s *Server) DiscordChannelSend(charName string, content string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user