mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Work on usecase 5
This commit is contained in:
+23
-1
@@ -11326,7 +11326,9 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
#ifdef BOTS
|
||||
Bot* player_to_invite = nullptr;
|
||||
Client* player_to_invite_owner = nullptr;
|
||||
if (entity_list.GetBotByBotName(raid_command_packet->player_name)) {
|
||||
|
||||
|
||||
if (entity_list.GetBotByBotName(raid_command_packet->player_name) ) {
|
||||
Bot* player_to_invite = entity_list.GetBotByBotName(raid_command_packet->player_name);
|
||||
Client* player_to_invite_owner = player_to_invite->GetOwner()->CastToClient();
|
||||
|
||||
@@ -11352,6 +11354,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
Bot::ProcessRaidInvite(player_to_invite, player_to_invite_owner);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -11378,6 +11381,25 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket *app)
|
||||
break;
|
||||
}
|
||||
|
||||
// bool player_accepting_invite_has_bots_in_group = false;
|
||||
Bot* b = nullptr;
|
||||
Group* g = player_to_invite->GetGroup();
|
||||
if (player_to_invite->HasGroup() && g->IsLeader(player_to_invite))
|
||||
{
|
||||
for (int x = 0; x < 6; x++)
|
||||
{
|
||||
if (g->members[x]->IsBot())
|
||||
{
|
||||
b = entity_list.GetBotByBotName(g->members[x]->GetName());
|
||||
// player_accepting_invite_has_bots_in_group = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
Bot::ProcessRaidInvite(b, player_to_invite);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
/* Send out invite to the client */
|
||||
auto outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidGeneral_Struct));
|
||||
RaidGeneral_Struct* raid_command = (RaidGeneral_Struct*)outapp->pBuffer;
|
||||
|
||||
Reference in New Issue
Block a user