This commit is contained in:
neckkola
2022-02-03 20:40:30 -04:00
parent 5566ea4d85
commit 50230bcd0c
4 changed files with 35 additions and 14 deletions
+1 -1
View File
@@ -387,7 +387,7 @@ public:
static void ProcessRaidInvite(Bot* invitee, Client* invitor); //Mitch
static void ProcessRaidInvite(Client* invitee, Client* invitor); //Mitch
uint8 GetNumberNeedingHealedInRaidGroup(uint8 hpr, bool includePets); //Mitch
inline void SetDirtyAutoHaters() { m_dirtyautohaters = true; }
inline void SetDirtyAutoHaters() { m_dirtyautohaters = true; } //Mitch
static std::list<BotSpell> GetBotSpellsForSpellEffect(Bot* botCaster, int spellEffect);
static std::list<BotSpell> GetBotSpellsForSpellEffectAndTargetType(Bot* botCaster, int spellEffect, SpellTargetType targetType);
+1
View File
@@ -231,6 +231,7 @@ void Bot::AI_Process_Raid()
if (NOT_HOLDING && NOT_PASSIVE) {
auto attack_target = bot_owner->GetTarget();
if (attack_target) {
InterruptSpell();
+2 -2
View File
@@ -812,7 +812,7 @@ void Client::QueuePacket(const EQApplicationPacket* app, bool ack_req, CLIENT_CO
// todo: save packets for later use
AddPacket(app, ack_req);
}
else if (eqs && !IsBot()) //Mitch added the BoTcheck for a fail safe on trying to send a packet to a BoT!
else if (eqs) // && !IsBot()) //Mitch added the BoTcheck for a fail safe on trying to send a packet to a BoT!
{
eqs->QueuePacket(app, ack_req);
}
@@ -826,7 +826,7 @@ void Client::FastQueuePacket(EQApplicationPacket** app, bool ack_req, CLIENT_CON
return;
}
else {
if(eqs && !IsBot()) //Mitch added
if(eqs) // && !IsBot()) //Mitch added
eqs->FastQueuePacket((EQApplicationPacket **)app, ack_req);
else if (app && (*app))
delete *app;
+31 -11
View File
@@ -1120,10 +1120,7 @@ void Raid::SendRaidAddAll(const char *who)
{
for (int x = 0; x < MAX_RAID_MEMBERS; x++)
{
if (strcmp(members[x].membername, who) == 0 ) //Mitch add IsBot
//if (!members[x].member->IsBot() ||
// strcmp(members[x].membername, who) == 0 ||
// (members[x].SentToBotOwner && members[x].member->GetOwnerID() != entity_list.GetClientByName(who)->CharacterID())) //Mitch add IsBot
if (strcmp(members[x].membername, who) == 0 )
{
auto outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidAddMember_Struct));
RaidAddMember_Struct* ram = (RaidAddMember_Struct*)outapp->pBuffer;
@@ -1249,10 +1246,13 @@ void Raid::SendBulkRaid(Client *to)
{
if(!to)
return;
if (IsRaidMemberBot(to))
return;
for(int x = 0; x < MAX_RAID_MEMBERS; x++)
{
if(strlen(members[x].membername) > 0 && (strcmp(members[x].membername, to->GetName()) != 0)) //don't send ourself
if(members[x].member && strlen(members[x].membername) > 0 && (strcmp(members[x].membername, to->GetName()) != 0)) //don't send ourself
{
SendRaidAdd(members[x].membername, to);
}
@@ -1263,7 +1263,7 @@ void Raid::QueuePacket(const EQApplicationPacket *app, bool ack_req)
{
for(int x = 0; x < MAX_RAID_MEMBERS; x++)
{
if(members[x].member && !members[x].member->IsBot())
if(members[x].member && !IsRaidMemberBot(members[x].member))
{
members[x].member->QueuePacket(app, ack_req);
}
@@ -1272,6 +1272,9 @@ void Raid::QueuePacket(const EQApplicationPacket *app, bool ack_req)
void Raid::SendMakeLeaderPacket(const char *who) //30
{
if (entity_list.GetBotByBotName(who) && IsRaidMemberBot(entity_list.GetBotByBotName(who)->CastToClient()))
return;
auto outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidLeadershipUpdate_Struct));
RaidLeadershipUpdate_Struct *rg = (RaidLeadershipUpdate_Struct*)outapp->pBuffer;
rg->action = raidMakeLeader;
@@ -1287,6 +1290,9 @@ void Raid::SendMakeLeaderPacketTo(const char *who, Client *to)
if(!to)
return;
if (IsRaidMemberBot(to))
return;
auto outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidLeadershipUpdate_Struct));
RaidLeadershipUpdate_Struct *rg = (RaidLeadershipUpdate_Struct*)outapp->pBuffer;
rg->action = raidMakeLeader;
@@ -1317,6 +1323,9 @@ void Raid::SendGroupUpdate(Client *to)
if(!to)
return;
if (IsRaidMemberBot(to))
return;
auto outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupUpdate2_Struct));
GroupUpdate2_Struct* gu = (GroupUpdate2_Struct*)outapp->pBuffer;
gu->action = groupActUpdate;
@@ -1434,7 +1443,7 @@ void Raid::SendRaidUnlockTo(Client *c)
void Raid::SendGroupDisband(Client *to)
{
if(!to)
if(!to || IsRaidMemberBot(to))
return;
auto outapp = new EQApplicationPacket(OP_GroupUpdate, sizeof(GroupUpdate_Struct));
@@ -1505,6 +1514,9 @@ void Raid::SendRaidMOTDToWorld()
void Raid::SendGroupLeadershipAA(Client *c, uint32 gid)
{
if (IsRaidMemberBot(c))
return;
auto outapp = new EQApplicationPacket(OP_RaidUpdate, sizeof(RaidLeadershipUpdate_Struct));
RaidLeadershipUpdate_Struct *rlaa = (RaidLeadershipUpdate_Struct *)outapp->pBuffer;
rlaa->action = raidSetLeaderAbilities;
@@ -1520,14 +1532,14 @@ void Raid::SendGroupLeadershipAA(Client *c, uint32 gid)
void Raid::SendGroupLeadershipAA(uint32 gid)
{
for (uint32 i = 0; i < MAX_RAID_MEMBERS; i++)
if (members[i].member && members[i].GroupNumber == gid)
if (members[i].member && members[i].GroupNumber == gid && !IsRaidMemberBot(members[i].member))
SendGroupLeadershipAA(members[i].member, gid);
}
void Raid::SendAllRaidLeadershipAA()
{
for (uint32 i = 0; i < MAX_RAID_MEMBERS; i++)
if (members[i].member)
if (members[i].member && !IsRaidMemberBot(members[i].member))
SendGroupLeadershipAA(members[i].member, members[i].GroupNumber);
}
@@ -1927,9 +1939,14 @@ void Raid::CheckGroupMentor(uint32 group_id, Client *c)
void Raid::SetDirtyAutoHaters()
{
for (int i = 0; i < MAX_RAID_MEMBERS; ++i)
if (members[i].member && members[i].member->CastToBot()->GetBotID() == 0)
if (members[i].member && IsRaidMemberBot(members[i].member))
{
members[i].member->CastToBot()->SetDirtyAutoHaters();
}
else if (members[i].member && members[i].member->CastToClient()->IsClient())
{
members[i].member->SetDirtyAutoHaters();
}
}
void Raid::QueueClients(Mob *sender, const EQApplicationPacket *app, bool ack_required /*= true*/, bool ignore_sender /*= true*/, float distance /*= 0*/, bool group_only /*= true*/) {
@@ -1948,6 +1965,9 @@ void Raid::QueueClients(Mob *sender, const EQApplicationPacket *app, bool ack_re
if (!members[i].member->IsClient())
continue;
if (IsRaidMemberBot(members[i].member))
continue;
if (ignore_sender && members[i].member == sender)
continue;