[Bots] Crash fixes related to GetNumberNeedingHealedInGroup (#4684)

- Add pre-death checks and early returns
- Cleanup pointers for GetUltimateSpellType checks
- Rename IsBotSpellTypeOtherBeneficial to BotSpellTypeUsesTargetSettings
- Rename GetUltimateSpellTypeDelayCheck to GetUltimateSpellTypeRecastCheck
-Add entity validation to GetNumberNeedingHealedInGroup
This commit is contained in:
nytmyr
2025-02-15 14:55:52 -06:00
committed by GitHub
parent da24bf467a
commit 18685748f6
6 changed files with 146 additions and 122 deletions
+1 -1
View File
@@ -900,7 +900,7 @@ const uint32 SPELL_TYPES_INNATE = (SpellType_Nuke | SpellType_Lifetap | SpellTyp
// Bot related functions
bool IsBotSpellTypeDetrimental (uint16 spell_type);
bool IsBotSpellTypeBeneficial (uint16 spell_type);
bool IsBotSpellTypeOtherBeneficial(uint16 spell_type);
bool BotSpellTypeUsesTargetSettings(uint16 spell_type);
bool IsBotSpellTypeInnate (uint16 spell_type);
bool IsAEBotSpellType(uint16 spell_type);
bool IsGroupBotSpellType(uint16 spell_type);
+1 -1
View File
@@ -90,7 +90,7 @@ bool IsBotSpellTypeBeneficial(uint16 spell_type) {
return false;
}
bool IsBotSpellTypeOtherBeneficial(uint16 spell_type) {
bool BotSpellTypeUsesTargetSettings(uint16 spell_type) {
switch (spell_type) {
case BotSpellTypes::RegularHeal:
case BotSpellTypes::CompleteHeal: