Revert bag slot index type to uint8_t for now

was causing incompatibility on vanilla servers - need to add net element filters for legacy/modified servers first
This commit is contained in:
Kae 2023-10-31 08:13:12 +11:00
parent 7d948f8839
commit ae014e5b6f
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ enum class EquipmentSlot : uint8_t {
};
extern EnumMap<EquipmentSlot> const EquipmentSlotNames;
typedef pair<String, unsigned> BagSlot;
typedef pair<String, uint8_t> BagSlot;
strong_typedef(Empty, SwapSlot);
strong_typedef(Empty, TrashSlot);

View File

@ -31,7 +31,7 @@ Maybe<InventorySlot> LuaConverter<InventorySlot>::to(LuaEngine&, LuaValue const&
return {};
}
else if (auto table = v.ptr<LuaTable>())
return {BagSlot(table->get<LuaString>(1).toString(), table->get<unsigned>(2))};
return {BagSlot(table->get<LuaString>(1).toString(), (uint8_t)table->get<unsigned>(2))};
else
return {};
}