mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
[FIX] Fix for world crash with over 1500 guilds (#4299)
* Fix for world crash with over 1500 guilds There was an existing issue with certain clients (RoF2) if there were more than 1500 guilds. This also enhances the loading of guilds in both world and zone for performance if there are large number of guilds as RoF2 will support 1500+ guilds. * Safely access permissions map --------- Co-authored-by: Akkadius <akkadius1@gmail.com>
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
#include "textures.h"
|
||||
#include "../cereal/include/cereal/archives/binary.hpp"
|
||||
#include "../cereal/include/cereal/types/string.hpp"
|
||||
#include "../cereal/include/cereal/types/vector.hpp"
|
||||
|
||||
|
||||
static const uint32 BUFF_COUNT = 42;
|
||||
@@ -1692,6 +1693,38 @@ struct GuildsList_Struct {
|
||||
GuildsListEntry_Struct Guilds[MAX_NUMBER_GUILDS];
|
||||
};
|
||||
|
||||
struct GuildsListMessagingEntry_Struct {
|
||||
/*000*/ uint32 guild_id;
|
||||
/*004*/ std::string guild_name;
|
||||
|
||||
template<class Archive>
|
||||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(guild_id),
|
||||
CEREAL_NVP(guild_name)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
struct GuildsListMessaging_Struct {
|
||||
/*000*/ char header[64];
|
||||
/*064*/ uint32 no_of_guilds;
|
||||
/*068*/ uint32 string_length;
|
||||
/*072*/ std::vector<GuildsListMessagingEntry_Struct> guild_detail;
|
||||
|
||||
template<class Archive>
|
||||
void serialize(Archive& archive)
|
||||
{
|
||||
archive(
|
||||
CEREAL_NVP(header),
|
||||
CEREAL_NVP(no_of_guilds),
|
||||
CEREAL_NVP(string_length),
|
||||
CEREAL_NVP(guild_detail)
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
struct GuildUpdate_Struct {
|
||||
uint32 guildID;
|
||||
GuildsListEntry_Struct entry;
|
||||
|
||||
Reference in New Issue
Block a user