Fix a couple AIS cases
This commit is contained in:
@@ -49,11 +49,15 @@ class SchemaFlagField(SchemaHexInt):
|
||||
"""Like a hex int, but must be serialized as bytes in LLSD due to being a U32"""
|
||||
@classmethod
|
||||
def from_llsd(cls, val: Any, flavor: str) -> int:
|
||||
return struct.unpack("!I", val)[0]
|
||||
if flavor == "legacy":
|
||||
return struct.unpack("!I", val)[0]
|
||||
return val
|
||||
|
||||
@classmethod
|
||||
def to_llsd(cls, val: int, flavor: str) -> Any:
|
||||
return struct.pack("!I", val)
|
||||
if flavor == "legacy":
|
||||
return struct.pack("!I", val)
|
||||
return val
|
||||
|
||||
|
||||
class SchemaEnumField(SchemaStr, Generic[_T]):
|
||||
|
||||
@@ -22,7 +22,7 @@ class ProxyAssetUploader(AssetUploader):
|
||||
]
|
||||
}
|
||||
async with self._region.caps_client.post('FetchInventory2', llsd=ais_req_data) as resp:
|
||||
ais_item = InventoryItem.from_llsd((await resp.read_llsd())["items"][0])
|
||||
ais_item = InventoryItem.from_llsd((await resp.read_llsd())["items"][0], flavor="ais")
|
||||
|
||||
# Got it, ship it off to the viewer
|
||||
message = Message(
|
||||
|
||||
Reference in New Issue
Block a user