This commit is contained in:
Aaron Kimbre 2023-11-26 21:28:21 -06:00
parent 4722c1fdea
commit ce3021310c
2 changed files with 2 additions and 4 deletions

View File

@ -271,12 +271,10 @@ void CharacterComponent::LoadFromXml(tinyxml2::XMLDocument* doc) {
if (gid != 0) { if (gid != 0) {
auto guild = Database::Get()->GetGuild(gid); auto guild = Database::Get()->GetGuild(gid);
if (guild && Database::Get()->CheckIsInGuild(guild->id, m_Parent->GetCharacter()->GetID())) { if (guild && Database::Get()->CheckIsInGuild(guild->id, m_Parent->GetCharacter()->GetID())) {
LOG("Found Guild %i name %s", guild->id, guild->name.c_str());
m_GuildName = GeneralUtils::UTF8ToUTF16(guild->name); m_GuildName = GeneralUtils::UTF8ToUTF16(guild->name);
m_GuildID = gid; m_GuildID = gid;
m_DirtySocialInfo = true; m_DirtySocialInfo = true;
} else { } else {
LOG("Unalbe to find Guild %i name %s", guild->id, guild->name.c_str());
SetGuild(0, u""); SetGuild(0, u"");
} }
} }

View File

@ -444,8 +444,8 @@ void ClientPackets::HandleGuildCreation(Packet* packet) {
characterComp->SetGuild(newGuild->id, guildName.string); characterComp->SetGuild(newGuild->id, guildName.string);
SendGuildCreateResponse(packet->systemAddress, eGuildCreationResponse::CREATED, newGuild->id, guildName.string); SendGuildCreateResponse(packet->systemAddress, eGuildCreationResponse::CREATED, newGuild->id, guildName.string);
AMFArrayValue data; AMFArrayValue data;
data.Insert("bOn", true); data.Insert("bDisplay", true);
GameMessages::SendUIMessageServerToSingleClient(entity, packet->systemAddress, "ToggleGuildUI", data); GameMessages::SendUIMessageServerToSingleClient(entity, packet->systemAddress, "EnableGuild", data);
} }