fix: sync current handlers, repair relic data and restore visible launcher consoles

This commit is contained in:
CAtlas0784 committed 2026-10-16 22:19:52 +07:00
1 parent 163d4433e6
commit 74f3c4411b
46 files changed
+4599 -1402

No files matched your search

+8 -2
View File
@@ -37,6 +37,8 @@ type Session struct {
startTime time.Time
nextSceneSave int64
battleProbeMu sync.Mutex
battleProbe []byte
PropEntities map[uint32]PropEntry
// MonsterEntities tracks real overworld monster entities (entity_id -> event_id)
// spawned in the current scene. Used by SceneCastSkill to decide whether an
@@ -127,7 +129,7 @@ func (s *Session) Consume(data []byte) error {
s.kcpMu.Unlock()
for _, pkt := range packets {
if pkt.CmdType == 31 { // CmdPlayerLogoutCsReq
if pkt.CmdType == goproto.CmdIDByName["PlayerLogoutCsReq"] {
Log("[PACKET] Player logged out")
s.Close()
return nil
@@ -156,7 +158,11 @@ func (s *Session) Send(msg proto.Message) error {
PacketLog(fmt.Sprintf("[PACKET SEND] cmd_id: %d %s (len: %d)", cmdID, name, len(body)))
Log(fmt.Sprintf("sent packet with CmdID: %d (%s)", cmdID, name))
return s.SendRaw(&NetPacket{CmdType: cmdID, Body: body})
if err := s.SendRaw(&NetPacket{CmdType: cmdID, Body: body}); err != nil {
return err
}
s.captureBattleResponse(msg, cmdID, body)
return nil
}
// SendRaw writes an already-framed packet into the KCP stream.