summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorhovertank3d <[email protected]>2026-02-26 16:31:25 +0100
committerhovertank3d <[email protected]>2026-02-26 16:31:25 +0100
commit503d6ae839c89d7fc481492dd7d2cbe1d39086eb (patch)
treef2f5de10cd53dce10a4b1e7e06748f0406a2896f /include
parent5e46ccbf67be0202030bbb203461bd4b6cad15f9 (diff)
downloadogurec-503d6ae839c89d7fc481492dd7d2cbe1d39086eb.tar.gz
ogurec-503d6ae839c89d7fc481492dd7d2cbe1d39086eb.zip
implement `player_inventory_slot`
Diffstat (limited to 'include')
-rw-r--r--include/net/types.hpp39
1 files changed, 37 insertions, 2 deletions
diff --git a/include/net/types.hpp b/include/net/types.hpp
index c16ca36..b565f51 100644
--- a/include/net/types.hpp
+++ b/include/net/types.hpp
@@ -7,6 +7,7 @@
#include <vector>
#include "util/io.hpp"
+#include "util/bitset.hpp"
namespace net {
namespace packet {
@@ -96,8 +97,42 @@ struct accept {
struct player_info {
static constexpr uint8_t packet_id = 4;
- uint8_t slot;
- uint8_t server_flags = 0;
+ uint8_t slot;
+ uint8_t skin_variant;
+ uint8_t voice_variant;
+ float voice_offset;
+ uint8_t hair;
+ std::string name;
+ uint8_t hair_dye;
+ bitset<16> hidden_accessories; // FIXME: this is rounded number of flags. Terraria may use less than 16
+ bitset<8> hide_misc; // same here
+ rgb hair_color;
+ rgb skin_color;
+ rgb eye_color;
+ rgb shirt_color;
+ rgb undershirt_color;
+ rgb pants_color;
+ rgb shoe_color;
+ bitset<4> player_difficulty;
+ bitset<5> permanent_buffs;
+ bitset<7> permanent_buffs_shimmer;
+};
+
+struct player_inventory_slot {
+ static constexpr uint8_t packet_id = 5;
+
+ enum class slot_flags : int {
+ Favourite = 0,
+ BlockTransfer = 1,
+ };
+
+ uint8_t slot;
+ uint16_t item_slot_id;
+
+ uint16_t stack;
+ uint8_t prefix;
+ uint16_t type;
+ bitset<2> flags;
};
inline nstring operator""_ns(const char* str, std::size_t)