[Crash] Fix crash where Raid invite could be accepted after forming group with the Raid invitor. (#3837)

* [Crash] Fix a crash where a raid invite could be accepted affter joining a group with the invitor.

* [Crash] Fix a crash where a raid invite could be accepted after joining a group with the invitor.
This commit is contained in:
Aeadoin 2024-01-06 16:59:35 -05:00 committed by GitHub
parent 076aab50e8
commit a8eb2832ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -12053,6 +12053,13 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
{ {
auto player_sending_invite_group = player_sending_invite->GetGroup(); auto player_sending_invite_group = player_sending_invite->GetGroup();
Group* group = GetGroup(); Group* group = GetGroup();
/* Prevent scenario where player had joined group with Raid invitor before accepting Raid invite */
if (group && group == player_sending_invite_group) {
player_sending_invite->MessageString(Chat::Red, INVITE_GROUP_LEADER);
return;
}
if (group) //if our target has a group if (group) //if our target has a group
{ {
raid = new Raid(player_sending_invite); raid = new Raid(player_sending_invite);

View File

@ -177,6 +177,7 @@
#define CANNOT_WAKE 555 //%1 tells you, 'I am unable to wake %2, master.' #define CANNOT_WAKE 555 //%1 tells you, 'I am unable to wake %2, master.'
#define SUMMONING_CORPSE_ZONE 596 //Summoning %1's corpse(s). #define SUMMONING_CORPSE_ZONE 596 //Summoning %1's corpse(s).
#define TASK_NOT_RIGHT_LEVEL 615 //You are not at the right level for this task. #define TASK_NOT_RIGHT_LEVEL 615 //You are not at the right level for this task.
#define INVITE_GROUP_LEADER 679 //To invite another group into yours, please invite the leader of the other group.
#define PET_HOLD_SET_ON 698 //The pet hold mode has been set to on. #define PET_HOLD_SET_ON 698 //The pet hold mode has been set to on.
#define PET_HOLD_SET_OFF 699 //The pet hold mode has been set to off. #define PET_HOLD_SET_OFF 699 //The pet hold mode has been set to off.
#define PET_FOCUS_SET_ON 700 //The pet focus mode has been set to on. #define PET_FOCUS_SET_ON 700 //The pet focus mode has been set to on.