This repository has been archived on 2026-10-31. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Ananta-ps/pkg/protocol/models/house_ownership_wire4229938.go
T

49 lines
2.3 KiB
Go
Raw Normal View History

package models
import (
"encoding/json"
"sync"
)
var _ = json.RawMessage{}
var _ = sync.Mutex{}
//
// 「已拥有哪几套房」→ 客户端认识的线格式 —— 2026-09-30。
// <para>两个消费点,必须字节一致:</para>
// <list type="number">
// <item>登录包 PlayerClientInfoMinor.housesInfo.HouseInfoList
// (RuntimePayloadFactory.SeedOwnedHouses4229938)—— 决定「重登后房子还在不在」。</item>
// <item>购买瞬间的 SyncAddHouse(64459483) 推送
// (GameRouter.House.cs 的 PushSyncAddHouseAsync)——
// payload 就是**单个** HouseBaseInfo 的 complex,不是列表。
// 客户端 Lua BuyHouseUtils.SyncAddHouse 拿到之后自己
// table.insert 进上面那个 HouseInfoList。</item>
// </list>
// <para>所以两边都走 ToWire,避免同一个结构手抄两遍抄岔。</para>
// <para>线格式(LuaGen/AutoGen/RPCDeserializeAuto.lua 的
// Auto.Reader[368] 逐字对照,2026-09-30 核对):</para>
// <code>
// HouseId u32
// ParkingSpaceVehicleIdDict Dict&lt;i32,u32&gt; ← Base.ReadDict = marker 0xFF + Int32 计数
// Version u32
// SocialInfo complex(1143)
// FurnitureIndex u32
// </code>
// <para>注意 SyncAddHouse 的客户端 reader 是
// Base.ReadComplex(reader, Auto.Reader[368]) —— 整包只有**一个** complex 包装,
// 所以推送时直接把 HouseActiveInfo 交给 NotifyAsync&lt;T&gt; 即可
// (UxSerializer 对非 Inline 的 [UxContract] 类型会自动写那一个 0xFF),
// **不要**再包一层 Inline 壳 —— 那会多出一个 0xFF 把整包错位。</para>
// <para>⛔⛔ SocialInfo 绝对不能给 null。
// 判据:客户端自己的 UX.Game.HouseBaseInfo 类上**没有** [NullableContext],
// 而同一个 namespace 下的 HouseSocialInfo 有 [NullableContext(2)]
// (dump.cs TypeDefIndex 33341 / 33342);Lua 侧 Auto.WriteHouseBaseInfo 里这个字段的
// nullable 标记也是 false(对照 HouseAddFurnitureResult.PlacedFurnitureInfo 是
// true,那个类确实带 [NullableContext(2)])⇒ 客户端按**非空**读。
// 给 null 会让 UxSerializer 只写一个 0x00,后面的 FurnitureIndex 整体错位。
// 正确默认是空对象(两个空串)。</para>
//
type HouseOwnershipWire4229938 struct {
}