Skip to content

Commit

Permalink
fix: add new field for PalMapObjectDeathPenaltyStorageModel
Browse files Browse the repository at this point in the history
  • Loading branch information
cheahjs committed Apr 5, 2024
1 parent af99069 commit 5895fe4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions palworld_save_tools/rawdata/map_concrete_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,8 @@ def pickup_base():
data["drop_item_infos"] = reader.tarray(pal_item_and_num_read)
elif map_object_concrete_model == "PalMapObjectDeathPenaltyStorageModel":
data["owner_player_uid"] = reader.guid()
if not reader.eof():
data["created_at"] = reader.u64()
elif map_object_concrete_model == "PalMapObjectDefenseBulletLauncherModel":
data["remaining_bullets"] = reader.i32()
data["magazine_size"] = reader.i32()
Expand Down Expand Up @@ -490,6 +492,8 @@ def encode_bytes(p: Optional[dict[str, Any]]) -> bytes:
writer.tarray(pal_item_and_slot_writer, p["drop_item_infos"])
elif map_object_concrete_model == "PalMapObjectDeathPenaltyStorageModel":
writer.guid(p["owner_player_uid"])
if "created_at" in p:
writer.u64(p["created_at"])
elif map_object_concrete_model == "PalMapObjectDefenseBulletLauncherModel":
writer.i32(p["remaining_bullets"])
writer.i32(p["magazine_size"])
Expand Down

0 comments on commit 5895fe4

Please sign in to comment.