add GetBotSpellCategoryIDByShortName and CopyBotBlockedPetBuffs, update ^defaultsettings command

This commit is contained in:
nytmyr
2024-12-17 23:20:39 -06:00
parent ffd92017e0
commit 21f8bc0f95
5 changed files with 54 additions and 4 deletions
+36
View File
@@ -11734,6 +11734,10 @@ void Bot::CopySettings(Bot* to, uint8 settingType, uint16 spellType) {
void Bot::CopyBotSpellSettings(Bot* to)
{
if (!to) {
return;
}
to->ResetBotSpellSettings();
to->bot_spell_settings.clear();
@@ -11784,6 +11788,38 @@ void Bot::ResetBotSpellSettings()
SetBotEnforceSpellSetting(false);
}
void Bot::CopyBotBlockedBuffs(Bot* to) {
if (!to) {
return;
}
to->ClearBotBlockedBuffs();
std::vector<BotBlockedBuffs_Struct> blockedBuffs = GetBotBlockedBuffs();
if (!blockedBuffs.empty()) {
for (auto& blocked_buff : blockedBuffs) {
to->SetBotBlockedBuff(blocked_buff.spell_id, blocked_buff.blocked);
}
}
}
void Bot::CopyBotBlockedPetBuffs(Bot* to) {
if (!to) {
return;
}
to->ClearBotBlockedBuffs();
std::vector<BotBlockedBuffs_Struct> blockedBuffs = GetBotBlockedBuffs();
if (!blockedBuffs.empty()) {
for (auto& blocked_buff : blockedBuffs) {
to->SetBotBlockedPetBuff(blocked_buff.spell_id, blocked_buff.blocked_pet);
}
}
}
bool Bot::BotPassiveCheck() {
if (GetBotStance() == Stance::Passive) {
GetOwner()->Message(