mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
chore: remove all raw packet reading from chat packet handler (#1415)
* chore: default size to 33 on LU(W)Strings since that's the most common lenght Was doing this on other places, but not the main one * chore: remove all raw packet reading from chat packet handler and general chat packet cleanup * fix team invite/promote/kick * Address feedback * fix friends check * update comments * Address feedback Add GM level handeling * Address feedback
This commit is contained in:
@@ -7,6 +7,8 @@
|
||||
#include "dServer.h"
|
||||
#include <unordered_map>
|
||||
|
||||
enum class eGameMasterLevel : uint8_t;
|
||||
|
||||
struct IgnoreData {
|
||||
IgnoreData(const std::string& name, const LWOOBJID& id) : playerName(name), playerId(id) {}
|
||||
inline bool operator==(const std::string& other) const noexcept {
|
||||
@@ -22,6 +24,7 @@ struct IgnoreData {
|
||||
};
|
||||
|
||||
struct PlayerData {
|
||||
PlayerData();
|
||||
operator bool() const noexcept {
|
||||
return playerID != LWOOBJID_EMPTY;
|
||||
}
|
||||
@@ -42,6 +45,8 @@ struct PlayerData {
|
||||
std::string playerName;
|
||||
std::vector<FriendData> friends;
|
||||
std::vector<IgnoreData> ignoredPlayers;
|
||||
eGameMasterLevel gmLevel;
|
||||
bool isFTP = false;
|
||||
};
|
||||
|
||||
struct TeamData {
|
||||
|
Reference in New Issue
Block a user