mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-20 22:08:22 +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
|
#ifdef BOTS
|
||||||
else if (Invitee->IsBot()) {
|
else if (Invitee->IsBot()) {
|
||||||
Client* inviter = entity_list.GetClientByName(gis->inviter_name);
|
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())
|
if (inviter->IsRaidGrouped())
|
||||||
Bot::ProcessRaidInvite(invitee, inviter);
|
Bot::ProcessRaidInvite(Invitee->CastToBot(), inviter);
|
||||||
else
|
else
|
||||||
Bot::ProcessBotGroupInvite(this, std::string(Invitee->GetName()));
|
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
|
// 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) {
|
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
|
// Remove the entire BOT group in this case
|
||||||
uint32 gid = raid->GetGroup(bot_iter->GetName());
|
uint32 gid = raid->GetGroup(bot_iter->GetName());
|
||||||
|
|
||||||
std::vector<RaidMember> r_group_members = raid->GetRaidGroupMembers(gid);
|
std::vector<RaidMember> r_group_members = raid->GetRaidGroupMembers(gid);
|
||||||
Group* group_inst = new Group(bot_iter);
|
Group* group_inst = new Group(bot_iter);
|
||||||
entity_list.AddGroup(group_inst);
|
entity_list.AddGroup(group_inst);
|
||||||
@@ -11791,11 +11792,16 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
|||||||
for (auto member_iter : r_group_members) {
|
for (auto member_iter : r_group_members) {
|
||||||
if (!member_iter.member->IsClient() && strcmp(member_iter.membername, bot_iter->GetName()) == 0)
|
if (!member_iter.member->IsClient() && strcmp(member_iter.membername, bot_iter->GetName()) == 0)
|
||||||
bot_iter->SetFollowID(owner_id);
|
bot_iter->SetFollowID(owner_id);
|
||||||
|
|
||||||
else
|
else
|
||||||
Bot::AddBotToGroup(member_iter.member->CastToBot(), group_inst);
|
Bot::AddBotToGroup(member_iter.member->CastToBot(), group_inst);
|
||||||
raid->RemoveMember(bot_iter->GetName());
|
raid->RemoveMember(bot_iter->GetName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (bot_iter && raid->IsRaidMember(bot_iter->GetName()))
|
||||||
|
{
|
||||||
|
raid->RemoveMember(bot_iter->GetName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (b_to_disband)
|
else if (b_to_disband)
|
||||||
@@ -11823,6 +11829,7 @@ void Client::Handle_OP_RaidCommand(const EQApplicationPacket* app)
|
|||||||
raid->RemoveMember(member_iter.member->CastToBot()->GetName());
|
raid->RemoveMember(member_iter.member->CastToBot()->GetName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (gid <12 && raid->GetGroupLeader(gid)->IsBot())
|
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);
|
//r->SendRaidGroupRemove(ri->leader_name, grp);
|
||||||
raid->GroupUpdate(group);// break
|
raid->GroupUpdate(group);// break
|
||||||
//}
|
if (!raid->RaidCount())
|
||||||
|
raid->DisbandRaid();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -261,10 +261,10 @@ void Raid::RemoveMember(const char *characterName)
|
|||||||
Bot* bot = entity_list.GetBotByBotName(characterName);
|
Bot* bot = entity_list.GetBotByBotName(characterName);
|
||||||
|
|
||||||
if (bot) {
|
if (bot) {
|
||||||
bot->SetFollowID(bot->GetOwner()->GetID());
|
bot->SetFollowID(bot->GetOwner()->CastToClient()->GetID());
|
||||||
bot->SetGrouped(0);
|
bot->SetGrouped(false);
|
||||||
bot->SetTarget(nullptr);
|
bot->SetTarget(nullptr);
|
||||||
bot->SetRaidGrouped(0);
|
bot->SetRaidGrouped(false);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user