From 4dcaef65cd43d82fb194d34ed009ee582533af78 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Thu, 31 Oct 2024 23:21:42 -0500 Subject: [PATCH] oopsies --- zone/bot.cpp | 16 ++++++---------- zone/bot.h | 2 +- zone/spells.cpp | 4 ++-- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index 8052aa8d1..34315e523 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -87,7 +87,7 @@ Bot::Bot(NPCType *npcTypeData, Client* botOwner) : NPC(npcTypeData, nullptr, glm SetGuardFlag(false); SetHoldFlag(false); SetAttackFlag(false); - SetCombatRoundForAlerts(true); + SetCombatRoundForAlerts(false); SetAttackingFlag(false); SetPullFlag(false); SetPullingFlag(false); @@ -211,7 +211,7 @@ Bot::Bot( SetGuardFlag(false); SetHoldFlag(false); SetAttackFlag(false); - SetCombatRoundForAlerts(true); + SetCombatRoundForAlerts(false); SetAttackingFlag(false); SetPullFlag(false); SetPullingFlag(false); @@ -2109,7 +2109,6 @@ void Bot::AI_Process() // ATTACKING FLAG (HATE VALIDATION) if (GetAttackingFlag() && tar->CheckAggro(this)) { - SetCombatRoundForAlerts(true); SetAttackingFlag(false); } @@ -2280,7 +2279,7 @@ void Bot::AI_Process() } else { // Out-of-combat behavior SetAttackFlag(false); - SetCombatRoundForAlerts(true); + SetCombatRoundForAlerts(false); SetAttackingFlag(false); if (!bot_owner->GetBotPulling()) { @@ -2425,7 +2424,6 @@ bool Bot::TryAutoDefend(Client* bot_owner, float leash_distance) { AddToHateList(hater, 1); SetTarget(hater); SetAttackingFlag(); - SetCombatRoundForAlerts(); if (HasPet() && (GetClass() != Class::Enchanter || GetPet()->GetPetType() != petAnimation || GetAA(aaAnimationEmpathy) >= 2)) { GetPet()->AddToHateList(hater, 1); @@ -2887,7 +2885,7 @@ bool Bot::IsValidTarget( SetTarget(nullptr); SetAttackFlag(false); - SetCombatRoundForAlerts(true); + SetCombatRoundForAlerts(false); SetAttackingFlag(false); if (PULLING_BOT) { @@ -2921,7 +2919,6 @@ Mob* Bot::GetBotTarget(Client* bot_owner) WipeHateList(); SetAttackFlag(false); - SetCombatRoundForAlerts(true); SetAttackingFlag(false); if (PULLING_BOT) { @@ -3140,7 +3137,6 @@ void Bot::SetOwnerTarget(Client* bot_owner) { } SetAttackFlag(false); - SetCombatRoundForAlerts(true); SetAttackingFlag(false); SetPullFlag(false); SetPullingFlag(false); @@ -3155,7 +3151,6 @@ void Bot::SetOwnerTarget(Client* bot_owner) { WipeHateList(); AddToHateList(attack_target, 1); SetTarget(attack_target); - SetCombatRoundForAlerts(); SetAttackingFlag(); if (GetPet() && (GetClass() != Class::Enchanter || GetPet()->GetPetType() != petAnimation || GetAA(aaAnimationEmpathy) >= 2)) { GetPet()->WipeHateList(); @@ -3168,7 +3163,7 @@ void Bot::SetOwnerTarget(Client* bot_owner) { void Bot::BotPullerProcess(Client* bot_owner, Raid* raid) { SetAttackFlag(false); - SetCombatRoundForAlerts(true); + SetCombatRoundForAlerts(false); SetAttackingFlag(false); SetPullFlag(false); SetPullingFlag(false); @@ -4905,6 +4900,7 @@ void Bot::TryBackstab(Mob *other, int ReuseTime) { if (!botpiercer || (botpiercer->ItemType != EQ::item::ItemType1HPiercing)) { if (!GetCombatRoundForAlerts()) { + SetCombatRoundForAlerts(); BotGroupSay(this, "I can't backstab with this weapon!"); } diff --git a/zone/bot.h b/zone/bot.h index 5836af133..0ee67c5ce 100644 --- a/zone/bot.h +++ b/zone/bot.h @@ -1105,7 +1105,7 @@ private: int32 GenerateBaseManaPoints(); void GenerateSpecialAttacks(); void SetBotID(uint32 botID); - void SetCombatRoundForAlerts(bool flag = true) { m_combat_round_alert_flag; } + void SetCombatRoundForAlerts(bool flag = true) { m_combat_round_alert_flag = flag; } void SetAttackingFlag(bool flag = true) { m_attacking_flag = flag; } void SetPullingFlag(bool flag = true) { m_pulling_flag = flag; } void SetReturningFlag(bool flag = true) { m_returning_flag = flag; } diff --git a/zone/spells.cpp b/zone/spells.cpp index 4f54b38c5..5391f03da 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2546,9 +2546,9 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, in float range = spells[spell_id].range + GetRangeDistTargetSizeMod(spell_target); if ( ( - (IsClient() && CastToClient()->TGB()) || (IsBot() && RuleB(Bots, EnableBotTGB) + (IsClient() && CastToClient()->TGB()) || (IsBot() && RuleB(Bots, EnableBotTGB)) ) && - IsTGBCompatibleSpell(spell_id) && IsGroupSpell(spell_id)) + IsTGBCompatibleSpell(spell_id) && IsGroupSpell(spell_id) ) { range = spells[spell_id].aoe_range; }