diff --git a/common/spdat.cpp b/common/spdat.cpp index 50b7651f4..5c8064f8c 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -2791,7 +2791,7 @@ bool IsLichSpell(uint16 spell_id) return false; } -bool BOT_SPELL_TYPES_DETRIMENTAL(uint16 spellType, uint8 cls) { +bool IsBotSpellTypeDetrimental(uint16 spellType, uint8 cls) { switch (spellType) { case BotSpellTypes::Nuke: case BotSpellTypes::Root: @@ -2830,7 +2830,7 @@ bool BOT_SPELL_TYPES_DETRIMENTAL(uint16 spellType, uint8 cls) { return false; } -bool BOT_SPELL_TYPES_BENEFICIAL(uint16 spellType, uint8 cls) { +bool IsBotSpellTypeBeneficial(uint16 spellType, uint8 cls) { switch (spellType) { case BotSpellTypes::RegularHeal: case BotSpellTypes::CompleteHeal: @@ -2879,7 +2879,7 @@ bool BOT_SPELL_TYPES_BENEFICIAL(uint16 spellType, uint8 cls) { return false; } -bool BOT_SPELL_TYPES_OTHER_BENEFICIAL(uint16 spellType) { +bool IsBotSpellTypeOtherBeneficial(uint16 spellType) { switch (spellType) { case BotSpellTypes::RegularHeal: case BotSpellTypes::CompleteHeal: @@ -2922,7 +2922,7 @@ bool BOT_SPELL_TYPES_OTHER_BENEFICIAL(uint16 spellType) { return false; } -bool BOT_SPELL_TYPES_INNATE(uint16 spellType) { +bool IsBotSpellTypeInnate(uint16 spellType) { switch (spellType) { case BotSpellTypes::AENukes: case BotSpellTypes::AERains: @@ -2955,7 +2955,7 @@ bool BOT_SPELL_TYPES_INNATE(uint16 spellType) { } bool IsBotSpellType(uint16 spellType) { - if (BOT_SPELL_TYPES_DETRIMENTAL(spellType) && BOT_SPELL_TYPES_BENEFICIAL(spellType) && BOT_SPELL_TYPES_INNATE(spellType)) { + if (IsBotSpellTypeDetrimental(spellType) && IsBotSpellTypeBeneficial(spellType) && IsBotSpellTypeInnate(spellType)) { return true; } diff --git a/common/spdat.h b/common/spdat.h index 9d7c0910a..adf9c05e4 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -736,10 +736,10 @@ const uint32 SPELL_TYPES_DETRIMENTAL = (SpellType_Nuke | SpellType_Root | SpellT const uint32 SPELL_TYPES_BENEFICIAL = (SpellType_Heal | SpellType_Buff | SpellType_Escape | SpellType_Pet | SpellType_InCombatBuff | SpellType_Cure | SpellType_HateRedux | SpellType_InCombatBuffSong | SpellType_OutOfCombatBuffSong | SpellType_PreCombatBuff | SpellType_PreCombatBuffSong); const uint32 SPELL_TYPES_INNATE = (SpellType_Nuke | SpellType_Lifetap | SpellType_DOT | SpellType_Dispel | SpellType_Mez | SpellType_Slow | SpellType_Debuff | SpellType_Charm | SpellType_Root); -bool BOT_SPELL_TYPES_DETRIMENTAL (uint16 spellType, uint8 cls = 0); -bool BOT_SPELL_TYPES_BENEFICIAL (uint16 spellType, uint8 cls = 0); -bool BOT_SPELL_TYPES_OTHER_BENEFICIAL(uint16 spellType); -bool BOT_SPELL_TYPES_INNATE (uint16 spellType); +bool IsBotSpellTypeDetrimental (uint16 spellType, uint8 cls = 0); +bool IsBotSpellTypeBeneficial (uint16 spellType, uint8 cls = 0); +bool IsBotSpellTypeOtherBeneficial(uint16 spellType); +bool IsBotSpellTypeInnate (uint16 spellType); bool IsBotSpellType (uint16 spellType); bool IsAEBotSpellType(uint16 spellType); bool IsGroupBotSpellType(uint16 spellType); diff --git a/zone/bot.cpp b/zone/bot.cpp index 450315514..b6b74e74a 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -7166,7 +7166,7 @@ bool Bot::CheckLoreConflict(const EQ::ItemData* item) { bool EntityList::Bot_AICheckCloseBeneficialSpells(Bot* caster, uint8 iChance, uint16 spellType) { - if (BOT_SPELL_TYPES_DETRIMENTAL(spellType, caster->GetClass())) { + if (IsBotSpellTypeDetrimental(spellType, caster->GetClass())) { LogError("[EntityList::Bot_AICheckCloseBeneficialSpells] detrimental spells requested"); return false; } @@ -10258,7 +10258,7 @@ void Bot::SetBotSpellRecastTimer(uint16 spellType, Mob* tar, bool preCast) { return; } - if (!preCast && BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType)) { + if (!preCast && IsBotSpellTypeOtherBeneficial(spellType)) { return; } @@ -10276,7 +10276,7 @@ void Bot::SetBotSpellRecastTimer(uint16 spellType, Mob* tar, bool preCast) { if (tar->IsPet() && tar->GetOwner() && tar->GetOwner()->IsOfClientBot()) { return tar->GetOwner()->SetSpellTypeRecastTimer(spellType, (GetUltimateSpellDelay(spellType, tar) + addedDelay)); } - else if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType)) { + else if (IsBotSpellTypeOtherBeneficial(spellType)) { tar->SetSpellTypeRecastTimer(spellType, (GetUltimateSpellDelay(spellType, tar) + addedDelay)); } else { @@ -10407,7 +10407,7 @@ uint16 Bot::GetDefaultSpellTypePriority(uint16 spellType, uint8 priorityType, ui } uint16 Bot::GetDefaultSpellTypeIdlePriority(uint16 spellType, uint8 botClass, uint8 stance) { - if (!BOT_SPELL_TYPES_BENEFICIAL(spellType, botClass)) { + if (!IsBotSpellTypeBeneficial(spellType, botClass)) { return 0; } @@ -10669,7 +10669,7 @@ uint16 Bot::GetDefaultSpellTypePursuePriority(uint16 spellType, uint8 botClass, uint16 Bot::GetDefaultSpellTypeResistLimit(uint16 spellType, uint8 stance) { - if (!BOT_SPELL_TYPES_BENEFICIAL(spellType, GetClass())) { + if (!IsBotSpellTypeBeneficial(spellType, GetClass())) { return RuleI(Bots, SpellResistLimit); } else { @@ -10924,7 +10924,7 @@ bool Bot::AttemptAICastSpell(uint16 spellType) { return result; } - if (BOT_SPELL_TYPES_BENEFICIAL(spellType, GetClass())) { + if (IsBotSpellTypeBeneficial(spellType, GetClass())) { if (!PrecastChecks(this, spellType) || !AICastSpell(this, GetChanceToCastBySpellType(spellType), spellType)) { if (GetClass() == Class::Bard) { return result; @@ -11337,7 +11337,7 @@ bool Bot::RequiresLoSForPositioning() { } for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) { - if (BOT_SPELL_TYPES_DETRIMENTAL(i) && !GetSpellHold(i)) { + if (IsBotSpellTypeDetrimental(i) && !GetSpellHold(i)) { return true; } } diff --git a/zone/bot_commands/cast.cpp b/zone/bot_commands/cast.cpp index 980821541..9b9263670 100644 --- a/zone/bot_commands/cast.cpp +++ b/zone/bot_commands/cast.cpp @@ -339,7 +339,7 @@ void bot_command_cast(Client* c, const Seperator* sep) break; default: if ( - (BOT_SPELL_TYPES_DETRIMENTAL(spellType) && !c->IsAttackAllowed(tar)) || + (IsBotSpellTypeDetrimental(spellType) && !c->IsAttackAllowed(tar)) || ( spellType == BotSpellTypes::Charm && ( @@ -354,7 +354,7 @@ void bot_command_cast(Client* c, const Seperator* sep) return; } - if (BOT_SPELL_TYPES_BENEFICIAL(spellType)) { + if (IsBotSpellTypeBeneficial(spellType)) { if ( (!tar->IsOfClientBot() && !(tar->IsPet() && tar->GetOwner() && tar->GetOwner()->IsOfClientBot())) || ((tar->IsOfClientBot() && !c->IsInGroupOrRaid(tar)) || (tar->GetOwner() && tar->GetOwner()->IsOfClientBot() && !c->IsInGroupOrRaid(tar->GetOwner()))) @@ -418,14 +418,14 @@ void bot_command_cast(Client* c, const Seperator* sep) } if ( - BOT_SPELL_TYPES_BENEFICIAL(spellType) && + IsBotSpellTypeBeneficial(spellType) && !RuleB(Bots, CrossRaidBuffingAndHealing) && !bot_iter->IsInGroupOrRaid(newTar, true) ) { continue; } - if (BOT_SPELL_TYPES_DETRIMENTAL(spellType, bot_iter->GetClass()) && !bot_iter->IsAttackAllowed(newTar)) { + if (IsBotSpellTypeDetrimental(spellType, bot_iter->GetClass()) && !bot_iter->IsAttackAllowed(newTar)) { bot_iter->BotGroupSay( bot_iter, fmt::format( diff --git a/zone/bot_commands/depart.cpp b/zone/bot_commands/depart.cpp index 80c3c4e22..1facaef1f 100644 --- a/zone/bot_commands/depart.cpp +++ b/zone/bot_commands/depart.cpp @@ -249,7 +249,7 @@ void bot_command_depart(Client* c, const Seperator* sep) } if (bot_iter->CastSpell(itr->SpellId, tar->GetID(), EQ::spells::CastingSlot::Gem2, -1, -1)) { - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(BotSpellTypes::Teleport)) { + if (IsBotSpellTypeOtherBeneficial(BotSpellTypes::Teleport)) { bot_iter->SetCastedSpellType(UINT16_MAX); } else { diff --git a/zone/botspellsai.cpp b/zone/botspellsai.cpp index a86b8e6c8..a5718a2dc 100644 --- a/zone/botspellsai.cpp +++ b/zone/botspellsai.cpp @@ -243,7 +243,7 @@ bool Bot::AICastSpell(Mob* tar, uint8 iChance, uint16 spellType, uint16 subTarge } if (AIDoSpellCast(s.SpellIndex, tar, s.ManaCost)) { - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType)) { + if (IsBotSpellTypeOtherBeneficial(spellType)) { SetCastedSpellType(UINT16_MAX); if (!IsCommandedSpell()) { @@ -293,7 +293,7 @@ bool Bot::BotCastMez(Mob* tar, uint8 botClass, BotSpell& botSpell, uint16 spellT } if (AIDoSpellCast(s.SpellIndex, tar, s.ManaCost)) { - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType)) { + if (IsBotSpellTypeOtherBeneficial(spellType)) { SetCastedSpellType(UINT16_MAX); if (!IsCommandedSpell()) { @@ -2514,7 +2514,7 @@ DBbotspells_Struct* ZoneDatabase::GetBotSpells(uint32 bot_spell_id) entry.bucket_comparison = e.bucket_comparison; // some spell types don't make much since to be priority 0, so fix that - if (!BOT_SPELL_TYPES_INNATE(entry.type) && entry.priority == 0) { + if (!IsBotSpellTypeInnate(entry.type) && entry.priority == 0) { entry.priority = 1; } diff --git a/zone/mob.cpp b/zone/mob.cpp index da438671d..8e8cb8c01 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -9631,7 +9631,7 @@ uint16 Mob::GetUltimateSpellDelay(uint16 spellType, Mob* tar) { return tar->GetOwner()->GetSpellDelay(GetPetSpellType(spellType)); } - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType) && tar->IsOfClientBot()) { + if (IsBotSpellTypeOtherBeneficial(spellType) && tar->IsOfClientBot()) { return tar->GetSpellDelay(spellType); } @@ -9647,7 +9647,7 @@ bool Mob::GetUltimateSpellDelayCheck(uint16 spellType, Mob* tar) { return tar->GetOwner()->SpellTypeRecastCheck(GetPetSpellType(spellType)); } - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType) && tar->IsOfClientBot()) { + if (IsBotSpellTypeOtherBeneficial(spellType) && tar->IsOfClientBot()) { return tar->SpellTypeRecastCheck(spellType); } @@ -9663,7 +9663,7 @@ uint8 Mob::GetUltimateSpellMinThreshold(uint16 spellType, Mob* tar) { return tar->GetOwner()->GetSpellMinThreshold(GetPetSpellType(spellType)); } - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType) && tar->IsOfClientBot()) { + if (IsBotSpellTypeOtherBeneficial(spellType) && tar->IsOfClientBot()) { return tar->GetSpellMinThreshold(spellType); } @@ -9679,7 +9679,7 @@ uint8 Mob::GetUltimateSpellMaxThreshold(uint16 spellType, Mob* tar) { return tar->GetOwner()->GetSpellMaxThreshold(GetPetSpellType(spellType)); } - if (BOT_SPELL_TYPES_OTHER_BENEFICIAL(spellType) && tar->IsOfClientBot()) { + if (IsBotSpellTypeOtherBeneficial(spellType) && tar->IsOfClientBot()) { return tar->GetSpellMaxThreshold(spellType); }