From 00b62edfa0e8ceab38edae20d9c9541d8e61012a Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Tue, 29 Sep 2026 08:32:02 -0500 Subject: [PATCH] fix(guilds): the Guild Master speaks in local chat so its bubble shows DisplayChatBubble from the server doesn't show: in live it was only raised by client scripts. For a local chat line the client puts a chat bubble over the sender, plays its talk animation and adds the line under the sender's name (the chat handler raises DisplayChatBubble on the sender object), so the Guild Master now sends that player a local chat line as itself, as property model chat does. Check: use the Guild Master while in a guild: bubble over it, it talks, the line shows under its name. Co-Authored-By: Claude Opus 5.5 --- dScripts/ai/FV/FvGuildCreate.cpp | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/dScripts/ai/FV/FvGuildCreate.cpp b/dScripts/ai/FV/FvGuildCreate.cpp index 52a7c0616..fe80d2ab7 100644 --- a/dScripts/ai/FV/FvGuildCreate.cpp +++ b/dScripts/ai/FV/FvGuildCreate.cpp @@ -2,22 +2,23 @@ #include "CharacterComponent.h" #include "ChatPackets.h" -#include "EffectsMessages.h" +#include "eChatChannel.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 Guild Master says it in a chat - // bubble over its head and in system chat. The client itself says the same (MSG_GUILD_ALREADY_IN_GUILD, system chat) - // only once the box is submitted (LWOGuildComponent::SendTMPGuildCreate). + // A player already in a guild is told so instead of getting the create box, by the Guild Master saying it in local + // chat to that player: for a local chat line the client puts a chat bubble over the sender, plays its "talk" + // animation and adds the line under the sender's name (PacketHandler_MSG_CHAT_GENERAL_CHAT_MESSAGE). The text is + // the client's own MSG_GUILD_ALREADY_IN_GUILD, which the client itself shows only once the box is submitted. const auto* characterComponent = user->GetComponent(); if (characterComponent && characterComponent->GetGuildID() != LWOOBJID_EMPTY) { - constexpr auto text = u"You are already in a guild!"; - GameMessages::DisplayChatBubble bubble; - bubble.target = self->GetObjectID(); - bubble.wsText = text; - bubble.Send(user->GetSystemAddress()); - ChatPackets::SendSystemMessage(user->GetSystemAddress(), text); + ChatPackets::Client::GeneralChatMessage chat; + chat.chatChannel = static_cast(eChatChannel::LOCAL); + chat.senderName = LUWString("%[Objects_" + std::to_string(self->GetLOT()) + "_name]"); + chat.senderID = self->GetObjectID(); + chat.message = u"You are already in a guild!"; + chat.Send(user->GetSystemAddress()); return; }