From 26c12d46efb881887931eb8f6bf46550f09ec79e Mon Sep 17 00:00:00 2001 From: neckkola <65987027+neckkola@users.noreply.github.com> Date: Mon, 17 Jan 2022 10:00:25 -0400 Subject: [PATCH] end of day Jan 16 --- zone/bot_raid.cpp | 2 +- zone/botspellsai.cpp | 4 ++-- zone/client_packet.cpp | 16 ++++++++++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/zone/bot_raid.cpp b/zone/bot_raid.cpp index 936ba9ee9..604640924 100644 --- a/zone/bot_raid.cpp +++ b/zone/bot_raid.cpp @@ -54,7 +54,7 @@ void Bot::AI_Process_Raid() Raid* raid = entity_list.GetRaidByBot(this); Client* bot_owner = (GetBotOwner() && GetBotOwner()->IsClient() ? GetBotOwner()->CastToClient() : nullptr); - int r_group = raid->GetGroup(GetName()); + uint32 r_group = raid->GetGroup(GetName()); LogAI("Bot_Raid: Entered Raid Process() for [{}].", this->GetCleanName()); diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index c2e04f17d..f4f76f310 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -34,8 +34,8 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint32 iSpellTypes) { // Bot AI Raid* raid = entity_list.GetRaidByBot(this); if (raid) { - AICastSpell_Raid(tar, iChance, iSpellTypes); - return true; + return AICastSpell_Raid(tar, iChance, iSpellTypes); + //return true; } if (!tar) { diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 70ce5a98b..35a26956f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -569,6 +569,22 @@ void Client::CompleteConnect() if (raid) { SetRaidGrouped(true); raid->LearnMembers(); +#ifdef BOTS + std::vector r_members = raid->GetMembers(); + for (RaidMember iter : r_members) { + if (iter.member && iter.member->IsBot() && iter.member->GetOwner()->CastToClient()->CharacterID() == this->CharacterID()) { + iter.member->CastToBot()->Spawn(this); + iter.member->CastToBot()->SetRaidGrouped(true); + uint32 r_group = raid->GetGroup(iter.member->GetName()); + if (r_group > 0) { + iter.member->CastToBot()->SetFollowID(raid->GetGroupLeader(r_group)->CastToClient()->GetID()); + } + else { + iter.member->CastToBot()->SetFollowID(raid->GetLeader()->GetID()); + } + } + } +#endif raid->VerifyRaid(); raid->GetRaidDetails(); /*