[Bug Fix] Fix issue with Bot Raid invites not working. (#3249)

* [Bug Fix] Fix issue with Bot Raid invites not always working.

* ordering
This commit is contained in:
Aeadoin 2023-04-03 16:28:05 -04:00 committed by GitHub
parent ea9b373180
commit d653989b03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11760,17 +11760,14 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
{ {
case RaidCommandInviteIntoExisting: case RaidCommandInviteIntoExisting:
case RaidCommandInvite: { case RaidCommandInvite: {
Bot* player_to_invite = nullptr;
if (RuleB(Bots, Enabled) && entity_list.GetBotByBotName(raid_command_packet->player_name)) { if (RuleB(Bots, Enabled) && entity_list.GetBotByBotName(raid_command_packet->player_name)) {
auto player_to_invite = entity_list.GetBotByBotName(raid_command_packet->player_name);
if (!player_to_invite) { if (!player_to_invite) {
break; break;
} }
Bot* player_to_invite = entity_list.GetBotByBotName(raid_command_packet->player_name); auto player_to_invite_group = player_to_invite->GetGroup();
Group* player_to_invite_group = player_to_invite->GetGroup();
if (player_to_invite_group && player_to_invite_group->IsGroupMember(this)) { if (player_to_invite_group && player_to_invite_group->IsGroupMember(this)) {
MessageString(Chat::Red, ALREADY_IN_PARTY); MessageString(Chat::Red, ALREADY_IN_PARTY);
break; break;