From 49ecb62cc77bde01043b6e14ad5aa4cca3bf0454 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sun, 1 Dec 2024 20:46:17 -0600 Subject: [PATCH] Add taunting update on stance change when necessary --- zone/bot_commands/bot.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/zone/bot_commands/bot.cpp b/zone/bot_commands/bot.cpp index f9a3ecfe9..b91d5a0a7 100644 --- a/zone/bot_commands/bot.cpp +++ b/zone/bot_commands/bot.cpp @@ -1404,6 +1404,25 @@ void bot_command_stance(Client *c, const Seperator *sep) bot_iter->SetBotStance(value); bot_iter->LoadDefaultBotSettings(); database.botdb.LoadBotSettings(bot_iter); + + if ( + (bot_iter->GetClass() == Class::Warrior || bot_iter->GetClass() == Class::Paladin || bot_iter->GetClass() == Class::ShadowKnight) && + (bot_iter->GetBotStance() == Stance::Aggressive) + ) { + bot_iter->SetTaunting(true); + + if (bot_iter->HasPet() && bot_iter->GetPet()->GetSkill(EQ::skills::SkillTaunt)) { + bot_iter->GetPet()->CastToNPC()->SetTaunting(true); + } + } + else { + bot_iter->SetTaunting(false); + + if (bot_iter->HasPet() && bot_iter->GetPet()->GetSkill(EQ::skills::SkillTaunt)) { + bot_iter->GetPet()->CastToNPC()->SetTaunting(false); + } + } + bot_iter->Save(); ++success_count; }