Add support for party chat in town

This commit is contained in:
Sophie
2020-03-10 07:56:01 +00:00
parent 78fe5c85ef
commit 892f89eba9
3 changed files with 103 additions and 16 deletions

View File

@@ -167,3 +167,15 @@ func (s *Server) BroadcastMHF(pkt mhfpacket.MHFPacket, ignoredSession *Session)
session.QueueSendNonBlocking(bf.Data())
}
}
func (s *Server) FindSessionByCharID(charID uint32) *Session {
for _, stage := range s.stages {
for client := range stage.clients {
if client.charID == charID {
return client
}
}
}
return nil
}