From db988e4261f4fda1439643d23b0998b04ad30c7d Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 10 Feb 2022 23:55:59 -0500 Subject: [PATCH] group message (#1987) --- common/ruletypes.h | 1 + zone/client_packet.cpp | 7 +++++++ zone/string_ids.h | 1 + 3 files changed, 9 insertions(+) diff --git a/common/ruletypes.h b/common/ruletypes.h index 6dec50fa3..37be4a438 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -192,6 +192,7 @@ RULE_INT(Character, MagicianTrackingDistanceMultiplier, 0, "If you want magician RULE_INT(Character, EnchanterTrackingDistanceMultiplier, 0, "If you want enchanters to be able to track, increase this above 0. 0 disables tracking packets.") RULE_INT(Character, BeastlordTrackingDistanceMultiplier, 0, "If you want beastlords to be able to track, increase this above 0. 0 disables tracking packets.") RULE_INT(Character, BerserkerTrackingDistanceMultiplier, 0, "If you want berserkers to be able to track, increase this above 0. 0 disables tracking packets.") +RULE_BOOL(Character, OnInviteReceiveAlreadyinGroupMessage, true, "If you want clients to receive a message when trying to invite a player into a group that is currently in another group.") RULE_CATEGORY_END() RULE_CATEGORY(Mercs) diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 578de0fe6..fcc2c76e2 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -6960,6 +6960,13 @@ void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app) Invitee->CastToClient()->QueuePacket(app); } } + else { + if (RuleB(Character, OnInviteReceiveAlreadyinGroupMessage)) { + if (!Invitee->CastToClient()->MercOnlyOrNoGroup()) { + Message(Chat::LightGray, "%s is already in another group.", Invitee->GetCleanName()); + } + } + } } #ifdef BOTS else if (Invitee->IsBot()) { diff --git a/zone/string_ids.h b/zone/string_ids.h index 55cec653c..d5b6c52f3 100644 --- a/zone/string_ids.h +++ b/zone/string_ids.h @@ -469,6 +469,7 @@ #define LEADER_OF_X_GUILD 12258 #define NOT_IN_A_GUILD 12259 #define TARGET_PLAYER_FOR_GUILD_STATUS 12260 +#define TARGET_ALREADY_IN_GROUP 12265 //% 1 is already in another group. #define GROUP_INVITEE_NOT_FOUND 12268 //You must target a player or use /invite to invite someone to your group. #define GROUP_INVITEE_SELF 12270 //12270 You cannot invite yourself. #define ALREADY_IN_PARTY 12272 //That person is already in your party.