From ae014e5b6fd0e026d5563523b951429a3fe09e61 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Tue, 31 Oct 2023 08:13:12 +1100 Subject: [PATCH] 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 --- source/game/StarInventoryTypes.hpp | 2 +- source/game/scripting/StarLuaGameConverters.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/game/StarInventoryTypes.hpp b/source/game/StarInventoryTypes.hpp index a666f3f..f184d48 100644 --- a/source/game/StarInventoryTypes.hpp +++ b/source/game/StarInventoryTypes.hpp @@ -19,7 +19,7 @@ enum class EquipmentSlot : uint8_t { }; extern EnumMap const EquipmentSlotNames; -typedef pair BagSlot; +typedef pair BagSlot; strong_typedef(Empty, SwapSlot); strong_typedef(Empty, TrashSlot); diff --git a/source/game/scripting/StarLuaGameConverters.cpp b/source/game/scripting/StarLuaGameConverters.cpp index 94ac14b..e5f8811 100644 --- a/source/game/scripting/StarLuaGameConverters.cpp +++ b/source/game/scripting/StarLuaGameConverters.cpp @@ -31,7 +31,7 @@ Maybe LuaConverter::to(LuaEngine&, LuaValue const& return {}; } else if (auto table = v.ptr()) - return {BagSlot(table->get(1).toString(), table->get(2))}; + return {BagSlot(table->get(1).toString(), (uint8_t)table->get(2))}; else return {}; }