feat(server): implement friendship gifts, counseling and food recovery

This commit is contained in:
2026-10-04 03:05:23 +08:00
parent 3658882bc6
commit 0ca19f9244
31 changed files with 3426 additions and 36 deletions
+3 -3
View File
@@ -8,8 +8,8 @@ import (
)
func TestHandleAuditedEmptyResponses(t *testing.T) {
if got := len(EmptyPacketCodes()); got != 32 {
t.Fatalf("audited empty-response registry has %d paths, want 32", got)
if got := len(EmptyPacketCodes()); got != 31 {
t.Fatalf("audited empty-response registry has %d paths, want 31", got)
}
for path, wantCode := range EmptyPacketCodes() {
t.Run(path, func(t *testing.T) {
@@ -28,7 +28,7 @@ func TestHandleRejectsUnknownAndInvalidRequests(t *testing.T) {
if _, _, ok, err := Handle("/CharAwakeInfo", wire.AppendVarint(nil, 1, 1)); ok || err != nil {
t.Fatalf("stateful CharAwakeInfo must not be handled by feature defaults: ok=%v err=%v", ok, err)
}
for _, path := range []string{"/PresetInfo", "/DeckCostumeSettingInfo"} {
for _, path := range []string{"/PresetInfo", "/DeckCostumeSettingInfo", "/FriendshipInfo"} {
if _, _, ok, err := Handle(path, wire.AppendVarint(nil, 1, 1)); ok || err != nil {
t.Fatalf("stateful %s must not be handled by feature defaults: ok=%v err=%v", path, ok, err)
}