mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-09 22:20:24 +00:00
Looks like BOTs are working
This commit is contained in:
+12
-4
@@ -6989,9 +6989,9 @@ void Client::Handle_OP_GroupInvite2(const EQApplicationPacket *app)
|
||||
#ifdef BOTS
|
||||
else if (Invitee->IsBot()) {
|
||||
Client* inviter = entity_list.GetClientByName(gis->inviter_name);
|
||||
Bot* invitee = entity_list.GetBotByBotName(gis->invitee_name);
|
||||
//Bot* invitee = entity_list.GetBotByBotName(gis->invitee_name);
|
||||
if (inviter->IsRaidGrouped())
|
||||
Bot::ProcessRaidInvite(invitee, inviter);
|
||||
Bot::ProcessRaidInvite(Invitee->CastToBot(), inviter);
|
||||
else
|
||||
Bot::ProcessBotGroupInvite(this, std::string(Invitee->GetName()));
|
||||
}
|
||||
@@ -11779,10 +11779,11 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
||||
}
|
||||
// If any of the bots are a group leader then re-create the botgroup on disband, dropping any clients
|
||||
for (auto bot_iter : raid_members_bots) {
|
||||
if (bot_iter && raid->IsGroupLeader(bot_iter->GetName()))
|
||||
if (bot_iter && raid->IsRaidMember(bot_iter->GetName()) && raid->IsGroupLeader(bot_iter->GetName()))
|
||||
{
|
||||
// Remove the entire BOT group in this case
|
||||
uint32 gid = raid->GetGroup(bot_iter->GetName());
|
||||
|
||||
std::vector<RaidMember> r_group_members = raid->GetRaidGroupMembers(gid);
|
||||
Group* group_inst = new Group(bot_iter);
|
||||
entity_list.AddGroup(group_inst);
|
||||
@@ -11791,11 +11792,16 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
||||
for (auto member_iter : r_group_members) {
|
||||
if (!member_iter.member->IsClient() && strcmp(member_iter.membername, bot_iter->GetName()) == 0)
|
||||
bot_iter->SetFollowID(owner_id);
|
||||
|
||||
else
|
||||
Bot::AddBotToGroup(member_iter.member->CastToBot(), group_inst);
|
||||
raid->RemoveMember(bot_iter->GetName());
|
||||
}
|
||||
}
|
||||
else if (bot_iter && raid->IsRaidMember(bot_iter->GetName()))
|
||||
{
|
||||
raid->RemoveMember(bot_iter->GetName());
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (b_to_disband)
|
||||
@@ -11823,6 +11829,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
||||
raid->RemoveMember(member_iter.member->CastToBot()->GetName());
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (gid <12 && raid->GetGroupLeader(gid)->IsBot())
|
||||
{
|
||||
@@ -11878,7 +11885,8 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
||||
}
|
||||
//r->SendRaidGroupRemove(ri->leader_name, grp);
|
||||
raid->GroupUpdate(group);// break
|
||||
//}
|
||||
if (!raid->RaidCount())
|
||||
raid->DisbandRaid();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
+3
-3
@@ -261,10 +261,10 @@ void Raid::RemoveMember(const char *characterName)
|
||||
Bot* bot = entity_list.GetBotByBotName(characterName);
|
||||
|
||||
if (bot) {
|
||||
bot->SetFollowID(bot->GetOwner()->GetID());
|
||||
bot->SetGrouped(0);
|
||||
bot->SetFollowID(bot->GetOwner()->CastToClient()->GetID());
|
||||
bot->SetGrouped(false);
|
||||
bot->SetTarget(nullptr);
|
||||
bot->SetRaidGrouped(0);
|
||||
bot->SetRaidGrouped(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user