From 6edcad421bbcd6f510d9e7652c29d8f0a318ba98 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Sat, 28 Mar 2026 15:29:19 -0700 Subject: [PATCH] fix: group invite popup never showing (hasPendingGroupInvite stale getter) hasPendingGroupInvite() and getPendingInviterName() were inline getters reading GameHandler's stale copies. SocialHandler owns the canonical pendingGroupInvite/pendingInviterName state. Players were auto-added to groups without seeing the accept/decline popup. Now delegates to socialHandler_. --- include/game/game_handler.hpp | 4 ++-- src/game/game_handler.cpp | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/include/game/game_handler.hpp b/include/game/game_handler.hpp index 720e3f7a..b4ab02d5 100644 --- a/include/game/game_handler.hpp +++ b/include/game/game_handler.hpp @@ -1253,8 +1253,8 @@ public: bool isInGroup() const { return !partyData.isEmpty(); } const GroupListData& getPartyData() const { return partyData; } const std::vector& getContacts() const { return contacts_; } - bool hasPendingGroupInvite() const { return pendingGroupInvite; } - const std::string& getPendingInviterName() const { return pendingInviterName; } + bool hasPendingGroupInvite() const; + const std::string& getPendingInviterName() const; // ---- Item text (books / readable items) ---- bool isItemTextOpen() const; diff --git a/src/game/game_handler.cpp b/src/game/game_handler.cpp index 7396de7d..6b2f6f8c 100644 --- a/src/game/game_handler.cpp +++ b/src/game/game_handler.cpp @@ -9766,6 +9766,14 @@ bool GameHandler::isInGuild() const { return ch && ch->hasGuild(); } +bool GameHandler::hasPendingGroupInvite() const { + return socialHandler_ ? socialHandler_->hasPendingGroupInvite() : pendingGroupInvite; +} +const std::string& GameHandler::getPendingInviterName() const { + if (socialHandler_) return socialHandler_->getPendingInviterName(); + return pendingInviterName; +} + const std::string& GameHandler::getGuildName() const { if (socialHandler_) return socialHandler_->getGuildName(); static const std::string empty;