Add registry implement

This commit is contained in:
Tnze
2024-07-27 22:48:40 +08:00
parent 300304eed3
commit d88ee401fd
7 changed files with 118 additions and 99 deletions

View File

@ -88,7 +88,7 @@ func (m *Manager) handlePlayerChat(packet pk.Packet) error {
if !ok {
return InvalidChatPacket{ErrUnknownPlayer}
}
ct := m.c.Registries.ChatType.FindByID(chatType.ID)
ct := m.c.Registries.ChatType.GetByID(chatType.ID)
if ct == nil {
return InvalidChatPacket{ErrUnknwonChatType}
}
@ -141,7 +141,7 @@ func (m *Manager) handleDisguisedChat(packet pk.Packet) error {
return err
}
ct := m.c.Registries.ChatType.FindByID(chatType.ID)
ct := m.c.Registries.ChatType.GetByID(chatType.ID)
if ct == nil {
return InvalidChatPacket{ErrUnknwonChatType}
}