From d48f43b579b7ffecd7646b39f6f75551e41c5264 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 08:24:35 -0500 Subject: [PATCH] feat(guilds): the Guild Master tells a player already in a guild so Instead of opening the create box, a player with a guild gets "You are already in a guild!" in system chat, the client's own MSG_GUILD_ALREADY_IN_GUILD text (which the client shows only once the box is submitted). Check: use the Guild Master (LOT 3001) with and without a guild. Co-Authored-By: Claude Opus 5.5 --- dScripts/ai/FV/FvGuildCreate.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/dScripts/ai/FV/FvGuildCreate.cpp b/dScripts/ai/FV/FvGuildCreate.cpp index 52a366ac1..4b569d269 100644 --- a/dScripts/ai/FV/FvGuildCreate.cpp +++ b/dScripts/ai/FV/FvGuildCreate.cpp @@ -1,9 +1,19 @@ #include "FvGuildCreate.h" +#include "CharacterComponent.h" +#include "ChatPackets.h" #include "Entity.h" #include "PlayerMessages.h" void FvGuildCreate::OnUse(Entity* self, Entity* user) { + // A player already in a guild is told so instead of getting the create box. The client itself says the same + // (MSG_GUILD_ALREADY_IN_GUILD, system chat) only once the box is submitted (LWOGuildComponent::SendTMPGuildCreate). + const auto* characterComponent = user->GetComponent(); + if (characterComponent && characterComponent->GetGuildID() != LWOOBJID_EMPTY) { + ChatPackets::SendSystemMessage(user->GetSystemAddress(), u"You are already in a guild!"); + return; + } + GameMessages::DisplayGuildCreateBox box; box.target = user->GetObjectID(); box.bShow = true;